Functions for the quantization of notes
These functions apply (static) quantization of notes in order to produce sheet music by pressing the notes into bars.
quantize(notes, energy, parts) quantMerge(notes, minlength, barsize, bars)
Series of notes, a vector of integers such as returned by
noteFromFF. At least one argument (
energy) must be specified.
Series of energy values, a vector of numerics such as corresponding components of a
Number of outcoming parts. The
notesvector is divided into
partsbins, the outcome is a vector of the modes of all bins.
1/(length of the shortest note). Example: if the shortest note is a quaver (1/8), set
minlength = 8.
One bar contains
barsizenumber of notes of length
barsnumber of bars.
quantize returns a list with components:
Vector of length
parts corresponding to the input data
The data is binned and modes corresponding to the data in those bins are returned.
notes, but for the
integer representation of a note (see Arguments).
1/duration of a note (see
minlength in Section Arguments),
punctuation = FALSE.
Whether the note should be punctuated. If
the real duration is 1.5 times the duration given in
FALSE, sensible processing is not yet implemented.
It is supposed to indicate the beginning and ending positions of slurs.