Home Frequency change event - AudioKit & Swift
Reply: 0

Frequency change event - AudioKit & Swift

Jonas0000
1#
Jonas0000 Published in 2018-01-10 14:02:52Z

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.301278 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO