I'm trying to play a midi file as a wav audio is being played.
I've tried with
let akSequencer = AKSequencer(filename: "melody")
akSequencer.enableLooping()
akSequencer.play()
But it only plays the first note and nothing else. Also, I'm not being able to use a mixer to mix it with the wav file that it's being loaded like:
let akMidiSampler = AKMIDISampler()
let akSampler = AKSampler()
let wavFile = try AKAudioFile(forReading: wavUrl!)
try akSampler.loadAudioFile(wavFile)
let mixer = AKMixer(akSampler, akMidiSampler)
mixer.volume = 1
AudioKit.output = mixer
AudioKit.start()
akSampler.play()
The wav audio is being played, but the midi just the first note.
Any help is very welcome!