镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Enhancement of lv_analyzer #255

Open

Description

@kaixiong

lv-analyzer plots the frequency spectrum in a bar graph and a bit hard to love at the moment (#207). For me, it's been relegated to a sort of visual debugger for audio inputs in Libvisual.

It's boring because the frequency spectrum doesn't see that much movement unless you're listening to sound like this where there's energy shifts up and down the spectrum.

We could superimpose a plot of the audio signal over it, add ghosting/fading, render the bars in a more stylized (less blocky) fashion, and so on. Here are some reference styles:

Another idea that's been brought up in the past is to scale the axes logarithmically so it doesn't look as lopsided. Vertical scaling is straightforward. Horizontal scaling will require the use of a longer signal so that the DFT can produce higher resolution i.e. more samples. These samples can then be put into log-sized buckets (wider band towards higher frequencies), summed and scaled accordingly.

Activity

  1. added this to the 0.5.0_alpha1 milestone on Feb 5, 2023
  2. hartwork commented on Feb 5, 2023

    @hartwork
    Member

    I would like to add some inspiration from projects on GitHub with pictures that do spectrum analysis with C/C++ code:

    bradleybauer/music_visualizer

    example5.png
    example0.PNG

    aiXander/Realtime_PyAudio_FFT

    20bfbb00-9506-11ea-9e50-e197d8710500

    kojigardiner/audiobox

    tvotr_sym1.GIF

    JanKleprlik/AudioVisualiser

    radio.PNG

    GhostNaN/recidia-audio-visualizer

    preview.apng

    hannesha/GLMViz

    minimal.gif

    seven-phases/spectrum-analyzer

    seven-phases

    UtoECat/jack_utils

    spectrum.png
    (while the line rendering could be improved)

    jarcode-foss/glava

    glava demo
    (though neither the colors nor the symmetry seem to be a good idea)

  3. hartwork commented on Feb 5, 2023

    @hartwork
    Member

    One more, this is from https://github.com/pckbls/pulseviz , shots are self-made. The licensing would need to be clarified though.

    Screenshot_20230205_210543_bars
    Screenshot_20230205_210520_spectrum
    Screenshot_20230205_210444_time
    Screenshot_20230205_210350_spectrogram

  4. kaixiong commented on Feb 10, 2023

    @kaixiong
    MemberAuthor

    @hartwork, thanks for the ideas. I'm working on the code to rasterise lines and circles. I have done both before. Currently doing research on how to add anti-aliasing to them. Let's see what I can come up with once I have these two graphics primitives to work with.

  5. hartwork commented on Feb 10, 2023

    @hartwork
    Member

    @kaixiong sounds good, looking forward to see your own spectrum analyzer in action!

    I think long-term I'd want us to also port some of the existing ones seen above to (and into) Libvisual as well if licensing can be clarified, I'm thinking of (parts of) both https://github.com/JanKleprlik/AudioVisualiser and https://github.com/pckbls/pulseviz in particular. I hope we can have multiple spectra in libvisual-plugins, a spectrum family 😄

    If your work on anti-aliasing has any likely cross-over to GL vidoptions (get_video_attribute_options), please let me know, so we don't duplicate work about it in the future by accident.

  6. kaixiong commented on Feb 10, 2023

    @kaixiong
    MemberAuthor

    @kaixiong sounds good, looking forward to see your own spectrum analyzer in action!

    I think long-term I'd want us to also port some of the existing ones seen above to (and into) Libvisual as well if licensing can be clarified, I'm thinking of (parts of) both https://github.com/JanKleprlik/AudioVisualiser and https://github.com/pckbls/pulseviz in particular. I hope we can have multiple spectra in libvisual-plugins, a spectrum family smile

    @hartwork Sounds good to me!

    If your work on anti-aliasing has any likely cross-over to GL vidoptions (get_video_attribute_options), please let me know, so we don't duplicate work about it in the future by accident.

    The rasterisation and anti-aliasing is done entirely in software so there's no overlap with OpenGL. I miss doing software rasterisation and it's a bit of a fun distraction for me.

  7. hartwork commented on Feb 10, 2023

    @hartwork
    Member

    @kaixiong 😃 Thanks for the clarification! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions