 
     # Time delta calculations
     now = clock()
-    timeStep = now - previousNow
-    previousNow = now
 
     # Global spin update
-    spinAngle = (spinAngle + timeStep * spinRate) % (Math.PI * 2)
+    spinAngle = (spinAngle + timestepSize * spinRate) % (Math.PI * 2)
 
     # Launch new particles for all active notes
     for key, note of particleNotes

particleLifetime = 1.0
brightness = 1.0
spinRate = 1.0
origin = [0, 0, 0]

# Physics
numTimesteps = 20
gain = 0.005

previousNow = 0
spinAngle = 0

        # Intensity mapped to velocity, nonlinear
        p.intensity = Math.pow(p.note.velocity / 100, 2.0) * 0.2 * brightness

        # Fade with age
        noteAge = now - p.note.timestamp
        p.intensity *= Math.max(0, 1 - (noteAge / noteSustain))

        # Falloff gets sharper as the note gets higher
        p.falloff = 15 * Math.pow(2, (p.note.key - 60) / 6)

        # Add influence of LFOs
        for key, note of lfoNotes
            lfoAge = now - note.timestamp
            hz = midiToHz key
            lfoAngle = midiToAngle key

            # Amplitude starts with left hand velocity
            wobbleAmp = Math.pow(note.velocity / 100, 2.0) * wobbleAmount

            # Scale based on particle fuzziness
            wobbleAmp /= p.falloff

            # Fade over time
            wobbleAmp /= 1 + lfoAge

            # Wobble
            wobbleAmp *= Math.sin(p.life * Math.pow(3, (p.note.key - 35) / 12.0))
