Re: Setting Instruments For Groups > 15?
Re: Setting Instruments For Groups > 15?
- Subject: Re: Setting Instruments For Groups > 15?
- From: William Stewart <email@hidden>
- Date: Mon, 16 Nov 2009 15:16:13 -0800
We don't really do this and we've deprecated the functionality (as we
describe below)
Due to the main compatibility with MIDI that we maintain with the DLS
synth, it is not really feasible to do what you are doing at this
point with the same instance. So, if you need to address more patches
than the 16 allowed with MIDI you can just create an other instance of
the DLS synth - it can point to the same DLS file (and we optimise
around loading samples across multiple instances, so the overhead is
not substantial).
Bill
On Nov 16, 2009, at 6:11 AM, Edward Hynes wrote:
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
_______________________________________________
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