Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: F32 Audio Spectrum/Waterfall guidance - AudioAnalyzeFFT1024_F32

  1. #1
    Junior Member
    Join Date
    Oct 2020
    Posts
    5

    F32 Audio Spectrum/Waterfall guidance - AudioAnalyzeFFT1024_F32

    Hi All

    I have downloaded Bob Larkins latest F32 open - audio lib. I'm trying to produce a basic audio spectrum for my my project. I'm using a T4.1 - AudioControlSGTL5000 and ILI9341 display.
    My AudioSettings_F32 audio_settings(sample_rate_Hz, audio_block_samples); sample_rate_Hz = 48000.0f; audio_block_samples = 32;. There is a AudioAnalyzeFFT1024_F32 example
    but I'm struggling to understand or how to produce a basic audio spectrum/ waterfall to display half or all the spectrum. Any advice/Idea's how to do this would be greatly appreciated.

    Thanks in Advance

    Clarkie1234

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    973
    The way I'd do this is populate a lookup table with RGB values indexed by decibel. Then run through the
    FFT bins converting the value to decibels, lookup the pixel colour and write that to the display. Most TFTs
    support hardware scroll I believe, so then you just scroll up one pixel ready for the next fft.

    If you want a line plot then I'd have a copy of the previous spectrum to hand in order to erase the current line
    before plotting the new line - this avoids having to blank the entire plot for each new FFT.

  3. #3
    Junior Member
    Join Date
    Oct 2020
    Posts
    5
    Thanks for the reply and suggestions - I will have a look into doing this.

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Posts
    148
    Hi - You might take a look at the radio project
    https://groups.io/g/keithsdr/
    Mike and Keith are working on a display/waterfall using the F32 floating point FFT with T4.1. There are several topics on this that are current. You may need to join the group to read the messages.

    Also, I would suggest using standard 128 size blocks.

    Good luck, Bob

  5. #5
    Junior Member
    Join Date
    Oct 2020
    Posts
    5
    Hi Bob

    Thank's for the reply.

    Yes I'm a member on keithsdr i.o groups - I wasn't sure if they had a F32 spectrum/scope running I will check the latest info

    Many Thanks

    Clarkie1234



    Quote Originally Posted by Bob Larkin View Post
    Hi - You might take a look at the radio project
    https://groups.io/g/keithsdr/
    Mike and Keith are working on a display/waterfall using the F32 floating point FFT with T4.1. There are several topics on this that are current. You may need to join the group to read the messages.

    Also, I would suggest using standard 128 size blocks.

    Good luck, Bob

  6. #6
    Senior Member
    Join Date
    May 2016
    Posts
    256
    @Clarkie1234
    I sent you a very brief reply to your PM suggesting we correspond via email. I have a working 44.1kHz wide spectrum display for my audioSDR that works with Teensy 4.0/4.1, but I haven't even tried to put together a waterfall because it just seems too much for a simple SPI connected display without a scrolling frame buffer (ie the ILI9341)

    Derek

  7. #7
    Senior Member
    Join Date
    Jul 2020
    Posts
    973
    You can implement a waterfall without scrolling...

  8. #8
    Senior Member
    Join Date
    May 2016
    Posts
    256
    @MarkT
    I'd be interested to know how (and try) to do it. DMA? Certainly I can see a processor based frame buffer, but just writing a 256x(say)80 screen region pixel by pixel with 16 bit pixels and SPI speed seems to be unrealistic...
    Derek

  9. #9
    Senior Member
    Join Date
    Jul 2020
    Posts
    973
    No, I said _without scrolling_ - just output line by line (its quite so nice, but its usable).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •