AUSampler Preset Patch (Composition by dust)

Author: dust
License: (Other — see description)
Date: 2012.01.20
Compatibility: 10.7
Required plugins:
AUSampler Plugin

here is an AUSampler plugin for QC. with apples new AUSampler component in lion.. it is now possible to quickly make software instruments by saving a preset .plist file and loading it up in your quartz or iPhone applications....

fully supported with midi io. just plug your keyboard in and launch the plugin and start playing immediately no conditional logic hassles set up or anything.

if more complex routings are more your style then you can programmatically send midi messages to the qc sampler from qc or any other host or hardware interface you have. the plugin also provides midi structured outputs messages so you have access to some raw midi note cc, and device data ;)

by using presets you can create lush multi-timbral sounds with complex parameter mapping. by sending the sampler a midi note or midi cc structure you can then gain access to performance filters and lfo's etc... it is also possible to load .dls sound fonts into the sampler editor and save them as AUSampler presets.

build some sequences in qc or add some physics to midi or maybe just add some generative soundss to your qc file.

please check the read me for the proper sample file locations.. you can load a preset from anywhere... sounds need to go in /Library/Audio/Sounds folder or the plugin Resources folder if you want to redistribute. i have included a sample preset to play with and directions on how to quickly make your own.

the plugin will not load if your presets and sounds folders are empty.

pho's picture
Re: AUSampler Preset Patch (Composition by dust)

I installed it in 10.6 but it doesn't appear in the library. I've had similar problems with other plug-ins built in lion.

cybero's picture
Re: AUSampler Preset Patch (Composition by dust)

Have you tried installing the 64/32 bit version in the Build folder?

dust's picture
Re: AUSampler Preset Patch (Composition by dust)

this plugin is incompatible with snow leopard. apple has made some changes in regards to audio units in lion. seeing the ausampler is a new lion component i was un able to build for snow leopard or even for 32bit in lion.

cybero's picture
Re: AUSampler Preset Patch (Composition by dust)

Doh •~ & you flagged the original post as only 10.7 compatible [as in should have picked up on that]. Is the Patch meant to work in QC without a USB keyboard plugged in?



Yes a MIDI keyboard is required - see my post regarding the rom1.aupreset.

cybero's picture
Re: AUSampler Preset Patch (Composition by dust)

I'd been so busy creating visualizations that I hadn't taken time to really explore this generous upload of yours, dust.

Thanks for sharing BTW.

On closer examination it became transparently obvious why even if I created an IAC,Network and MIDI Keyboard setup with a MIDI keyboard turned on that the AUSampler composition simply bounced out. I looked at the .rompreset - it stated the following for the file paths for that essential item


Well clearly I'm not Users/dust/ •~, so I changed that file to


made sure that the sounds were in the right location and guess what, it now works sweetly and neatly.

Thanks again, dust :-) [I'd previously been wondering why it wasn't working with all the usual MIDI Setup essentials taken care of, hence my question as to whether or not a keyboard was essential {it is of course}].

I'm thinking this might well prove to be one of the most useful patches to me posted here on the Kineme forum.

Please find attached a re-edited and now thoroughly generic rom1.aupreset that any others interested in using this can slot directly into place, which should be placed into  /Library/Audio/Presets/Apple/AUSampler .

You ought to do a screen capture tutorial movie for this. It would be instructional and provide great forward marketing. An app for seamlessly and easily creating presets could follow, methinks.

rom1.aupreset.zip2.1 KB

dust's picture
Re: AUSampler Preset Patch (Composition by dust)

sweet you got it working... ;) my bad cybero i included the preset .plist from my library folder and not the preset i have been working in x code with which i had changed the file path locations to.


from my testing a url like above seems to work best even if the files are not located in those directories.... sorry it was late or early when i uploaded this patch.. it actually seems like the alternate location the sampler will look if it did not find...


is in....


and not...


which is where the sampler puts samples when you are making or editing presets...

so the file location url in the preset file really can be any thing... i suspect that preset a preset sample location like this.....


would return an error but then look in /Library/Sounds not /Library/Audio/Sounds

im glad you figured that out. it was not my intention to screw that up. i was thinking that if the samples where placed in /Library/Audio/Sounds it should load the preset on a different system no problem it seems /Library/Sounds is the location. so there is no need to edit the"rom1" preset if files are in there correct location. i was thinking about that yesterday as in my haste to make a read me i said this plugin should work in quartz builder or in app no problem as long as the there where samples in /Plugin/Resources/Sounds/ which is actually wrong you would need to add the sounds folder to /Application/Resources/Sounds/ to make this plugin work in an application context...

here is a bit from a technical note on the au sampler which should provide some more an actually correct insight into how the sampler looks for files.....

When the AUSampler attempts to load audio files via the paths provided in the external file refs portion of an .aupreset file or a set of individual file URLs, it will use the following rules to resolve each path:

If the audio file is found at the original path, it is loaded. If the audio file is NOT found, the AUSampler looks to see if a path includes a portion matching "/Sounds/", "/Sampler Files/" or "/Apple Loops/" in that order. If the path DOES NOT include one of the listed sub-paths, an error is returned. If the path DOES include one of the listed sub-paths, the portion of the path preceding the sub-path is removed and the following directory location constants are substituted in the following order:

Bundle Directory

For example, in an iOS application if the original path was /Users/geddy/Library/Audio/Sounds/MyFavoriteHeadacheSound.caf and this path was not found, the AUSampler would then search for the audio file in the following four places:


Therefore using the above example, if you were moving a preset created on the Desktop to an iOS application you could simply place the MyFavoriteHeadacheSound.caf file in a folder called "Sounds" within your application bundle and the AUSampler will find the audio file referenced by the preset.

this technical note also says to properly prepare sample files you should be creating region meta data inside the audio file which is pretty interesting if you where lets say making an application that recorded sounds into the sampler. there is no need to do this if your using a component host like au lab to build and save your preset files as all the looping data etc.. is in the .plist file there for not needed to be in the audio file.

i will get around to making a tutorial on how to actually make presets or how to prepare sample files.... the samples i used like square_unison_aa-100011 was a sound file i recorded from synth. the actual audio file is pretty long for a square wave.. you can actually make some interesting sounds with basic wave shapes like you would with additive or fm synthesis etc.....

here are a few basic wave shapes... noise, pulse, triangle, square, sine, saw up, saw down. etc... they are just one cycle each so you will not hear them in preview or iTunes etc... load them into the sampler editor on different layers to create an additive synthesizer ;)

basic waveshapes.zip11.62 KB

dust's picture
Re: AUSampler Preset Patch (Composition by dust)

actually this plugin works best with midi keyboard. i got to make some revisions and things but if programmatically sending midi note data make sure to not change the note number until the note is finished. meaning if you set the note length to 1 and then change the note number at .5 to something different then the sampler will tray an turn off the new note number leaving the old number still playing. i need to put in some logic to deal with this more efficiently as well as do some iteration so sending a polyphonic chord structure from qc will be possible.