Home Frequency change event - AudioKit & Swift
Reply: 0

Frequency change event - AudioKit & Swift

user729 Published in July 23, 2018, 1:31 pm

I'm using Swift 4 with the AudioKit Framework 4.0.4.

I'd like to track the frequency of the input microphone of my iOS device in real time.

Currently I'm using a timer calling the output-function that prints out oscillator.frequency every 0.1 seconds.

let timer = Timer.scheduledTimer( timeInterval: 0.1, target: self, selector: #selector(self.output), userInfo: nil, repeats: true)

func output() {
   print("Frequency: \(oscillator.frequency)")

But is there a way to just listen for the change of the oscillator.frequency struct? Maybe something like an event called every time if the oscillator.frequency was changed.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313468 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO