Skip to content

Commit

Permalink
Removed tempo.
Browse files Browse the repository at this point in the history
  • Loading branch information
airportyh committed Mar 14, 2012
1 parent 2abbb5d commit 52ae191
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions song.js
@@ -1,5 +1,5 @@
!function(){
var processEvents = function(orgEvents, tempo){
var processEvents = function(orgEvents){
var audio = new Audio()
, sampleRate = 44100
, currentNotes = []
Expand All @@ -24,7 +24,7 @@
var event = events[0]
if (!event) break
var note = event[1]
, eventPos = event[0] / (tempo / 60) / 3 * sampleRate
, eventPos = event[0] / 3 * sampleRate
, idx
if (eventPos <= (eOffset + currWritePos)){
if (-1 !== (idx = currentNotes.indexOf(note)))
Expand Down Expand Up @@ -110,5 +110,5 @@
genEvents(notes, events)
genChordEvents(chords, events)
events = events.sort(function(a, b){return a[0] - b[0]})
processEvents(events, 60)
processEvents(events)
}()

0 comments on commit 52ae191

Please sign in to comment.