The chord progression to play.
The metronome which the player uses for tracking passed beats.
How many beats should have passed before the chord progression player stops. The default value is null, meaning the chord progression player never stops, and continually loops playback of the chord progression.
How many beats have passed since the chord progression player started.
The chordChanged event dispatches a new event data object each time the current chord changes.
The chord progression to play
Returns the chord that is currently being played.
This event fires when the chord progression player finishes.
Returns true if the chord progression player has finished playing its chord progression.
The metronome which the player uses for tracking passed beats.
Provides a way of identifying a chord progression player so that it can be easily retrieved later.
How many beats in the chord progression to play for every beat that passes in actual time. For example: 1.5 means the chord progression is played 1.5 times faster than it would normally.
Which beat of the chord progression to start playing from. This allows for a chord progression player to begin playing a chord progression from half-way through for example.
Returns the name of this type. This can be used rather than instanceof which is sometimes unreliable.
Provides a way for setting the ref through a chained function call. For example:
clock.addChild(new ChordProgressionPlayer(chords, metronome).withRef('player'));
The calling object.
The ref to set on the object.
Generated using TypeDoc
The ChordProgressionPlayer facilitates the playing of a chord. It doesn't actually cause the generation of any note on/note off events. Instead it triggers events whenever the chord changes, allowing other objects to easily play/arpeggiate/do whatever they like over a series of changing chords.