Setting Instruments For Groups > 15?
Setting Instruments For Groups > 15?
- Subject: Setting Instruments For Groups > 15?
- From: Edward Hynes <email@hidden>
- Date: Thu, 12 Nov 2009 09:17:16 -0500
MusicDeviceMIDIEvent works for setting the instrument of groups with
valid MIDI channels numbers, but how does one set the instrument of
groups with higher ids? Below is a snippet of my naive effort to do
so after hunting through the documentation, but the instrument played
is still the default piano.
UInt32 programChange = 0xC0;
MusicDeviceGroupID groupID = 16;
Float32 instrument = 74;
UInt32 offset = 0;
result = AudioUnitSetParameter(musicDevice, programChange,
kAudioUnitScope_Group, groupID, instrument, offset);
result = MusicDeviceStartNote(musicDevice, kMusicNoteEvent_Unused,
groupID, ¬eInstanceID, offset, ¬eParams);
sleep(1);
result = MusicDeviceStopNote(musicDevice, groupID, noteInstanceID,
offset);
The result from each call comes back as 'no error', so the system
seems to be accepting the calls, but the instrument remains the
default piano. What's the correct way to set instruments (and other
parameters) for groups outside the range of MIDI channels?
Thanks,
Ed
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden