psambit9791 / jdsp

A Java Library for Digital Signal Processing
https://jdsp.dev
MIT License
247 stars 43 forks source link

Feature request: Implement Short Time Fourier Transform and inverse STFT #20

Closed SiboVG closed 2 years ago

SiboVG commented 2 years ago

Hi! I was wondering if it would be possible to implement the STFT and inverse STFT, besides the already implemented Fourier transforms. :)

I believe there is also this library that can compute the STFT and inverse STFT, in case you might find it helpful to take a look at it.

Thanks!

BrunoStr commented 2 years ago

I would also be interested in this !

SiboVG commented 2 years ago

@psambit9791 just so you know, I'm working on this and close to finished, so maybe best to wait for my PR

psambit9791 commented 2 years ago

@SiboVG Just a thought. For the data structure that is returned from STFT, we could use a 1D array of DiscreteFourier objects after running the dft() operation on them. That would imply we could call any of the get Functions on them making it easier for users to get the output in their preferred format.

SiboVG commented 2 years ago

Ah, could indeed be a good idea! Right now I've done everything with 2D arrays, but will also add the 1D solution.

psambit9791 commented 2 years ago
SiboVG commented 2 years ago

@psambit9791 just to be sure, were you planning on implementing the inverse STFT or should I do it?

psambit9791 commented 2 years ago

@SiboVG if you can manage to implement it, that's great. If not, I'll work on it but that'll probably be after I'm done with Inverse CWT.

SiboVG commented 2 years ago

Well I'll give it a shot then, so you can get your hands dirty on the Inverse CWT in the meantime.