Re: Setting Instruments For Groups > 15?
Re: Setting Instruments For Groups > 15?
- Subject: Re: Setting Instruments For Groups > 15?
- From: Edward Hynes <email@hidden>
- Date: Mon, 16 Nov 2009 09:11:23 -0500
I'm still trying to assign instruments to groupIDs greater than 15.
Am I mistaken in thinking this is possible? Is it possible, but just
not with the DLSSynth?
I've been able to specify instruments on a note-by-note basis using
MusicDeviceStartNote and the instrument parameter, but the
MusicDevice.h file states that:
MusicDeviceStartNote's inInstrument parameter should be set to
kMusicNoteEvent_Unused.
The instrument on a given group is set using either the
patch/bank semantics of MIDI or the assignment of a Part to a
given group ID.
MIDI patch/bank semantics won't work here, so are Parts the way to
go? If so, how does one use them with the DSLSynth? I haven't been
able to find any documentation or examples of how to do this.
Thanks,
Ed
On Nov 12, 2009, at 9:17 AM, Edward Hynes wrote:
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
--
Edward Hynes
Dharma Gaia LLC
"Software with the Earth in Mind"
http://dharmagaia.com
_______________________________________________
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