   recorder = audioContext.createScriptProcessor(bufferSize, 2, 2)
   recorder.onaudioprocess = (e) ->
     left = e.inputBuffer.getChannelData(0)
-    drawWave(left)
     hz = Pitcher.pitch(left, audioContext.sampleRate)
+    note = new Note(hz)
+    drawWave(left, note)
     return unless hz >= 30
-    note = new Note(hz)
     hzElement.innerHTML = 'hz = ' + hz
     noteElement.innerHTML = 'note = ' + note.name()
 

    b: 200
    a: 255

  width = imageData.width
  height = imageData.height

  for x in [0...width]
    y = Math.floor(height/2+buffer[x*2]*height)
    setPixel imageData, x, y, color

  canvasContext.putImageData imageData, 0, 0


  data[index + 2] = color.b unless isNaN(color.b)
  data[index + 3] = color.a unless isNaN(color.a)

drawWave = (buffer, note) ->
  canvasContext.save()
  canvasContext.fillStyle = "rgb(30, 30, 30)"
  canvasContext.fillRect 0, 0, canvas.width, canvas.height
