[CM] about output to cmn file
Rick Taube
taube@uiuc.edu
Wed, 12 May 2004 09:33:06 -0500
with anders' permission ill add his 'cmn-data' class to the system as a
replacement for the old 'cmn' object
but i think this example statement:
(new cmn-data time (now) data (meter 4 4))
should be
(new cmn-data time (now) data '(meter 4 4))
that is, the meter expr should be quoted as data so that cm can eval it
in the context of the cmn package
another approach might be to define object->cmn methods for the common
(and new) midi classes that currently exist in the 2.5 cvs branch:
midi-time-signature, midi-text-event, midi-key-signature,
midi-tempo-change and so on. that way you could also include this data
into .midi files for listening or for importing into a notation
program.
> The most flexible way, giving you access to whatever
> cmn-manuscripting you might want from CM, is to define a
> 'cmn-data object and letting it pass your meter-change to cmn.
> Fex:
>
> (defobject cmn-data ()
> ((time :accessor object-time)
> (staff :initform 0)
> (data :initform nil)))
>
> (defmethod object->cmn (cmn-data)
> (list (cmn-data-staff cmn-data)
> (cmn-data-data cmn-data)))
>
> (defmethod object->midi (cmn-data) nil)
>
> Giving access to statements like
>
> (new cmn-data time (now) data (meter 4 4))
>
> or whatever in a cm-process.
>
> This will let you state the following process in CM:
>
> (defprocess xy ()
> (process repeat 80
> for counter from 0
> with notes = (new heap :of '(0 1 2 3 4 5 6 7 8))
> and keys = (new heap :of '(c-major cs-major d-major))
> do
> (progn (when (zerop counter)
> (output
> (new cmn-data time (now) data (list 'meter 4
> 4))))
> (progn (when (zerop (random 20))
> (output (new cmn-data time (now) data
> (list 'meter (between 1 7) 4))))
> (when (zerop (random 20))
> (output (new cmn-data time (now) data
> (next keys))))))
> output (new midi time (now) duration .25
> keynum (note (+ 55 (next notes))))
>
> wait .25))
>
> -and have everything rendered directly out by cmn:
>
> (events (xy) "xy2.cmn" :size 20)
>
> -anders
>
>
>
>> But, I'd like to output (display) meterchange into certain
>> staff into cmn-file (every time i call my process-function
>> to output events of next phrase) Is there something for
>> this task ?? (set-meter ...)?? I'm using cmucl-cm-clm-cmn
>> combination.
>
>> Thanks, Ville Isomöttönen
>
>
>> _______________________________________________ Cmdist
>> mailing list Cmdist@ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist