• 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 A MusicDevice's Instrument Timbre
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting A MusicDevice's Instrument Timbre


  • Subject: Setting A MusicDevice's Instrument Timbre
  • From: Craig Bakalian <email@hidden>
  • Date: Fri, 31 Oct 2003 14:44:53 -0500

Hi,
It is me again. I am still fussing with the property types to pass in
to a AudioUnit. How do I set an MusicDevice's instrument? The below
code is of course not working. I am getting a
kAudioUnitErr_InvalidProperty for the err. Please, any help is
appreciated.

-(void)setInstrumentNumber: (id)sender ForTrackNumber: (UInt32)num
{
UInt32 instrumentNumber = (UInt32)[sender indexOfSelectedItem];

AUNode synthNode;
AudioUnit theSynth;
AUGraph track = [[self document] getGraphForTrackNumber: num];
AUGraphGetIndNode(track, 0, &synthNode);
AUGraphGetNodeInfo(track, synthNode, NULL, NULL, NULL, &theSynth);
OSStatus err;
MusicDeviceInstrumentID musicID;
UInt32 size = sizeof(musicID);
err = AudioUnitGetProperty(theSynth,
kMusicDeviceProperty_InstrumentNumber, kAudioUnitScope_Global,
instrumentNumber, &musicID, &size);
//err = 0 good!
err = AudioUnitSetProperty(theSynth,
kMusicDeviceProperty_InstrumentNumber, kAudioUnitScope_Global,
instrumentNumber, &musicID, size);
//err = -10879
}

Craig Bakalian
www.eThinkingCap.com
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: VST to AU plug matching in Logic
  • Next by Date: Re: kMusicDeviceProperty_InstrumentCount
  • Previous by thread: Initializing input
  • Index(es):
    • Date
    • Thread