add_pattern
Adds a pattern of notes to a song and returns its index; notes must fit the selected key and scale, and the pattern plays only when the arrangement uses it.
Instructions
Adds a pattern and returns its index. It won't play until the arrangement uses it. Notes are absolute pitches, so the key and scale don't move them; they must fit that key and scale.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Key, like "C", "F#" or "Bb". Ignored for drumkits. | |
| notes | No | Up to 128 notes. | |
| scale | No | Scale. Notes must fit it. Ignored for drumkits. One of: normal (all notes), major, minor (melodic, with a raised 6th and 7th; for natural minor, use the relative major's key with scale major), blues, harmonic minor, pentatonic major, pentatonic minor, pentatonic blues, pentatonic neutral, romanian folk, spanish gypsy, arabic magam, chinese, hungarian, chord: major, chord: minor, chord: 5th, chord: dom 7th, chord: major 7th, chord: minor 7th, chord: minor major 7th, chord: sus4, chord: sus2. | |
| instrument | No | Index of the song's instrument, 0 by default. |