Scala, Sound, and Structure - Composing Music through FP
summary
A web sampler called Sounds of Scala runs on ScalaJS/Scala 3 with Typelevel Cats and maps audio buffers to pitch keys, repitching by adjusting playbackRate using the 2^(steps/12) formula; a binary search picks the closest reference sample and impure browser calls are wrapped in IO monads. An arpeggiator composes melodies from Pascal's triangle, drum patterns use modulo 2, 3, and 5 for kick/hat/snare, and a Möbius strip inversion generates a working two‑voice canon.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:58Sampling history
- 4:34Sounds of Scala library
- 5:23Functional programming
- 6:44Acoustics and pitches
- 10:37Sampler implementation
- 15:25Arpeggiator concepts
- 18:57Pascal's triangle music
- 22:14Percussion and texture
- 25:19Evolving compositions
- 27:05Möbius canon
related talks
27mScala Sampler for Functional Soundscapes
27mScala Sampler for Functional Soundscapes
42mSounds of Structure - Music Modelling with ADT's
45mSongwriting in Scala: Creating a DSL for writing Music with ADT's
19mComposing music with composed functions
37mHow to code music?
46mScala on the Move!
40mScala.js in production
