CiCueTea v0.0.1
Loading...
Searching...
No Matches
jsa::cicuetea::SlidingCqtSparseProcessor Class Referenceabstract

Processes audio samples using a sliding window sparse CQT. More...

#include <CQTProcessor.hpp>

Public Member Functions

 SlidingCqtSparseProcessor (double sampleRate, Eigen::Index numSamples, double fraction, double minFrequency, double maxFrequency, double refFrequency)
 Constructs a SlidingCqtSparseProcessor object.
virtual ~SlidingCqtSparseProcessor ()=default
 Virtual destructor for safe polymorphic use.
double processSample (double sample)
 Processes a single audio sample.
virtual void processBlock (NsgfCqtSparse::Coefs &block)=0
 Processes a block of data.
const Eigen::ArrayXd & getWindow () const
 Gets the windowing function.
const Eigen::ArrayXd & getCqtWindow (Eigen::Index k) const
 Gets the CQT window for a specific index.
const NsgfCqtSparsegetCqt () const
 Gets the CQT object.
Eigen::Index getLatency () const
 Gets the latency produced by the processor.
bool isValid () const
 True when the underlying CQT configuration is valid.

Protected Attributes

NsgfCqtSparse cqt
 The CQT object used for processing.

Detailed Description

Processes audio samples using a sliding window sparse CQT.

This class provides methods to process individual samples and blocks of data using a sliding window implementation of the sparse CQT.

Constructor & Destructor Documentation

◆ SlidingCqtSparseProcessor()

SlidingCqtSparseProcessor::SlidingCqtSparseProcessor ( double sampleRate,
Eigen::Index numSamples,
double fraction,
double minFrequency,
double maxFrequency,
double refFrequency )

Constructs a SlidingCqtSparseProcessor object.

Parameters
sampleRateThe sampling rate of the audio signal.
numSamplesThe number of samples to process.
fractionReciprocal of bands per octave (e.g. 1.0/12 for 12 bands/octave); fractional values allowed.
minFrequencyThe minimum frequency of the CQT.
maxFrequencyThe maximum frequency of the CQT.
refFrequencyThe reference frequency for the CQT.

◆ ~SlidingCqtSparseProcessor()

virtual jsa::cicuetea::SlidingCqtSparseProcessor::~SlidingCqtSparseProcessor ( )
virtualdefault

Virtual destructor for safe polymorphic use.

Declared virtual to ensure that derived classes can be safely deleted through a base class pointer. This destructor is defaulted as the base class does not require custom cleanup.

Member Function Documentation

◆ getCqt()

const NsgfCqtSparse & jsa::cicuetea::SlidingCqtSparseProcessor::getCqt ( ) const
inline

Gets the CQT object.

Returns
A constant reference to the CQT object.

◆ getCqtWindow()

const Eigen::ArrayXd & jsa::cicuetea::SlidingCqtSparseProcessor::getCqtWindow ( Eigen::Index k) const
inline

Gets the CQT window for a specific index.

Parameters
kThe index of the CQT window.
Returns
A constant reference to the CQT window.

◆ getLatency()

Eigen::Index jsa::cicuetea::SlidingCqtSparseProcessor::getLatency ( ) const
inline

Gets the latency produced by the processor.

Returns
Integer number of samples of delay between input and output.

◆ getWindow()

const Eigen::ArrayXd & jsa::cicuetea::SlidingCqtSparseProcessor::getWindow ( ) const
inline

Gets the windowing function.

Returns
A constant reference to the windowing function.

◆ isValid()

bool jsa::cicuetea::SlidingCqtSparseProcessor::isValid ( ) const
inline

True when the underlying CQT configuration is valid.

An invalid processor is inert: processSample() returns 0 (silence) and never touches its internals. See NsgfCqtCommon::isValid().

◆ processBlock()

virtual void jsa::cicuetea::SlidingCqtSparseProcessor::processBlock ( NsgfCqtSparse::Coefs & block)
pure virtual

Processes a block of data.

Parameters
blockThe block of data to process.

◆ processSample()

double SlidingCqtSparseProcessor::processSample ( double sample)

Processes a single audio sample.

Parameters
sampleThe audio sample to process.
Returns
The processed sample.

The documentation for this class was generated from the following files:
  • /home/runner/work/CiCueTea/CiCueTea/Include/CQTProcessor.hpp
  • /home/runner/work/CiCueTea/CiCueTea/Source/CQTProcessor.cpp