The document discusses digital signal processing and audio synthesis in ReasonML. It covers key concepts like sample rate, buffer size, oscillators, envelopes, and common effects like bitcrushing and delay. Code examples are provided to generate waveforms from oscillators and envelopes, as well as process audio through a bitcrusher and delay effect. The goal is to teach the fundamentals of digital audio and demonstrate how to create and manipulate sound programmatically using ReasonML.
9. The number of samples (data points) of audio per second
The granularity/resolution of your signal
44.1kHz / 44100Hz = 44100 samples per second
Sample Rate
11. The number of samples for sound card to process at one
time
Bu鍖er === too small, computer cant 鍖ll the bu鍖ers fast
enough, get glitching
Bu鍖er === too big, can experience latency in real time
performance (i.e: pressing a key on a MIDI keyboard)
Buffer Size
43. Attack - Initial ramp up of amplitude after Note On
Decay - Initial step down of amplitude
Sustain - Holds amplitude steady
Release - How long it takes for the amplitude to fade
out after Note O鍖
59. A bitcrusher is a combination of adjust bit depth and
downsampling
Bit depth - resolution of our waves
Downsampling - reducing the sample rate
Bitcrusher