R/scorePreprocessor.csound.R

##' Score preprocessing for shape 'csound'
##'
##' This does preprocessing for shape 'csound'. All this does is
##' return the score with attribute 'length' added.
##' 
##' @keywords internal
##' @method scorePreprocessor csound
##' @inheritParams scorePreprocessor
##' @return A sonlayer score with the transformations described in the 'Description' field
scorePreprocessor.csound <- function(sonlayerscore) {

  attr(sonlayerscore, "length") <- max(rowSums(sonlayerscore[,c("start", "dur")])) # length in seconds

  return(sonlayerscore)
}

Try the playitbyr package in your browser

Any scripts or data that you put into this service are public.

playitbyr documentation built on May 2, 2019, 6:08 p.m.