CiCueTea v0.0.1
Loading...
Searching...
No Matches
jsa::cicuetea::NsgfCqtDense Class Reference

Dense implementation of the NSGF-CQT. More...

#include <CQT.hpp>

Inheritance diagram for jsa::cicuetea::NsgfCqtDense:
jsa::cicuetea::NsgfCqtCommon

Public Member Functions

 NsgfCqtDense (double sampleRate, Eigen::Index numSamples, double fraction, double minFrequency, double maxFrequency, double refFrequency)
 Constructor for NsgfCqtDense.
void forward (const Eigen::ArrayXd &x, Eigen::ArrayXXcd &Xcq)
 Performs the forward NSGF-CQT transformation.
void inverse (const Eigen::ArrayXXcd &Xcq, Eigen::ArrayXd &x)
 Performs the inverse NSGF-CQT transformation.
const Eigen::ArrayXXd & getFrame () const
const Eigen::ArrayXXd & getDualFrame () const
Public Member Functions inherited from jsa::cicuetea::NsgfCqtCommon
 NsgfCqtCommon (double sampleRate, Eigen::Index numSamples, double fraction, double minFrequency, double maxFrequency, double refFrequency)
 Constructor for NsgfCqtCommon.
bool isValid () const
 True when the object is usable: the configuration passed validate() and the constructed frame passed the measured health check (see checkFrameHealth()).
double getFrameConditionNumber () const
 Condition number of the painless frame operator, max(d)/min(d) up to Nyquist. Advisory: reconstruction error amplifies by roughly cond·ε, so values ≲ 1e6 keep double-precision round trips near 1e-10. Returns +inf when the object is invalid.
double getSampleRate () const
Eigen::Index getBlockSize () const
 Synonym of getNumSamps().
Eigen::Index getNumSamps () const
 Synonym of getBlockSize().
double getFraction () const
double getPpo () const
double getMinFreq () const
double getMaxFreq () const
double getRefFreq () const
Eigen::Index getNumFreqs () const
Eigen::Index getNumBands () const
const Eigen::ArrayXd & getFrequencyAxis () const
const Eigen::ArrayXd & getBandAxis () const
const Eigen::ArrayXd & getDiagonalization () const

Additional Inherited Members

Protected Member Functions inherited from jsa::cicuetea::NsgfCqtCommon
bool checkFrameHealth () const
 Measured frame-health check on the constructed frame operator.
Static Protected Member Functions inherited from jsa::cicuetea::NsgfCqtCommon
static bool validate (double fs, Eigen::Index nSamps, double frac, double fMin, double fMax, double fRef)
 Checks the structural validity conditions for a configuration.
static BandInfo computeBandInfo (double frac, double fMin, double fMax, double fRef)
 Computes band information for the filterbank.
Protected Attributes inherited from jsa::cicuetea::NsgfCqtCommon
const bool valid
 Structural validity: result of validate().
bool frameOk = true
 Measured frame health; set by derived ctors.
const double fs
 Sampling rate (Hz).
const Eigen::Index nSamps
 Number of samples in a block (0 when invalid).
const double frac
 Reciprocal of bands per octave.
const double fMin
 Minimum frequency (Hz).
const double fMax
 Maximum frequency (Hz).
const double fRef
 Reference frequency (Hz).
const BandInfo bandInfo
 Band information.
const Eigen::Index nBands
 Total number of bands.
const Eigen::Index nFreqs
 Number of frequencies.
Eigen::ArrayXd bax
 Band axis.
Eigen::ArrayXd fax
 Frequency axis.
Eigen::ArrayXd d
 Diagonalization array.
Eigen::ArrayXcd Xdft
 DFT of the signal.
DFT dft
 Discrete Fourier Transform object.
Static Protected Attributes inherited from jsa::cicuetea::NsgfCqtCommon
static constexpr double dHealthTol = 1e-6
static constexpr double th = 1e-6
static constexpr Eigen::Index minAtomSupport = 4

Detailed Description

Dense implementation of the NSGF-CQT.

This class provides methods for forward and inverse NSGF-CQT transformations using a dense representation of the filterbank.

Constructor & Destructor Documentation

◆ NsgfCqtDense()

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

Constructor for NsgfCqtDense.

Parameters
sampleRateSampling rate of the signal (Hz).
numSamplesNumber of samples in the signal.
fractionReciprocal of bands per octave (e.g. 1.0/12 for 12 bands/octave); fractional values allowed.
minFrequencyMinimum frequency of the filterbank (Hz).
maxFrequencyMaximum frequency of the filterbank (Hz).
refFrequencyReference frequency for the filterbank (Hz).

Member Function Documentation

◆ forward()

void NsgfCqtDense::forward ( const Eigen::ArrayXd & x,
Eigen::ArrayXXcd & Xcq )

Performs the forward NSGF-CQT transformation.

Parameters
xInput signal.
XcqOutput constant-Q transform coefficients.

◆ inverse()

void NsgfCqtDense::inverse ( const Eigen::ArrayXXcd & Xcq,
Eigen::ArrayXd & x )

Performs the inverse NSGF-CQT transformation.

Parameters
XcqInput constant-Q transform coefficients.
xOutput reconstructed signal.

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