Plot an observed melody and (optional) an expected melody, as well as corresponding energy values (corresponding to the loudness of the sound) within a quantization grid.
quantplot(observed, energy = NULL, expected = NULL, bars,
barseg = round(length(observed) / bars),
main = NULL, xlab = NULL, ylab = "note", xlim = NULL, ylim = NULL,
observedcol = "red", expectedcol = "grey", gridcol = "grey",
lwd = 2, las = 1, cex.axis = 0.9, mar = c(5, 4, 4, 4) + 0.1,
notenames = NULL, silence = "silence", plotenergy = TRUE, ...,
axispar = list(ax1 = list(side=1), ax2 = list(side=2), ax4 = list(side=4)),
boxpar = list(),
energylabel = list(text="energy", side=4, line=2.5, at=rg.s-0.25, las=3),
energypar = list(pch=20),
expectedpar = list(),
gridpar = list(gridbar = list(col = 1), gridinner = list(col=gridcol)),
observedpar = list(col=observedcol, pch=15))
Either a vector of observed notes resulting from some quantization,
or a list with components notes (observed notes) and energy (corresponding energy values),
e.g. the result from a call to quantize.
A vector of energy values with same quantization as observed
(overwrites any given energy values if observed is a list).
Expected notes (optional; in order to compare results).
Number of bars to be plotted (e.g. corresponding to quantize arguments).
Number of segments (minimal length notes) in each bar.
Main title of the plot.
Annotation of x-/y-axes.
Range of x-/y-axis.
Colour for the observed notes.
Colour for the expected notes.
Colour of the inner-bar grid.
Line width, see par for details.
Orientation of axis labels, see par for details.
Size of tick mark labels, see par for details.
Margins of the plot, see par for details.
Optionally specify other notenames (character) for the y-axis.
Character string for label of the ‘silence’ (default) axis.
Logical indicating whether to plot energy values in the bottom part of the plot (default is TRUE)
if energy values are specified, and FALSE otherwise.
Additional graphical parameters to be passed to underlying plot function.
A named list of three other lists (ax1, ax2, and ax4)
containing parameters passed to the corresponding axis calls for the three axis
time (ax1), notes (ax2), and energy (ax4).
A list of parameters to be passed to the box generating functions.
A list of parameters to be passed to the energy-label
generating mtext call.
A list of parameters to be passed to the points function
that draws the energy values.
A list of parameters to be passed to the rect
function that draws the rectangles for expected values.
A named list of two other lists (gridbar and gridinner)
containing parameters passed to the abline functions that draw the grid lines
(for bar separators and inner bar (note) separators).
A list of parameters to be passed to the lines
function that draws the observed values.
Uwe Ligges ligges@statistik.tu-dortmund.de
noteFromFF, FF, melodyplot, quantize;
for an example, see the help in tuneR.