https://github.com/cran/tuneR
Revision f6977c3ef8ea48eff4bc888c56c75a1b0abd2bf8 authored by Uwe Ligges on 29 June 2010, 00:00:00 UTC, committed by Gabor Csardi on 29 June 2010, 00:00:00 UTC
1 parent 55a1962
Raw File
Tip revision: f6977c3ef8ea48eff4bc888c56c75a1b0abd2bf8 authored by Uwe Ligges on 29 June 2010, 00:00:00 UTC
version 0.4-0
Tip revision: f6977c3
quantize.Rd
\name{quantize}
\alias{quantMerge}
\alias{quantize}
\title{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{
  \item{notes}{Series of notes, a vector of integers such as returned by \code{\link{noteFromFF}}.
    At least one argument (\code{notes} and/or \code{energy}) must be specified.}
  \item{energy}{Series of energy values, a vector of numerics such as corresponding components of a 
    \code{\link{Wspec}} object.}
  \item{parts}{Number of outcoming parts. The \code{notes} vector is divided into \code{parts} bins,
    the outcome is a vector of the modes of all bins.}
  \item{minlength}{1/(length of the shortest note).\cr
    Example: if the shortest note is a quaver (1/8), set \code{minlength=8}.} 
  \item{barsize}{One bar contains \code{barsize} number of notes of length \code{minlength}.}
  \item{bars}{We expect \code{bars} number of bars.}
}
\value{
    \code{quantize} returns a list with components:
    \item{notes}{Vector of length \code{parts} corresponding to the input data
        The data is binned and modes corresponding to the data in those bins are returned.}
    \item{energy}{Same as \code{notes}, but for the \code{energy} argument.}\cr
    
    \code{quantMerge} returns a data.frame with components:
  \item{note}{integer representation of a note (see Arguments).}
  \item{duration}{1/duration of a note (see \code{minlength} in Section Arguments),
    if \code{punctuation=FALSE}.}
  \item{punctuation}{Whether the note should be punctuated. If \code{TRUE}, 
    the real duration is 1.5 times the duration given in \code{duration}.}
  \item{slur}{currently always \code{FALSE}, sensible processing is not yet implemented.\cr
    It is supposed to indicate the beginning and ending positions of slurs.}
}
\author{Uwe Ligges, \email{ligges@statistik.tu-dortmund.de}}
\seealso{to get the input: \code{\link{noteFromFF}}, 
    for plotting: \code{\link{quantplot}}, 
    for further processing: \code{\link{lilyinput}},
    to get notenames: \code{\link{notenames}};
    for an example, see the help in \link{tuneR}.}
\keyword{utilities}
\concept{quantization}
\concept{bin}
\concept{bar}
\concept{note}
back to top