Standard Builtin
(use std/builtin)builtin/slew!
Section titled “builtin/slew!”Smooths the input signal using a lowpass filter.
intime, slew time, in seconds
(b-lowpass! :in in :q 0.2 :freq (/ 5.0 (* (* 2 PI) time)))builtin/pitch-shift!
Section titled “builtin/pitch-shift!”Modifies the pitch of the input signal using granular synthesis.
intarget-pitch, pitch difference, in semitones, between dry and wet signalgrain-size, grain size, in milliseconds
(* 0.1 (grains! :size grain-size :density (/ (* 10.0 1000.0) grain-size) :speed (exp2 (/ target-pitch 12.0)) :position (< target-pitch 0.0) :in in))builtin/comb!
Section titled “builtin/comb!”Adds a delay to the dry signal.
indelay, delay, in seconds, between dry and wet signaldepth, mix, in range [0; 1], between the dry and wet signalpolarity, sets the sign of the wet signal
(+ (* in (- 1 (* 0.5 depth))) (* (* polarity (delay! in delay)) (* 0.5 depth)))builtin/fm!
Section titled “builtin/fm!”FM synthesis
carrier-freq, carrier frequency, in hertzmod-freq, modulator frequency, in hertzmod-index, modulation index
(sine! (+ carrier-freq (* (* mod-freq mod-index) (sine! mod-freq))))