jurihock / sdft Goto Github PK
View Code? Open in Web Editor NEWSingle file forward and inverse Sliding DFT in C, C++ and Python
License: MIT License
Single file forward and inverse Sliding DFT in C, C++ and Python
License: MIT License
Hi,
Nice library! Am looking forward to seeing how it performs on my data.
From the readme:
It takes real valued samples and estimates the corresponding half size complex valued DFT vector for each of them.
Would you be able to add a short sentence in the readme, and maybe something in the examples, that clarifies how this vector is to be interpreted please? Most of these seem to be taking the entire signal and transforming, then doing the inverse and verifying the difference isn't too great.
For my usecase though, I need to compute the bandpowers at known frequencies realtime, adding one sample at a time (and I also think an example closer to this might be helpful - e.g. plotting the phase and amplitude). So it's not entirely clear to me how the mapping between the DFT vector/bin counts and the relative frequencies is defined, whilst I have some guesses.
I would have assumed they might be linearly-spaced, for the specified number of bins, between zero and some maximum, but then if not user-specified, inferring what this upper limit is remains a question. Or does it simply count up from zero one at a time, same as the FFT - so that a total of 128 samples and a bin count of 65 would be an equivalent output format? Does the interpretation depend on how many samples I push into the algorithm, or is it fixed? Would be good if this could be confirmed somewhere in the documentation.
Thanks!
TODO:
See also:
Hi,
I had a question - but not a bug or FR, just wanted to be sure I had understood and was using the library properly.
I can ask here, but rather than clutter the issue list with a non-issue, would you be open to enabling the "discussions" feature in GitHub (docs)?
Thanks
A modulated SDFT network was presented in [mSDFT, Fig. 3]. That network frequency translates the N-delay comb stage’s output spectral energy, originally centered at kfs /N Hz, down to 0 Hz and implements a complex resonator where exact pole/zero cancellation occurs at z = 1 on the z-plane. Although that network is guaranteed stable, it is less computationally efficient than is our proposed SDFT network in Figure 3.
Just do it and publish on crates.io
The note in "Sliding DFT for Fun and Musical Profit" is misleading:
A zero latency version is more expensive, and while we have had it implemented in our experimental code it seems rather too much.
There is no such thing like "zero latency" due to windowing. The amplitude of the first/last sample is suppressed by the window function in the time domain. Consequently "zero latency" means "zero amplitude". Applying circular shift before proper windowing is quite pointless.
Requires PR soblin/matplotlibcpp17#23
but not C/C++
sdft
Hello, I am very interested in testing out this implementation for real time frequency analysis of a signal. However, I do not understand how to implement the method.
In scipy.ftt I would compute a sliding window with the last 'n' values and perform the fourier transform on the array. Using sdft I would be able to update the transform online with just the last value and the result of the previous iteration right?
Could you upload a basic example with a couple of sine waves, please? Sorry for the inconvenience.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.