AtlatestRenderedmarkdown
Readme
sigil-dsp
DSP primitives for Sigil via vendored SoundPipe.
Modules
(sigil dsp core)-- DSP engine lifecycle, function tables(sigil dsp osc)-- Oscillators: sine, saw, square, triangle, FM, phasor(sigil dsp filter)-- Filters: Moog ladder, Butterworth, resonant LP, DC block(sigil dsp env)-- Envelopes: ADSR, triggered, line, exponential, portamento(sigil dsp fx)-- Effects: stereo reverb (revsc, zitarev), delay, variable delay(sigil dsp noise)-- Noise: white, pink, brown(sigil dsp util)-- Panning, dynamics, timing, random modulation, scaling, WAV output
Usage
(import (sigil dsp core)
(sigil dsp osc)
(sigil dsp filter))
(dsp-init 44100)
;; Create a 440Hz sine oscillator
(define osc (make-osc 440.0 1.0))
;; Or use the convenience constructor
(define saw (make-oscillator 'saw 220.0 0.8))
;; Create a lowpass filter
(define filt (make-moogladder 1000.0 0.4))
;; Per-sample processing
(let ((sample (osc-compute osc)))
(filter-compute filt sample))
(dsp-shutdown)Building
sigil deps install
sigil buildTesting
The test entry point exercises all module categories:
# Add entry: '(sigil dsp test-main) to package.sgl, then:
sigil build --force
sigil runLicense
MIT (SoundPipe) / BSD-3-Clause (sigil-dsp bindings)