Audio Programming with Go
summary
Built a small audio library in pure Go Standard Library that generates oscillators (sine, square, triangle, saw), converts note names to frequencies using equal temperament with A=440, and writes playable WAV files. It uses common sample rates like 44,100 samples/sec (and up to 96,000), implements a per-sample oscillator tick, and applies an ADSR envelope so chained notes sound natural. Example output is a rendered melody (Brother Jacob), demonstrating the code works.
AI-written summary · about
chapters (20)
- 0:00Intro
- 0:14whoamigo
- 0:28GoAudio
- 1:34How do computers create sound?
- 2:22Generating Sine Waves
- 4:08Important concepts
- 6:36The 'hearing test
- 7:25Oscillators
- 8:47Oscillator basics
- 9:43Making it tick
- 10:57Adding some waveform functions
- 11:46Using the Oscillator
- 13:14Different Waveforms
- 13:43Problems with current implementation
- 14:14Musical Scale
- 15:22Calculating Frequencies
- 16:59ADSR
- 18:53Chaining it all together
- 22:03Some great books!
- 22:40The end!








