[CM] midi-msgs

daniel mayer herbstmondwind@web.de
Tue, 27 Jan 2004 21:13:42 +0100


"Rick Taube" <taube@uiuc.edu> schrieb am 27.01.04 13:49:20:

>In the example above, are you outputting to
>Midishare?? If so, please do (setq *dbg* t) and send me the trace output.

Hi, 

under OS9/cm-2.4.1/midishare

(defprocess dim-test-1 (chan dur amp-1 amp-2 steps)
  (process with amp-val 
           with step-time = (/ dur steps 1.0)
           for i to steps do
           (setf amp-val (round (interpl (now) (list 0 amp-1 dur amp-2))))
           (if (= i 0)
               (output (new midi 
                         time (now)
                         channel chan
                         duration dur
                         amplitude amp-1))
               (output (new midimsg  
                         msg (make-control-change chan 7 amp-val)
                         time (now))))
           (wait step-time)))


(setf *dbg* t)

(events (dim-test-1 0 2 90 0 20) "midi.port")

;prints out


(:SENT-> 3 0 0 60 90 2000 6210146 6210146 0) 
"midi.port"


;---------------------

But You are right, the stored file produced by

(events  (dim-test-1 0 2 90 0 20) "dim-test.midi")


is ok. Sorry, I thought something was wrong with the times
of the midi-msgs. I expected midi-msg time specifications in the output
of midi-print-file and a row of midi-msg events as output of

(subobjects (import-events "dim-test.midi"))

but there is just:

(#i(midimsg time 0.0 msg 10368 data #(3 15 66 64)) 
#i(midi time 0.0 keynum 60 duration 2.0 amplitude 0.7086614173228346 channel 0))


But playing "dim-test.midi" (e.g. via midi-file-play in 2.3.4) 
shows that it works. 
So the further questions arising:
Is s there a play-midi-file for OS-9 in 2.4.1,
is it possible to reimport the midi-msgs from a midi file
and is there a function for interrupting
real-time-midi-output (like 'hush' in 2.3.4)?

Thanks, Best Regards 

Daniel

______________________________________________________________________________<br>Erdbeben im Iran: Zehntausende Kinder brauchen Hilfe. UNICEF hilft den<br>Kindern - helfen Sie mit! https://www.unicef.de/spe/spe_03.php