• 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
Setting Instruments For Groups > 15?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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, &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
  • Follow-Ups:
    • Re: Setting Instruments For Groups > 15?
      • From: Edward Hynes <email@hidden>
  • Prev by Date: Re: Equalizer and Spectrumanalyzer
  • Next by Date: Re: Equalizer and Spectrumanalyzer
  • Previous by thread: Re: Equalizer and Spectrumanalyzer
  • Next by thread: Re: Setting Instruments For Groups > 15?
  • Index(es):
    • Date
    • Thread