AudioKit - Issues getting specific frequencies (ab

2019-05-11 00:46发布

问题:

I got a small problem using the AudioKit framework:

----> I can't get the AudioKit framework to pick up special frequencies above and below a specific amount. (frequency below 100Hz & above 20kHz)


Edit: I've tested some frequency-tracker apps on my iOS device combined with some online-tonegenerator tools to check if my iPhone microphone is able to pick up those frequency above 20000Hz... And it is.

But using the default frequency tracker code snippets: Frequency above 20000Hz can not be picked up by AudioKit.

mic = AKMicrophone()
tracker = AKFrequencyTracker(mic)
silence = AKBooster(tracker, gain: 0)
AKSettings.audioInputEnabled = true
AudioKit.output = silence
AudioKit.start()

print(tracker.frequency)

---> Is this is a limitation of the AudioKit framework, a limitation of the default iOS-device settings- or is there maybe another way to achieve getting those frequencies?

回答1:

This is a limitation in AudioKit. The Frequency Tracker is based on a soundpipe opcode called ptrack which is in turn based off Csound's ptrack. You could modify the parameters to try to givie you rmore precision in the area of your concern, but if you are concerned with better results both low and high, that will be very processor intensive. Perhaps using two "banded" trackers for low and high would be better. There are always choices to be made and AudioKit's frequency tracker is geared towards typical audible ranges.