Demo
Pitch Shifter
Built it end to end
Playback and the game run in the browser. Only “Download HQ” calls the API, which runs on a free Azure plan and can take about 20 seconds to wake up.
Stack



The player 
Picking a difficulty 
A round result
What the demo does
Two knobs change the tempo, from 50% to 125%, and the pitch, from −12 to +12 semitones. The sound follows the knob while it moves, and presets such as “Practice” or “Giant” set both in one click.
The page draws the original and processed waveforms, colored by frequency on a five-octave scale, so a pitch shift visibly recolors the processed one. A live spectrum runs while the audio plays. The sample track is “Commercial” by Sub_Clair, used under the Pixabay Content License.
Pitch Match
A five-round game: hear a note, then turn the knob until yours matches it.
- Easy and Medium use the notes of the scale. Easy lets you replay the target; Medium plays it once.
- Hard targets any frequency, plays it once and briefly, and scores to the cent.
- It has synthesized voices, a best score per difficulty and full keyboard play.
How it works
- Pitch shifting runs in an AudioWorklet with a granular shifter written for this project: two overlapping grains read a circular buffer. The core is plain TypeScript, unit-tested on synthetic signals.
- Tempo uses the media element’s playback rate with pitch preservation, so it changes without a request.
- The spectrum, waveforms and confetti are drawn on Canvas. The app is Angular 22 with signals and zoneless change detection, and the game loads as a separate lazy chunk.
- The knob is a custom accessible slider, with drag, wheel and keyboard control.
- “Download HQ” is the one server feature: an ASP.NET Core minimal API on .NET 8 processes the track with SoundTouch and streams it as MP3, encoded with LAME, while it’s still encoding.
Deployment and checks
- Azure Static Web Apps hosts the frontend. The API runs on an App Service free plan.
- CI in GitHub Actions builds and tests the .NET and Angular code and runs a Docker Compose smoke test.
- A scheduled check of the live demo runs every 6 hours.
- Tests: xUnit on the API, Karma and Jasmine on the frontend. The code is MIT licensed.
Where music comes in
I’ve been a musician since childhood and I have a grounding in audio theory. I’ve explored modular synthesis in VCV Rack and tried writing my own modules in C++.
I’m not a DSP engineer. The live shifter is a compact granular design, and the high-quality download relies on SoundTouch.