Sequence.h
void AddChord(const Chord &)
Adds the specified chord to this Measure.
int GetNumNotes()
Returns the number of notes that belong to this chord.
A collection of notes that begin playing at the same time.
Definition: Sequence.h:95
A discreet sound that plays for a specified amount of time.
Definition: Sequence.h:53
float duration
Duration of the sound in beats.
Definition: Sequence.h:77
AssetID sound
AssetID of the sound to be played.
Definition: Sequence.h:81
Assets that contains information to play a song made of loaded audio samples.
Definition: Sequence.h:48
void SetStartTime(float t)
Sets when this chord is played. Measured in beats.
int GetNumMeasuresUsed()
Returns the number of measures up to the last measure actully being utilized. i.e. the last measure that contains a note.
Definition: AssetID.h:37
int GetNumChords()
Returns the number of chords part of this measure.
void AddNote(const Note &)
Adds a new note to be part of this chord.
void SetChannel(uint32_t)
Sets the Sound channel that this chord will play on.
void RemoveNote(int n)
Removes the specified note from the chord.
Assets are referred to by an AssetID. The AssetID uniquely refers to an Asset stored within memory...
Definition: AssetID.h:42
A collection of chords. All chord start times are offset from the start of this measure.
Definition: Sequence.h:148
float beatsPerMinute
The playback speed of the sequence.
Definition: Sequence.h:180
int beatsPerMeasure
The number of beats that each measure should be given.
Definition: Sequence.h:184
Note(AssetID sound_, float duration_=4.f, uint8_t volume_=128, uint8_t panning_=128)
Convenience constructor.
Definition: Sequence.h:63
int GetNumMeasures()
Returns the number of physical measures stored in the sequence.
float beatDuration
Defines what represents the beat. This is a fraction of the while measure. For example, in 4/4 time, the beatDuration would be 1.f / 4.f because the quarter note would get the beat.
Definition: Sequence.h:189
uint32_t GetChannel()
void AddMeasures(const std::vector< Measure > &)
Adds measures to the sequence.
uint8_t volume
Volume of the note. 0 - 255: 0 is no sound while 255 is max volume.
Definition: Sequence.h:85