OSX/MIDI cont'd

Jay Hardesty jayh at panix.com
Mon Jul 15 16:50:24 UTC 2002


After much patient and valuable help from John McIntosh
on building Carbon-VM's within ProjectBuilder, I've
been able to get a good(?)  toehold on mapping
MIDI output from Carbon-Squeak through the new
MacOS 10 CoreMIDI frameworks.

So far unbuffered output seems to work, mapping
the previous notion of MIDI ports to the CoreMIDI structure
of "Devices" and "Destinations".   This means I can
independently address MIDI channels on each of the
4 ports on my MIDiSport 4x4 interface as well as virtual
MIDI destinations such as CoreMIDI-aware softsynths
(VSamp for instance).    In the current scheme of things
this requires having a separate instance of SimpleMIDIPort
for each MIDI destination.  Seems like one way to proceed
would be to broaden the definition of SimpleMIDIPort
to have that extra degree of freedom in addressing multiple
destinations.  But I'm assuming it would probably be better
to leave SimpleMIDIPort unmolested (to prevent breaking
existing code - and to avoid causing problems for anyone
working in an environment that don't support multiple MIDI
ports)?

Another alternative might be to broaden the SimpleMIDIPort
abstraction, but have it default to using a single MIDI port
as ouput if that's all that's available.   Or I could just create
an alternative (OSX)MIDIPort class and plugin that can just
be maintained separate from the Squeak VM and image,
as the Stephen Pope's SirenMIDI OMS-based code is for
OS9-based Squeak.

Anyway within my limited time constraints (and pretty limited
knowledge of low-level ways of MIDI, timing, etc) I'm happy to
try to flesh out as much of the higher-level mapping of Squeak
to OSX MIDI functionality as possible into whatever
form people would find most helpful and least disruptive.
(One question I have is: are multiport MIDI interfaces/drivers
now the norm also for Linux, Windows, [and of course Cray]
users? If not then I suppose I definitely shouldn't mess with
SimpleMIDIPort itself.)

BTW, I haven't really addressed MIDI input yet - this will
require a little more self-education on my part (semaphores
were used in the SirenMIDI code for instance).  Hopefully
if I can get some of the more obvious work done then some
of the more experienced MIDI programmers can flesh out
the finer points. (John McIntosh and John Maloney have
already offered very useful and supportive advice).

Thanks for any opinions, pointers, interest, etc,
Jay

P.S. would the main Squeak list prefer this discussion be
confined to the SqueakAudio list?  It's just that there doesn't
seem to be a lot of traffic on SqueakAudio lately...




More information about the Squeak-dev mailing list