Search code examples
swiftswift-playgroundaudiokit

I can't import AudioKit or AudioKitPlaygrounds in swift Playground file


AudioKit beginner and I really need some help here!

I want to track the frequency and amplitude of a selected audio file in swift language using playground on my Mac.

I searched that AudioKit is particularly easy in tracking the frequency and the amplitude, but after downloading AudioKit framework on the official website https://audiokit.io/downloads/ I do not know how to add the framework into my playground file so I could import AudioKit in my code.

Or is there another way to track the frequency and amplitude of an existing "mp3" file in the Xcode Playground?

I download the AudioKit Playgrounds file on the website. Xcode still displays "no such module" in pre-compiled playground created by AudioKit team.enter image description here

Appreciate every answer!


Solution

  • AudioKit comes with playgrounds that already set up to work with the framework. It should be as easy as hitting build (cmd-b) and then starting the playground. Either add a new page to AudioKit's playgrounds or edit an existing one to start experimenting with your own code. Believe me this is easier than trying to start from scratch.