Music 220b: Lecture Notes 8
<cl> (setf list-of-integers (list 1 2 3 4 5)) (1 2 3 4 5) <cl> (defun plus-10 (x) (+ x 10)) PLUS-10 <cl> (map 'list #'plus-10 list-of-integers) ; <output-type> #<map-function> <list-to-map-over> (11 12 13 14 15)In Stella, map is used to access and change parameter values in a thread. Here, first a thread is made and then its contents listed:
(thread plucktest () (doitems (p (pitches c4 d e fs gs a c5 in random for 3)) (object pluck freq p rhythm .1))) Plucktest: 1. #<pluck 0.1 0.1 freq:329.6276 2. #<pluck 0.1 0.1 freq:329.6276 3. #<pluck 0.1 0.1 freq:523.2511; Now divide the rhythms by 3 with this command:
map plucktest set rhythm (/ $rhythm 3) ; $ preceeds a parameter being accessed Plucktest: 1. #<pluck 0.033333335 0.033333335 freq:329.6276 2. #<pluck 0.033333335 0.033333335 freq:523.2511 3. #<pluck 0.033333335 0.033333335 freq:329.6276See the Stella manual, chapter 9, for the full command set that applies to map.
sndplay /zap/test.sndalso plays a sound.
To close the MIDI Listener stream, you must be in syntax MIDI and issue the close command.
mixsound-singletrack.lisp creates a scorefile that mixes several sounds from the /NextLibrary/Sounds when sent to mixsounds. The commands to mix and play are shown at the end of the file (beware, it does not get played by ScorePlayer).
mixsounds-printer-hell.lisp sounds like its name. It needs to be executed in 2 passes: first pass demonstrates writing data of an fm synthesis scorefile to a sound file. The second pass mixes that file with recorded sounds.
|©1995 Fernando Lopez-Lezcano. All Rights Reserved.|