The collection of pitch bends that the clip contains.
The collection of control changes that the clip contains.
The collection of notes that the clip contains.
The difference between the start
and end
values.
Attempts to set this to a negative value will result in an error being thrown.
The value which the range ends at.
Attempts to set this to a value less than start
will result in an error being thrown.
The value which the range starts at.
Attempts to set this to a value greater than end
will result in an error being thrown.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
Adds a bend to the clip. The start parameter can take an array of values, allowing for multiple similar bends to be added at once.
Returns the Clip object which the bend(s) is being added to.
What beat within the clip that the bend starts
How many beats the bend lasts
How much bend to apply, valid values range from 0 - 127, or a Tween object which defines a strategy for how to change over the course of the bend's lifetime.
Which channel to play the bend on, valid values range from 0 - 15, or null to allow whatever is playing the clip to decide
Adds a control change to the clip. The start parameter can take an array of values, allowing for multiple similar control changes to be added at once.
Returns the Clip object which the control change(s) is being added to.
What beat within the clip that the control change starts. Can take array of multiple start values.
How many beats the control change lasts.
The MIDI controller to modify, valid values range from 0 - 127.
The value to set, valid values range from 0 - 127, or a Tween object which defines a strategy for how to change over the course of the control change's lifetime.
Which channel to play the control change on, valid values range from 0 - 15, or null to allow whatever is playing the clip to decide.
Adds a note to the clip. The start & pitch parameters can each take arrays of values, allowing for multiple notes to be added at once for the same pitches and start beats.
Returns the Clip object which the note(s) is being added to.
What beat within the clip that the note starts on. Can take array of multiple note starts
How many beats the note lasts.
The MIDI pitch of the note, valid values range from 0 - 127. Can also take pitch names, see the pitch method for more information. Can take array of multiple pitch values
The note's velocity, valid values range from 0 - 127, or a function that maps beats to values.
Which channel to play the note on, valid values range from 0 - 15, or null to allow whatever is playing the clip to decide.
Provides way of identifying notes so they can be easily retrieved later.
Intended primarily for use by the ClipPlayer to fetch all pitch bends who's durations overlap with the provided start & end parameters.
The beat at which to start searching for overlapping pitch bends.
The beat at which to end searching for overlapping pitch bends.
Intended primarily for use by the ClipPlayer to fetch all control changes who's durations overlap with the provided start & end parameters.
The beat at which to start searching for overlapping control changes.
The beat at which to end searching for overlapping control changes.
Intended primarily for use by the ClipPlayer to fetch all notes who's end times are between the provided start & end parameters.
The beat at which to start searching for note endings.
The beat at which to end searching for note endings.
Intended primarily for use by the ClipPlayer to fetch all notes who's start times are between the provided start & end parameters.
The beat at which to start searching for note beginnings.
The beat at which to end searching for note beginnings.
Accepts a value and returns what percentage of the way into the range that the value is.
The returned value can be negative, or greater than 100%, if the passed in value is less than the range start, or greater than the range end.
The value to compare against the range.
Modify the start times of notes in the clip to be closer to some desired rhythmic pattern. Modifies the clip in place.
Returns the clip instance to allow for chaining.
An array of numbers that specify a rhythm to quantize to. For example [0.5] means that the clip should be quantized to eighth notes. Alternatively, [0.5, 0.25, 0.25] means that the clip should be quantized to a heavy metal style gallop rhythm.
A number from 0 to 1, 1 means full quantization to the target rhythm 0.5 will move notes half way towards the target rhythm, while 0 will do nothing
Static
loadGenerated using TypeDoc
The Clip class represents a collection of notes, control changes, and bends, arranged over a certain number of beats, to allow them to be played in a musical expression.
An example of using a clip to contain the first 2 bars of the melody Twinkle Twinkle Little Star: