lib/score.js
function transform (nt, st, pt, ctx, obj) {
  switch (arguments.length) {
    case 0: return transform
    case 1:
    case 2:
    case 3: return transformer(nt, st, pt)
    case 4: return function (o) { return transformer(nt, st, pt)(ctx, o) }
    default: return transformer(nt, st, pt)(ctx, obj)
  }
}
function transform (nt, st, pt, ctx, obj) {
  switch (arguments.length) {
    case 0: return transform
    case 1:
    case 2:
    case 3: return transformer(nt, st, pt)
    case 4: return function (o) { return transformer(nt, st, pt)(ctx, o) }
    default: return transformer(nt, st, pt)(ctx, obj)
  }
}
function transform ( nt , st , pt , ctx , obj ) { switch ( arguments . length ) { case 0 : return transform case 1 : case 2 : case 3 : return transformer ( nt , st , pt ) case 4 : return function ( o ) { return transformer ( nt , st , pt ) ( ctx , o ) } default : return transformer ( nt , st , pt ) ( ctx , obj ) } }
Transform a musical structure

This is probably the most important function. It allows complex
transformations of musical structures using three functions

@param {Function} elTransform - element transform function
@param {Function} seqTransform - sequential structure transform function
@param {Function} parTransform - simultaneous structure transform function
@param {*} ctx - an additional object passed to transform functions
@param {Object} score - the score to transform
@return {*} the result of the transformation
Transform a musical structure