Video Tutorial: Adding Attack & Release to EXS/AUSampler instruments

UPDATE, 4/2/2018: The new AKSampler code released in AudioKit 4.2 allows for ADSR envelopes without setting up anything special in the source files. This video is mostly unnecessary now with the new features of AKSampler. Unless you want to use AVAudioUnitSampler. Then, these techniques still apply.

This video features undocumented ways to use Logic EXS24 and AUSampler to create Swift iOS music apps with Attack, Release and more. The tutorial then dives into how to use those instruments with the ROM Player source code. These techniques will work with any AKSampler or AVAudioUnitSampler class using AVFoundation or AudioKit.

1:05 Adding MIDI CC mappings with Logic EXS24
3:47 Adding MIDI CC mappings with AUSampler (AULab / GarageBand)
6:50 Loading an .aupreset file with ROM Player (or AKMIDISampler)
8:31 Code to send Attack/Release Midi CC to AVAudioUnitSampler for Attack & Release
10:54 Logic EXS24 troubleshooting tip

Portions of this code have been updated since filming the video. For the section that starts at 9:00, please see the code in the ROM Player repo for an even better solution.

You can send CC to an AKAudioUnitSampler or AKSampler with the sendController method. (Code example in the ROM Player repo).

This video also features the excellent work of Dave O’Neill, Jeff Cooper, and Gene De Lisa.

You can hear these techniques in action in FM Player.
The source code is also available now.

Related Posts

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.