Questions tagged [audiokit]

AudioKit is an audio synthesis, processing, and analysis platform for macOS, iOS, and tvOS.

Use this tag to get answers on AudioKit. Please post code that you have tried. Make sure it is actually a question concerning AudioKit. Questions for toolchain, language or software design should also contain more tags to get a wider audience.

Getting help

There are two methods for getting support for AudioKit, listed in order of what you should try first:

  1. Post your problem to StackOverflow with this audiokit tag.

  2. If you are pretty sure the problem is not in your implementation, but in AudioKit itself, you can open a Github Issue.

Links to documentation, samples and code

947 questions
5
votes
1 answer

Issues with extra MIDI track being created in AKsequencer, using audiokit

I've been trying to solve a mystery sinewave issue with little success. I'm starting a new question here as I think I have dug into the specifics of this problem. When setting up an AKSequencer, and feeding it a MIDI file, I'm seeing some strange…
Mr_P
  • 523
  • 2
  • 16
5
votes
4 answers

Module compiled with Swift 4.0 cannot be imported in Swift 3.2.2: AudioKit

I have just updated xCode to the latest version, and am getting the error when trying to build. "Module compiled with Swift 4.0 cannot be imported in Swift 3.2.2:…
james
  • 2,595
  • 9
  • 43
  • 70
5
votes
1 answer

Graphing MIDI events in iOS using AudioKit

I want to create a graphical representation of a MIDI file. I am using AudioKit for my audio processing needs in my app. I am loading the MIDI with an AKSequencer and using an AKMIDISampler to add a WAV file to the sequence. Is there a way to do…
5
votes
1 answer

AVAudioUnitSampler generates sinewaves after headphones route change, iOS 11 iPhone

I'm facing a strange issue on iPhone (iOS 11) when using AVAudioUnitSampler. Let's say I have a AVAudioUnitSampler initialised with a piano sound. So, every time that I connect or disconnect the headphones I hear the piano sound plus a sinewave tone…
Eloi Marin
  • 71
  • 2
5
votes
1 answer

Cropping MIDI file using AudioKit

I am trying to crop and loop a certain part of a MIDI file using AudioKit. I am using a sequencer and found a couple of things that are close to what I need, but not exactly. I found a method in AKSequencer called clearRange. With this method I am…
5
votes
2 answers

What is a correct way to manage AudioKit's lifecycle?

I'm building an app that has to track input amplitude of users mic. AudioKit has a bunch of handy objects for my needs: AKAmplitudeTracker and so. I haven't found any viable info on how is it supposed to start AudioKit, begin tracking etc. For now…
Alexey Savchenko
  • 842
  • 2
  • 10
  • 31
5
votes
1 answer

How to load third party Audio Units with AudioKit

I recently began to work with the AudioKit Framework on Github and took a deep look into the source of the framework. What I couldn't find but am really curious to know is how to integrate third party Audio Units, especially Effects and pass through…
Simon Kemper
  • 635
  • 1
  • 7
  • 16
5
votes
1 answer

How to create a MIDI file with Swift?

I'm currently learning how use MIDI with swift. I sought how to create a MIDI file, but that sound like not so easy. I checked frameworks like AudioKit, but i don't find too. Which's informations i need to learn doing it? (for example to know MIDI…
Kyz
  • 141
  • 9
4
votes
1 answer

How can I close an AKAudioFile (or AVAudioFile) that has opened for reading?

I have a problem in an app I'm developing where eventually too many audio files wind up being open. I haven't found any way to close the files, so I've tried setting files that aren't being used to nil, but the problem is persisting. I've declared…
lxirsh
  • 93
  • 8
4
votes
1 answer

AudioKit 5 iOS Current Playback Time

Hello fellow AudioKit users, I'm trying to setup AudioKit 5 with a playback time indication, and am having trouble. If I use AudioPlayer's duration property, this is the total time of the audio file, not the current playback time. ex: let duration =…
TheJeff
  • 3,665
  • 34
  • 52
4
votes
2 answers

How to use AudioKit in SwiftUI? Change state var in view

I have added a listener: class MIDIReceiver: MIDIListener { ... } Where should I put the following code in SwiftUI so that I can use my midi keyboard to change the @State var ? let midi = MIDI() midi.openInput() let receiver =…
Linus
  • 69
  • 4
4
votes
2 answers

Getting strange frequency readings on AKFrequencyTracker attached to a Focusrite 2i2

I'm seeing an issue when using an AKFrequencyTracker that when connected to an audio interface I see erroneous high frequency readings around 47kHz while playing a connected guitar. I don't have to play anything and I see the high frequencies. The…
crackity_jones
  • 1,077
  • 2
  • 13
  • 16
4
votes
2 answers

Importing AudioKit framework gives "'x' is not a member type of 'AudioKit' errors

I've been trying to add AudioKit to a project in Xcode to no avail - even blank projects created just to import AudioKit into my View Controller are throwing 2711 errors, mostly saying "'x' is not a member type of 'AudioKit', "Initializer does not…
jowan
  • 57
  • 3
4
votes
2 answers

compilation error when porting AudioKit iOS app to Catalyst macOS app

I have an iOS app that has been working fine with AudioKit's iOS build. I wanted to try porting to macOS w Catalyst by dropping in AudioKit.xcframework. Here is what I did compile AudioKit-4.9.5 from source to generate AudioKit.xcframework (I had…
inhuman
  • 145
  • 6
4
votes
0 answers

Is it possible to stream audio from iPhone built-in microphone to headset over HFP using AudioKit on iOS?

I need to set up a stream from iPhone built-in microphone to headset over HFP. It works perfectly with A2DP when I configure audiosession with .allowBluetoothA2DP option, but HFP is critical for my task, because it is much faster than A2DP. When I…