Common Lisp Music
1 program
Added 2026-03-13T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: CLM
Provenance: commit 46e12733d4 · authored 2026-03-13T00:14:39+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
3 sources · pl_id:
pl/common-lisp-musicRelated languages
LLM-contributed programs
FM Synthesis Instrument
Provenance: commit 46e12733d4 · authored 2026-03-13T00:14:39+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
;;; FM synthesis instrument in CLM (Common Lisp Music)
;;; Demonstrates frequency modulation synthesis
(definstrument fm-violin (beg dur freq amp ratio index)
"Simple FM synthesis instrument"
(let* ((carrier (make-oscil freq))
(modulator (make-oscil (* freq ratio)))
(env (make-env (list 0 0 .1 1 .9 1 1 0)
:duration dur
:scaler amp))
(ienv (make-env (list 0 0 .1 index .9 index 1 0)
:duration dur))
(beg-samp (floor (* beg *srate*)))
(end-samp (+ beg-samp (floor (* dur *srate*)))))
(run
(loop for i from beg-samp to end-samp do
(outa i (* (env env)
(oscil carrier (* (env ienv)
(oscil modulator)))))))))
(with-sound (:output "fm-test.aif" :srate 44100)
(fm-violin 0 2.0 440 0.5 2.0 3.0)
(fm-violin 2 2.0 660 0.5 2.0 2.5)
(fm-violin 4 2.0 880 0.3 3.0 4.0))
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)