What's Next?

Congratulations

You have completed all 15 lessons of Music Programming. You can now convert between MIDI and frequencies, name notes, build scales and chords, transpose progressions, schedule melodies with precise timing, apply gain in decibels, modulate parameters with an LFO, and build a 16-step drum machine — all with the Web Audio API.

What to Explore Next

  • Tone.js — A higher-level audio framework built on the Web Audio API. Provides Transport, Sequencer, and a large library of synthesis and effects nodes
  • Web MIDI API — Connect a real MIDI keyboard and route its input to your Web Audio synthesis code
  • AudioWorklet — Run custom DSP code on the audio thread for custom oscillators, convolution reverb, and spectral processing
  • SuperCollider — The server-client audio synthesis language used by electronic musicians worldwide

Key Formulas

ConceptFormula
MIDI to frequency440 × 2^((n − 69) / 12)
Frequency to MIDIround(69 + 12 × log₂(f / 440))
Interval ratio2^(semitones / 12)
Beat duration60 / bpm
Note duration60 / bpm × (4 / noteType)
dB to gain10^(dB / 20)
Gain to dB20 × log₁₀(gain)
LFOdepth × sin(2π × rate × t)

References

← Previous