Scala Sampler for Functional Soundscapes
summary
A web-based sampler built on the Sounds of Scala library plays repitched samples across a scale using Scala.js and Typelevel Cats compiled from Scala 3, with IO monads wrapping the two impure operations (loading and playback). It stores an one-octave sample set, orders samples by frequency and uses a binary search to pick the closest sample, computes playbackRate ratios for repitching, and demonstrates a working live composition using a Pascal's triangle arpeggiator to generate melodic patterns.
AI-written summary · about
chapters (18)
- 0:00Scala Sampler project
- 1:05Introduction
- 2:26Why Scala for soundscapes
- 3:54Talk goals
- 4:42What is a sampler
- 6:53Sounds of Scala library
- 8:19Sampler design for notes
- 9:23Pitch mathematical structure
- 13:38Repitching samples
- 16:26Sample repitching challenges
- 17:29Binary search for closest frequency
- 18:34Impurity in audio playback
- 19:19Functional programming for melody
- 20:03Arpeggiator from chords
- 21:29Melody from scales
- 23:39Refining rhythm and rests
- 24:42Combining arpeggiators
- 25:26Conclusion and future
related talks
27mScala Sampler for Functional Soundscapes
32mScala, Sound, and Structure - Composing Music through FP
42mSounds of Structure - Music Modelling with ADT's
45mSongwriting in Scala: Creating a DSL for writing Music with ADT's
40mScala and Arpeggio - Audio processing with Scala Native and FS2
10mGenerative Design with Scala.js
16mDemo: Functional Sound Design
17mParticipatory musical improvisations with Playsound.space
