-
Notifications
You must be signed in to change notification settings - Fork 30
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
Turn Spectro into a library #2
Comments
Really looking forward to this ! |
Hi @calebj0seph
|
Please have a look at these websites: They refer to what is called Sliding Window Fourier Transform which is a much faster way to compute the spectrogram. The FFT cost is nLogn where as the SWFT is n. Using the SWFT should reduce the lag between the sound and the display of the spectrogram. I'm looking for a Javascript version I had and will send it up if I can find it. RONC |
@rechmbrs Thanks for the links! From what I understand a sliding DFT is used when you want to compute the DFT for windows which are only 1 sample apart. In this case, yes it makes much more sense to use an For a spectrogram though, we don't need to compute the DFT every sample. In Spectro, we only do this every 1024 samples with a window size of 4096 samples. If we do some quick calculations, we end up with Unless I'm misunderstanding something, it doesn't look like this would help performance at all. |
@gokgozf Sorry for the late reply, haven't really touched any of my Github projects since COVID all started. Now that I'm getting back into things, I'm hoping to make Spectro into a reusable library with an npm package while also keeping this repository maintained. I've started by upgrading all of the dependencies, next I'm going to be refactoring the codebase into a library while putting the current demo in a separate directory that uses the new library. No ETA yet as I haven't worked with the code in a year, but hopefully not too long! |
@calebj0seph Please contact me at rechmbrs [at] gmail [dot] com to follow on with this. I have a number of other parts to discuss. We can then bring results back here for others. RONC |
At the moment Spectro just builds to a demo. It should be turned into a library, with the existing demo being moved into a
demo
orexamples
folder.I imagine the API looking something like this:
The text was updated successfully, but these errors were encountered: