quantize: Functions for the quantization of notes

View source: R/quantize.R

quantizeR Documentation

Functions for the quantization of notes

Description

These functions apply (static) quantization of notes in order to produce sheet music by pressing the notes into bars.

Usage

quantize(notes, energy, parts)
quantMerge(notes, minlength, barsize, bars)

Arguments

notes

Series of notes, a vector of integers such as returned by noteFromFF. At least one argument (notes and/or energy) must be specified.

energy

Series of energy values, a vector of numerics such as corresponding components of a Wspec object.

parts

Number of outcoming parts. The notes vector is divided into parts bins, the outcome is a vector of the modes of all bins.

minlength

1/(length of the shortest note).
Example: if the shortest note is a quaver (1/8), set minlength = 8.

barsize

One bar contains barsize number of notes of length minlength.

bars

We expect bars number of bars.

Value

quantize returns a list with components:

notes

Vector of length parts corresponding to the input data The data is binned and modes corresponding to the data in those bins are returned.

energy

Same as notes, but for the energy argument.


quantMerge returns a data.frame with components:

note

integer representation of a note (see Arguments).

duration

1/duration of a note (see minlength in Section Arguments), if punctuation = FALSE.

punctuation

Whether the note should be punctuated. If TRUE, the real duration is 1.5 times the duration given in duration.

slur

currently always FALSE, sensible processing is not yet implemented.
It is supposed to indicate the beginning and ending positions of slurs.

Author(s)

Uwe Ligges ligges@statistik.tu-dortmund.de

See Also

to get the input: noteFromFF, for plotting: quantplot, for further processing: lilyinput, to get notenames: notenames; for an example, see the help in tuneR.


tuneR documentation built on May 29, 2024, 11:28 a.m.

Related to quantize in tuneR...