[comp.sys.mac.programmer] MIDI Sound Manager

dlmnm@dcatla.UUCP (Michael N. Moran) (02/25/89)

Last nite i thought that i would try out the MIDI sound manager stuff
described in IM-V. After reading the chapter I was completely baffled
but decided to go for it using the LSC debugger to step through.

First step, i thought confidently is to see if i can open and close
a channel. Simple enough right...wrong...Openning the channel
goes smoothly, however, when i try to SndDisposeChannel(),
the system hangs. Here's the fragment:

SndChannelPtr	chan;
long		mchan;
OSErr		err;

chan = NIL;
mchan = 0;

err=SndNewChannel(&chan,9,mchan,NIL);	/* synth 9 is midi output synth */
err=SndDisposeChannel(chan,FALSE);

I'm sure it's something simple but...

BTW, the next step will be to pass MIDI data through the channel. Any
one know how this is done usning the SndDoCommand() calls? Specifically,
what is the command used and where is the midi data located in
the command record?

thanks,
    mike

System: Mac II running system 6.0.2 & MF