Members
expandChords
Convert a chord names sequence into a chord notes sequence
- Source:
Methods
chords(meter, measures, a)
Create a chord names sequence
Parameters:
Name | Type | Description |
---|---|---|
meter |
String | the meter used in the measures |
measures |
String | the chords |
a |
Sequence | sequence of chords |
- Source:
Examples
score.chords('4/4', 'C6 | Dm7 G7 | Cmaj7')
score(['chords', '4/4', 'Cmaj7 | Dm7 G7'])
events()
Get a sorted events array from a score
forEachTime(fn, ctx, score)
Get all notes for side-effects
__Important:__ ascending time ordered is not guaranteed
Parameters:
Name | Type | Description |
---|---|---|
fn |
function | the function |
ctx |
Object | (Optional) a context object passed to the function |
score |
Score | the score object |
harmony()
Create a harmony sequence
- Source:
measures(meter, measures, builder) → {Score}
Parse masures using a time meter to get a sequence
Parameters:
Name | Type | Description |
---|---|---|
meter |
String | the time meter |
measures |
String | the measures string |
builder |
function | (Optional) the function used to build the notes |
- Source:
Returns:
the score object
- Type
- Score
Example
measures('4/4', 'c d (e f) | g | (a b c) d')