1

I'm using Audio Unit AUSampler in my app. I was wondering is there a way to create and load custom preset from individual audio files on the fly? I know I can load .caf files with prepared Instrument Chunk metadata, but my problem is the metadata will change in time. I would like to give users possibility to make his own instruments with particular files associated.

Simply, I would like to tell AUSampler: Load for me 'file.caf' as a baseNote 35.

Beleg
  • 362
  • 2
  • 23
psci
  • 903
  • 9
  • 18

1 Answers1

0

You can load the AUSampler with sampler 'patches' so one way to do what you require on the fly is to create custom .aupresets (which are xml or plists) and load the sampler with them. This code shows how to load a aupreset but it does not dictate that the aupreset has to be on disk. So do some plist or xml config and load them for individual samples.

Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228