Fast Fourier Transform (FFT) vs my "lazy Discrete Fourier Transform" (LDFT)

Sdílet
Vložit
  • čas přidán 30. 05. 2016
  • Here's a straight up comparison between the FFT (in blue) and my algorithm (in red), which so far I'll just call "lazy discrete Fourier transform" (LDFT)
    This is audio sampled at 44100 Hz, the final notes of "Magnetic Rag" by Scott Joplin, as played by Alessandra Celletti.
    FFT was taken with a 1024 sample cosine window (16-bit integers), which by Shannon-Nyquist gives us a 512 bins of 44100/1024 ~ 43 Hz bandwidth, from 0 Hz to 22050 Hz. In other words, the FFT spends A LOT of time, processing and memory on higher frequencies. But I don't care about those!
    This is why I rolled out my own method, which I could dynamically bias towards the lower frequencies with different bandwidths. Couldn't find anything in the literature about this, so I came up with my own stupid algorithm. It's not really a sparse DFT or a straight up DFT either, from the looks of it. Haven't found anything similar. Doubt it's revolutionary, just a really lazy specific implementation of the general ideas.
    My method here was biased towards the lower frequencies. I used 512 bins (each a 16-bit int).
    For my specific purposes this method seems much better in terms of memory and computations. I'll load this up on the Arduino later this week and see how well it goes.
    It certainly looks more promising than a 256 sample but 128 frequency bin Discrete Hartley Transform on that thing!
    I'll work out the details of the theory behind this thing a little bit more and make a post about it somewhere. I'll let the experts tell me how stupid and trivial it is, which is fine, but I'm sure other people could benefit from it.
    EDIT 1: A naive implementation is too slow, but there's several ways to optimize it. Will work on it more.
    EDIT 2: Got it working in real time on the Arduino Uno now: • Lazy Discrete Fourier ...
    EDIT 3: It seems like this is already mostly known, and goes by "single-bin Sliding Discrete Fourier Transform". I did add a few extra tricks but they're not very general, and render it non-invertible.
  • Věda a technologie

Komentáře • 6

  • @thumaszz
    @thumaszz Před 8 lety +1

    Awesome! Can't wait to see the write-up, will you also post the source-code?

    • @1ucasvb
      @1ucasvb  Před 8 lety +2

      Yeah, of course, and I'll probably try to release it as an Arduino library too if it performs well.
      The thing is that there are a few parameters that go in this thing, and I want to understand what they do in theory so I can see how to optimize the algorithm, in signal-processing terms and then on computing terms.
      But it'll come out at some point.

    • @3gypt1an
      @3gypt1an Před 5 lety

      I agree this looks awesome !!... is there any updates to it and is there a way to view the source and your approach?

    • @1ucasvb
      @1ucasvb  Před 10 měsíci

      @@3gypt1an It seems like this is already mostly known, and goes by "single-bin Sliding Discrete Fourier Transform". I did add a few extra tricks but they're not very general, and render it non-invertible.

  • @jeffirwin7862
    @jeffirwin7862 Před 8 lety +1

    Isn't this more of a wavelet transform? It's giving you both time and frequency resolution, whereas an FFT gives you frequencies only.

    • @1ucasvb
      @1ucasvb  Před 8 lety +1

      No. It's a mix of DFT with autocorrelation.