Re: MusicDevice instrument IDs and MIDI instrument selection?
Re: MusicDevice instrument IDs and MIDI instrument selection?
- Subject: Re: MusicDevice instrument IDs and MIDI instrument selection?
- From: Bill Stewart <email@hidden>
- Date: Wed, 04 Sep 2002 19:23:59 -0700
Indeed
And a subtle but very useful distinction should be understood between the
prepare inst API and a program change in MIDI
The prepare instrument API call does NOT set that instrument sound, but
tells the software synth to go and prepare that instrument to be used.
Then, when you start the note you specify the instrument to use. And if
you've prepared it you shouldn't have any delays involved or extra overhead
(cpu or disk). This is very useful...
A patch change MIDI message will select the instrument for that channel of
course, and if that instrument hasn't been prepared, it gets prepared at
that point.
Bill
on 9/3/02 7:36 PM, Pete Yandell wrote:
>
Found the answer to my own question. In MusicDevice.h:
>
>
The InstrumentID that is passed in to PrepareInstrument can be
>
encoded in a manner that allows instruments to be
>
read from MIDI based sample collections (which both DLS and
>
SoundFont formats are)
>
In that case, the ID is formatted as:
>
0xMMLLPP
>
MM is the MSB of a bank select control change message (range
>
0->127 when shifted down)
>
LL is the LSB of a bank select control change message (range
>
0->127 when shifted down)
>
PP is the 0->127 value of a program change message
>
>
On Tuesday, September 3, 2002, at 10:33 PM, Pete Yandell wrote:
>
>
> Is there any sort of official interface for mapping between
>
> MusicDevice instrument IDs and the MIDI bank and instrument selection
>
> values that correspond to them?
>
>
>
> I reverse engineered the way this worked in 10.1, but now my code
>
> seems to be a little off under 10.2. Rather than reverse engineer it
>
> a second time, I'd like be able to do it properly.
>
>
>
> Pete Yandell
>
> http://pete.yandell.com/
>
> _______________________________________________
>
> coreaudio-api mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
> Do not post admin requests to the list. They will be ignored.
>
>
>
>
>
Pete Yandell
>
http://pete.yandell.com/
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"...Been havin' some trouble lately in the sausage business," C.M.O.T.
Dibbler replied.
"What, having trouble making both ends meat?"
__________________________________________________________________________
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.