Skip to content

About

A JUCE module for a spectrum analyzer component

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

Vain Spectrum Analyzer

alt text

A JUCE module containing the spectrum analyzer code used in Sentinel, PFT, and Orange Gate.

Basic Usage

A basic spectrum analyzer is accomplished using two classes: vsa::AudioBufferFifo and vsa::SpectrumAnalyzerComponent. The vsa::AudioBufferFifo lives wherever audio is being processed. The vsa::SpectrumAnalyzerComponent lives in the message thread and regularly polls the fifo from a dedicated thread for new audio data.

vsa::AudioBufferFifo fifo;
fifo.setSize(sampleRate, 1.0); // store 1 second of data

juce::AudioBuffer<float> buffer;
m_fifo.pushAudioData(buffer); // push all audio data into the fifo

// message thread
vsa::SpectrumAnalyzerComponent spectrumAnalyzer{ fifo };
addAndMakeVisible(spectrumAnalyzer);

Adding it to Your Project

SpectrumAnalyzer is organized as a JUCE module. To use it in your project include the Modules directory in CMakeLists.txt:

add_subdirectory("SpectrumAnalyzer/Modules")

Link to the following targets:

target_link_libraries("Project"
    PRIVATE
    vsa::vsa
    vsa::vsa_spectrum_analyzer
)

About

A JUCE module for a spectrum analyzer component

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages