[CM] Re: update re: CM/Linux/MidiShare

Dave Phillips dlphillips@woh.rr.com
Mon, 28 Mar 2005 08:47:36 -0500

Hi Rick:

  Okay, thanks for the clarification. However, the example below is 
quoted from the CM dictionary MIDI topic page (Example 4). If I 
understand correctly, this code will work with a sprout call only under 
OSX/OpenMCL, yes ? You do make that clear, I think I just didn't want to 
believe it. ;-)

  The MidiShare system is great for realtime MIDI output from CM, it 
works very well with the high-level objects. However, I still have some 
questions: How do I stop a realtime stream before it's ended ? How is 
the MS MidiPlayer used, or can it be used at all under Linux ?

  I'll post a separate message with some example code for anyone wanting 
to test realtime MIDI output with CM + MidiShare + Linux. Meanwhile I'm 
pretty happy with CM's realtime MIDI performance. It would be great to 
be able to start/stop/pause/continue a realtime stream, do you think 
that's a possibility when using high-level objects ?

  Btw, Csound is also capable of realtime MIDI output. I coded some CM 
examples that prepared Csound scores for realtime MIDI out, they worked 
perfectly from within CM (i.e., the cmio GUI).

  Considering MidiShare's capabilities, it would be great to see more 
extensive support for it. Time-code support is one of it's more 
interesting features, it would be interesting to place CM in a 
time-sync'd applications environment, but I think at this point I'm 
dreaming out loud. :)

  Thanks again for the help!



Rick Taube wrote:

> Sorry, I should have had a second cup of coffee before responding this 
> morning. The error you got is not a bug.  I think the "high" and "low" 
> level is not made clear enough on the Midi topic page. Specifically, 
> ms:new makes "alien" c objects that are not part of Lisp's type system 
> and so they cannot be hooked into the high-level event handling.  Put 
> another way, the only thing that can really use midishare allocated 
> things is midishare itself. So you can create them in Lisp and you can 
> also send/receive them directly to/from midishare but nothing else.
>> But it fails in this setting:
>> (define (rankeys)
>>   (process repeat 100
>>            output (ms:new typeNote :port 1
>>                                    :pitch (between 50 80)
>>                                    :vel (between 30 50)
>>                                    :dur (pick 100 200 300))
>>            wait (pick 100 200)))
>> ; (events (rankeys) "midi.port")
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist