• 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
How do I use custom SoundFont files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I use custom SoundFont files?


  • Subject: How do I use custom SoundFont files?
  • From: Zak Stone <email@hidden>
  • Date: Fri, 27 Dec 2002 01:36:05 -1000

I'm very new to audio programming, and I hope this question will be easy to answer.

I've created a custom SoundFont file with PolyPhontics (using the free demo from http://www.bestsoftwaredesign.com/polyphontics.html), and I'd like to know how to access the instruments I've created from a C++ program. Supposing I can port the Java code from the SMFPlayer example to load my custom soundbank, I need to create a MIDI event that sets a channel to a particular instrument. The AUViewTest sample does this, but it uses flags like '0xC1' to specify which instrument to play from the default soundbank:

// program change channel 1: electric piano
chmsg.status = 0xC1;
chmsg.data1 = 5;
chmsg.data2 = 0;
chmsg.reserved = 0;
RequireNoErr(MusicTrackNewMIDIChannelEvent(track, 0., &chmsg));

I can only refer to instruments by name in PolyPhontics, so I have no idea what to use instead of '0xC1' to select one of the instruments I've created. Is there any way to assign an instrument to a channel by name?

Also, could anyone recommend a basic reference on MIDI events? I'd like to know what data1 and data2 mean in the code snippet above, for example.

Thanks,
Zak Stone
_______________________________________________
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: usb continuous output frequency format
  • Next by Date: a reason to not access AU from AUView via a direct pointer
  • Previous by thread: Re: usb continuous output frequency format
  • Next by thread: a reason to not access AU from AUView via a direct pointer
  • Index(es):
    • Date
    • Thread