Reputation: 2497
I don't believe AudioKit (4.0+) has a Goertzel filter, but thought I could start with AKFrequencyTracker and create one.
This AKGoertzelTracker class would be initialized with an array of one or more desired frequencies to detect and a desired minimum amplitude, then a method (e.g. frequenciesDetected) would return a subset of those frequencies that are currently being detected by using the Goertzel algorithm for each one.
I can find various implementations of the Goertzel filter on SO, but I'm not sure where to put it within the AudioKit framework. Any direction or help would be greatly appreciated. Thanks!
Upvotes: 2
Views: 145
Reputation: 4573
Its a filter, so I would say you should model it after one of the other filters in AudioKit (that are not based off Apple's filters). So, open up the Nodes/Effects/Filters in AudioKit and find an examples that has four files. A swift interface, an Objective-C header, an Objective-C implementation, and finally the C++ DSP Kernel. Find the filter that is most like your own in terms of inputs or controls. Then, make your modifications. That's a start and then you can ask more specific questions to us here on Stack Overflow.
Upvotes: 1