Hello community!
As a rhythm game player, I've always been fascinated with audio processing. Using SoundData and threading features that LOVE provide, it is possible to create (almost-)real-time yet non-blocking FFT module that may be useful if you'd like t create audio visualizer or any kind of spectrum analysis.
The repository is at https://github.com/Gennadiyev/lovefft.
I hope you enjoyed making games with love2d just as I do!
Simple threaded STFT (FFT) module for LOVE 11.0+
-
- Prole
- Posts: 6
- Joined: Fri Mar 20, 2020 9:21 am
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Simple threaded STFT (FFT) module for LOVE 11.0+
Awesome library!
I do have a few things to note though:
- not sure if this library works with streaming sources or not.
- tell is not an accurate way to tell position, but i guess for an fft that just needs to look nice, it will work.
- since your library uses multiple files, you really should use the relative require trick so that you don't need to force a specific location for the library to exist and/or make the user edit your files at all; i use it in my fft library as well:
That said, if someone wants to use the c FFTW library with löve, that's also a possibility that has been tested.
I do have a few things to note though:
- not sure if this library works with streaming sources or not.
- tell is not an accurate way to tell position, but i guess for an fft that just needs to look nice, it will work.
- since your library uses multiple files, you really should use the relative require trick so that you don't need to force a specific location for the library to exist and/or make the user edit your files at all; i use it in my fft library as well:
Code: Select all
-- put this near the top of files that require other files, outside any function.
local current_folder = (...):match("(.-)[^%.]+$")
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
- Prole
- Posts: 6
- Joined: Fri Mar 20, 2020 9:21 am
Re: Simple threaded STFT (FFT) module for LOVE 11.0+
- Yes, it actually uses SoundData and does not matter whether the audio source is streaming or not.zorg wrote: ↑Sun Jul 17, 2022 5:38 am Awesome library!
I do have a few things to note though:
- not sure if this library works with streaming sources or not.
- tell is not an accurate way to tell position, but i guess for an fft that just needs to look nice, it will work.
- since your library uses multiple files, you really should use the relative require trick so that you don't need to force a specific location for the library to exist and/or make the user edit your files at all; i use it in my fft library as well:That said, if someone wants to use the c FFTW library with löve, that's also a possibility that has been tested.Code: Select all
-- put this near the top of files that require other files, outside any function. local current_folder = (...):match("(.-)[^%.]+$")
- True, I noticed that tell only has precision of around 1/100 second. A good workaround should be an
Code: Select all
loveFFT:update(dt)
- Oh I love the trick a lot! I personally use it in my projects! But I skipped that in the making of the library so as to make the project better structured... I think it might should be the developer's work to take care of the requires
I've gone through your fft library! It's awesome with a sharp focus on performance! I'm not so familiar with FFI so I fallback to a rather slow Lua-ly implementation... I'll add your repository to lovefft's readme on its next update!
Who is online
Users browsing this forum: No registered users and 4 guests