openframeworks / openframeworks/openFrameworks
[idea] using kissfft for general OF fft, all players.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
so it can serve as a placeholder until proper per platforms options are developed (if)
It is not hard to build Kiss for all platforms. I'm already building it in ofLibs
https://github.com/ofWorks/ofLibs/releases
soundPlayers can have an ofSoundFFT object inside
sketch: ofSoundFFT.h
#pragma once
#include <kissfft/kiss_fft.h>
#include <kissfft/kiss_fftr.h>
#include <vector>
class ofSoundFFT {
public:
ofSoundFFT();
~ofSoundFFT();
void setup(int bands);
void process(const float* input, int size);
const std::vector<float>& getSpectrum() const { return spectrum; }
static std::vector<float> createWindow(int size, int type = 0);
static void applyWindow(std::vector<float> &signal, const std::vector<float> &window);
private:
kiss_fftr_cfg fftCfg = nullptr;
int fftSize = 0;
std::vector<float> windowedSignal;
std::vector<kiss_fft_cpx> cx_out;
std::vector<float> spectrum;
std::vector<float> window;
float windowSum = 0.0f;
float computeWindowSum(const std::vector<float>& window);
};
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed sketch in ofSoundFFT.h and inspect how soundPlayers currently handle audio data. Determine the scope for using kissfft as a general cross-platform FFT and embedding an ofSoundFFT object in soundPlayers; the work is done when that integration and its expected spectrum behavior are defined and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100