Reputation: 6417
I am using AudioKit 4.3 with Xcode 9.4.1, Swift, and managed so far to get a sequencer playing an AKSynthKick in a classic house music fashion, it is a 4 beat loop and the kick plays in each beat, but i am clueless at adding wav or caf or aiff files to play with the sequencer, AKMIDISampler asks for notes but does not makes sense to me if it is a single file...
Upvotes: 1
Views: 186
Reputation: 2225
AKMIDISampler
will work for you here. AKMIDISampler
is a subclass of AKAppleSampler
, and it has the methods loadWav()
and loadAudioFile()
. The noteNumber parameter, when using an audio file, will control playback speed/pitch. Using MIDINoteNumber 60 will play back the file at its actual speed, 72 will be double speed (and an octave higher, if it's a pitched sample), 48 will be half speed (an octave lower) and so on.
Upvotes: 1