Convert a melody to quantized NoteSequence.
Optional number of steps per quarter note.
Optional number of quarter notes per minute.
A quantized NoteSequence
created from the Melody
.
Extract a melody from a NoteSequence
.
NoteSequence
from which to extract a melody.
The minimum pitch to represent. Those above this value will cause an error to be thrown.
The maximum pitch to represent. Those above this value will cause an error to be thrown.
If false, an error will be raised when notes start at the same step. If true, the highest pitched note is used and others are ignored.
The length of each sequence.
A Melody
created from the NoteSequence
.
Generated using TypeDoc
Melody representation as an array of integers: 0 for
NO_EVENT
(sustain), 1 forNOTE_OFF
, and 2+ for note onsets at pitches betweenminPitch
andmaxPitch
. Each position in the array corresponds to a fixed length of time. So,[2, 4, 6, 7, 9, 11, 13, 14, 0, 0, 0, 1]
represents a major scale where the final note is held for 4 time steps then released.An array of melody events.
The minimum pitch to represent.
The maximum pitch to represent.