• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting Instruments For Groups > 15?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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, &noteInstanceID, offset, &noteParams);
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


  • Follow-Ups:
    • Re: Setting Instruments For Groups > 15?
      • From: William Stewart <email@hidden>
References: 
 >Setting Instruments For Groups > 15? (From: Edward Hynes <email@hidden>)

  • Prev by Date: Re: Issues in ExtAudioFileSeek and ExtAudioFileTell
  • Next by Date: Re: Calling ExtAudioFileDispose() on a large MP4 audio file causes a crash
  • Previous by thread: Setting Instruments For Groups > 15?
  • Next by thread: Re: Setting Instruments For Groups > 15?
  • Index(es):
    • Date
    • Thread