Methods
-
static canModifySequence(modificationType) → {boolean}
-
Returns whether the corresponding ModificationType can be used to modify a sequence of notes.
Parameters:
Name Type Description modificationTypenumber The ModificationType about which to query
Returns:
boolean -Whether the corresponding modification type can be used to modify a sequence of notes
- See:
-
static getModificationParameters(modificationType) → {Object.<string, Object.<string, Array.<string>>>}
-
Returns a list of modification-specific parameters for use with the corresponding ModificationType.
Note that the
modificationTypeparameter must be the numeric value associated with a certain ModificationType, not a string-based key.The object returned from this function will contain 2 keys: 'required' and 'optional'. These keys can be used to access sub-objects with 2 keys: 'singleNote' and 'sequence'. These keys hold arrays containing the string-based names of parameters that are available for manipulation within the given modification.
Parameter values within the "sequence" array indicate parameters that have meaning when used with the playSequence() function. Parameter values within the "singleNote" array indicate parameters that have meaning when used with the playNote() function.
Parameters:
Name Type Description modificationTypenumber The ModificationType for which to return a parameter list
Returns:
Object.<string, Object.<string, Array.<string>>> -List of modification-specific parameter keys and when they are required
- See:
-
static inferModificationParametersFromSequence(modificationType, sequence, index, params) → {Object}
-
Attempts to infer the required modification parameter values from a given sequence of notes.
Parameters:
Name Type Description modificationTypenumber Numeric value corresponding to the desired ModificationType
sequenceArray.<(Array|Array.<Array>)> Array of
[note, duration]and/or chords corresponding to the sequence to be playedindexnumber Index of the current note in the sequence
paramsObject | null Object containing the currently known parameter values
Returns:
Object -Object containing the inferred and known parameter values
- See:
-
static loadModification(modificationType, tempo, key, details) → {ModificationBase}
-
Loads a concrete ModificationBase instance capable of modifying an individual note and duration.
Parameters:
Name Type Description modificationTypenumber Numeric value corresponding to the desired ModificationType
tempoTempo Reference to the current global Tempo object
keyKey Reference to the current global Key object
detailsNoteDetails Unmodified details about the note to be played