Scala and Arpeggio - Audio processing with Scala Native and FS2
summary
Live Scala Native app called Arpeggio constructs a guitar pedalboard as composable FS2 pipes that run on an audio stream of floats (sampled ~4,100 Hz) and use PortAudio via SN bindings for I/O. Implementations include a gain/volume, symmetric hard clipping and a Clone‑style blend (clean + clipped signal), and a Schroeder reverb built from four parallel echo stages and two allpass stages. It runs with low latency on modern CPUs, reverb is CPU and GC sensitive over minutes, and the code is on GitHub.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:01Pedals on my board
- 5:26Sound and computer vision
- 7:11Infinite audio streams
- 9:01FS2 core concepts
- 11:04Audio interfaces with FS2
- 13:57Pedals as FS2 pipes
- 14:19Volume pedal in Scala
- 15:44Overdrive pedal history
- 17:55Clone Centaur pedal
- 21:51Splitting merging audio signals
- 24:05Schroeder reverb algorithm
- 26:55Delay lines without buffers
- 28:42Echo stages for reverb
- 30:06Live demos and thoughts
- 30:32Q&A
related talks
27mScala Sampler for Functional Soundscapes
27mScala Sampler for Functional Soundscapes
46mScala on the Move!
40mScala.js in production
21mChanging live audio with the web-audio-api
49mStream Away with Scala
42mSounds of Structure - Music Modelling with ADT's
14mTaming the Guitar AND Functional Programming!
