Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpectrogramRecorder various #7

Open
32Beat opened this issue Feb 10, 2016 · 2 comments
Open

SpectrogramRecorder various #7

32Beat opened this issue Feb 10, 2016 · 2 comments

Comments

@32Beat
Copy link

32Beat commented Feb 10, 2016

line 194: vDSP_ctoz((COMPLEX*) _A, 2, &(_compl_buf), 1, self.spectrumResolution);

The vDSP examples by apple seem to suggest that "self.spectrumResolution" should either be divided by 2, or the FFT should increase its log2 count by 1 (depending on the actual size of the buffer obv).
This also affects subsequent calls like vDSP_zaspec.
The documentation mentions that vDSP_DFT_Execute is preferred over the FFT variants, whenever possible.

@starzia
Copy link
Owner

starzia commented Feb 10, 2016

Do you have a link to the examples and docs?

@32Beat
Copy link
Author

32Beat commented Feb 10, 2016

https://developer.apple.com/library/mac/navigation/

type "vdsp" in the search field and you should end up with the latest and greatest:
vdsp

The referencedoc entry for the fft routines will mention the DFT alternative, the vDSP example code has a lot of commenting that should clarify its use.

fft

Note above the N/2 and LOG2N parameters.

For my own purposes I seem to get the best results using the DCT in lieu of either the DFT, or FFT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants