Re: [Bluemusic-users] blue and common-music(more)
Brought to you by:
kunstmusik
From: Steven Yi <ste...@gm...> - 2005-10-03 21:02:09
|
Hi Stephane, Thanks for sending this! I can't seem to get a version of common lisp running on Windows, and on Linux I have troubles for CM. Yikes! Do you mind if I add this example as external_commonMusic2.blue to the examples? Thanks! steven On 10/3/05, stephane boussuge <s_b...@ya...> wrote: > hi Steven and Ben > thanks to Ben for his help. > i use cm 2.x.x and i have made a very simple example > of score generation with cm 2 based on the file intro > in cm 2 and the code from Ben. > i join it if it can be useful for somebody... > (sorry, i'm a very newbie in cm and my code are very > bad :( > > bye > stf > > > > > > > > _________________________________________________________________________= __ > Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenge= r > T=E9l=E9chargez cette version sur http://fr.messenger.yahoo.com > > <blueData version=3D'0.99.8'> > <projectProperties> > <author>author</author> > <title></title> > <sampleRate>44100</sampleRate> > <ksmps>2</ksmps> > <channels>2</channels> > <commandLine>csound -odac1</commandLine> > <diskSampleRate>44100</diskSampleRate> > <diskKsmps>2</diskKsmps> > <diskChannels>2</diskChannels> > <diskCommandLine>csound </diskCommandLine> > <CsOptions></CsOptions> > <notes> -W -o D:\Nuendo\Urban\mel1.wav > > consound -W -oD:\Nuendo\Urban\bass_1_ctof.wav</notes> > </projectProperties> > <arrangement/> > <tables>;sine > f 1 0 16384 10 1 > > ;saw > f 2 0 256 7 0 128 1 0 -1 128 0 > ;pulse? > f 3 0 256 7 1 128 1 0 -1 128 -1 > </tables> > <soundObjectLibrary/> > <globalOrcSco> > <globalOrc>ga1 init 0 > ga2 init 0 > </globalOrc> > <globalSco></globalSco> > </globalOrcSco> > <opcodeList/> > <liveData> > <commandLine>csound -Wdo devaudio -L stdin</commandLine> > </liveData> > <soundObject type=3D'blue.soundObject.PolyObject'> > <subjectiveDuration>2.0</subjectiveDuration> > <startTime>0.0</startTime> > <name>root</name> > <backgroundColor>-10066279</backgroundColor> > <timeBehavior>0</timeBehavior> > <noteProcessorChain/> > <isRoot>true</isRoot> > <pixelSecond>64</pixelSecond> > <heightIndex>2</heightIndex> > <snapEnabled>false</snapEnabled> > <snapValue>1.0</snapValue> > <timeDisplay>0</timeDisplay> > <timeUnit>5</timeUnit> > <soundLayer name=3D'' muted=3D'false' solo=3D'false'> > <soundObject type=3D'blue.soundObject.External'> > <subjectiveDuration>15.296875</subjectiveDuration> > <startTime>0.0</startTime> > <name>external</name> > <backgroundColor>-12566464</backgroundColor> > <timeBehavior>2</timeBehavior> > <noteProcessorChain/> > <text>(load "/home/stf/bin/cm-2.6.0/src/cm.lisp") > (in-package :cm) > > > (defparameter *buflen* 4096); used to store file in print-stream function > > > (defobject simp () > ((ins :initform 'simp :accessor object-name) > (beg :accessor object-time) > (dur :initform 1) > (amp :initform .5) > (freq :initform 440)) > (:parameters beg dur amp freq)) > > ;; Now define a simple process that output simps... > > > > (define (simp-1 num) > (process repeat num > output (new simp > :beg (now) :dur 1 :amp .5 > :freq (between 220 440)) > wait (pick 0 1 2))) > > > > > > ;; Next we define a variant process that outputs simps > ;; with names picked randomly from a list. > > (define (simp-2 num names) > (process repeat num > output (new simp :beg (now) > :ins (and names (pickl names)) > :dur 1 :amp .5 > :freq (between 220 440)) > wait (pick 0 1 2))) > > (events (simp-2 20 '("i1" "i2" "i3")) = ; write to i1 i2 or i3 > "test.sco") > > > > > (defun print-stream (filename) > (let ((buffer (make-array *buflen*))) > (with-open-file (f filename :direction :input > :if-does-not-exist :error > ) > (do ((j 0))((=3D j (file-length f))) > (setf myline (read-line f t "eofeof")) > (if (string-equal myline "eofeof")(return)) > (princ myline) > (write-char #\Newline) > (setf j (+ j )) > ) > )) > ) > ; > ; > > ; > (print-stream "test.sco")</text> > <commandLine>clisp </commandLine> > </soundObject> > </soundLayer> > </soundObject> > <scratchPadData> > <isWordWrapEnabled>true</isWordWrapEnabled> > <scratchText/> > </scratchPadData> > <noteProcessorChainMap/> > <renderStartTime>0.0</renderStartTime> > <renderEndTime>-1.0</renderEndTime> > <markersList/> > <loopRendering>false</loopRendering> > </blueData> > > |