code: function(beatInd) {
    var currentTime = context.currentTime
      , currentBar = Math.floor(currentTime / barDur)
      , currentBeat = Math.round(currentTime % barDur)
    if (currentBeat < beatInd) return currentBar * barDur + beatInd * beatDur
    else return (currentBar + 1) * barDur + beatInd * beatDur
  }
docs: ---------- Just some helpers ---------- // This helper calculates the absolute time of the upcoming `beatInd`.