lib/measures.js
function measures (meter, measures, builder) {
  var list
  var mLen = measureLength(meter)
  if (!mLen) throw Error('Not valid meter: ' + meter)

  var seq = []
  builder = builder || score.note
  splitMeasures(measures).forEach(function (measure) {
    measure = measure.trim()
    if (measure.length > 0) {
      list = parenthesize(tokenize(measure), [])
      processList(seq, list, measureLength(meter), builder)
    }
  })
  return score.seq(seq)
}
function measures (meter, measures, builder) {
  var list
  var mLen = measureLength(meter)
  if (!mLen) throw Error('Not valid meter: ' + meter)

  var seq = []
  builder = builder || score.note
  splitMeasures(measures).forEach(function (measure) {
    measure = measure.trim()
    if (measure.length > 0) {
      list = parenthesize(tokenize(measure), [])
      processList(seq, list, measureLength(meter), builder)
    }
  })
  return score.seq(seq)
}
function measures ( meter , measures , builder ) { var list var mLen = measureLength ( meter ) if ( ! mLen ) throw Error ( 'Not valid meter: ' + meter ) var seq = [ ] builder = builder || score . note splitMeasures ( measures ) . forEach ( function ( measure ) { measure = measure . trim ( ) if ( measure . length > 0 ) { list = parenthesize ( tokenize ( measure ) , [ ] ) processList ( seq , list , measureLength ( meter ) , builder ) } } ) return score . seq ( seq ) }
Parse masures using a time meter to get a sequence

@param {String} meter - the time meter
@param {String} measures - the measures string
@param {Function} builder - (Optional) the function used to build the notes
@return {Score} the score object

@example
measures('4/4', 'c d (e f) | g | (a b c) d')
Parse masures using a time meter to get a sequence