[CM] CM + SC rts

Rick Taube taube@uiuc.edu
Sat, 31 Mar 2007 16:38:31 -0500


>
> Would it be possible to combine CM control of MIDI output and SC  
> realtime (or near realtime)?
>
> (progn
>   (events (midi-simple 80 0.2 30 50 0.5) "midi-port.ms")
>   (sprout (sc-simple 80 0.2 500 1500 0.1)))
>
> To exchange information between the two actions:
> Is there a possibility to define them in one process?

yes, but dont mix (events) with (rts).
Assuming you have the connection streams in variables, ie:

(setq *sc* (sc-open))
(setq *qt* (midishare-open))

then you can have one process write to whatever rt streams you  have  
open using output's 'to' option:

(defun multi-fun ()
   (process ...
            OUTPUT (new midi ...) TO *qt*
            OUTPUT (new sc-simple ...) TO *sc*
            ...))

that is, process dont care about what streams are open, oly output does.

also, if you are using more than one stream its pribably best to open  
rts with NO default streeam and then handle the streams yourself  
using code like above

(rts NIL)


> Is double RTS (MIDI + SC stream) possible or necessary for this?
> SC in NRT mode means writing an OSC file (and then writing an audio  
> file),
> but is there a possibility of double NRTS:
> streaming MIDI + OSC output with a little latency?
> Would also be fine, thanks for any hint.

sorry not sure what you are asking here, but you should be able to  
open up multiple realtime streams (sc, portmidi, midihare etc)  and  
then have one process write to one or all of them.