A Rhythm is the parsed representation of a rhythm string.
Internally, the fluid tablature system uses several different formats to
represent discrete rhythms. End-users mostly do not need to know about
these, but they are useful if you are working with the source code.
advances is an array of numbers, with each element representing a single character in a rhythm string. It an intermediary form used internally. Consumers probably want to use deltas instead.
[.5, 0, .5, .0] is an advances array derived from 'h h '
Where possible, I measure durations in whole notes. This means that an eighth note is 1/8 === 0.125, which I find easier than measuring in quarter notes or seconds.
A Rhythm is the parsed representation of a rhythm string.
Internally, the fluid tablature system uses several different formats to represent discrete rhythms. End-users mostly do not need to know about these, but they are useful if you are working with the source code.
Advances
advances
is an array of numbers, with each element representing a single character in arhythm
string. It an intermediary form used internally. Consumers probably want to usedeltas
instead.[.5, 0, .5, .0]
is anadvances
array derived from'h h '
Deltas
deltas
is an array of numbers, each representing the contribution of a single character in arhythm
string.[0.25, 0.25, 0.25 0.25]
is andeltas
array derived from'h h '
Totals
totals
is an array of durations elapsed at the end of each segment[.25, .5, .75, 1]
is a sequence of quarter notes derived from'h h '
Rhythm Object
parseRhythm(rhythm)
returns a rhythm object for a givenrhythm
string. A rhythm object has.deltas
and.totals
members.Rhythmic Data Type Equivalency
The following are all equivalent:
'h h '
rhythm string[.50, .00, .50, .00]
advances array[.25, .25, .25, .25]
deltas array[.25, .50, .75, 1.0]
totals arrayDurations measured in Whole Notes
Where possible, I measure durations in whole notes. This means that an eighth note is
1/8
===0.125
, which I find easier than measuring in quarter notes or seconds.