;;; -*- Syntax: Common-Lisp; Package: COMMON-MUSIC; Base: 10; Mode: Lisp -*- ;;; Wavetable database example using the loop macro to spawn algorithms. (in-package :stella) (in-syntax :mk t) (defparameter *header* (header "envelope marcato = [(0,0)(.1,1,2)(.2,.1)|(.3,0.0)]; envelope smooth = [(0,0)(.1,1)|(.3,0.0)];" )) (open-cmd (concatenate 'string "test.score header \"" *header* "\"")) ;;; create a merge container named `x' containing three algorithms playing ;;; the DBWave1vi SynthPatch, using "factory" Soprano waveTables ;;; loop variables are used to specify differences between the voices (merge x () (loop for w in '("SA" "SI" "SU") ; specify waveform for n in '(alg1 alg2 alg3) ; algorithm name as p from 0 ; location for ts in '(1.0 1.03 1.06) ; tempo modification do (let ((timbre w) (tempo-scale ts) (pan p)) (algorithm (name n) DBWave1vi (length 20 duration .25 sVibAmp .01 bearing (- (* (mod pan 3) 45) 45) waveform (quotify timbre) rVibAmp .006 ) (setf rhythm (* tempo-scale(item (items .5 .25 .75 .5))) freq (item (pitches d4 e f g a bf d5 e)) ampEnv (if (< rhythm .3) "marcato" "smooth") svibFreq (+ 4 (random 1.0))) )))) (stella:stella)