Krotos Modules 3
Loading...
Searching...
No Matches
krotos::TimeDomainAnalysisFramework Class Reference

#include <TimeDomainAnalysisFramework.h>

Public Member Functions

 TimeDomainAnalysisFramework (int analysisFrameSize, int sampleRate)
 
void setSamplingFrequency (int fs)
 
void setSignalEnvelopeSmoothingFactor (float smoothingFactor)
 
int getSamplingFrequency ()
 
void setSignalFrame (std::vector< float > spectralFrame)
 
float getPeakEnergy ()
 
float getPitchMcLeod ()
 
float getPitchAutocorrelation ()
 
float getRMS ()
 
float getSignalEnvelope ()
 
float getEnergyDifference ()
 

Private Member Functions

void initialisePitchTrackingAlgorithms ()
 

Private Attributes

int m_samplingFrequency {-1}
 
int m_signalFrameSize {-1}
 
std::vector< float > m_signalFrame
 
bool m_rmsCalculated
 
float m_rmsValue
 
bool m_energyDifferenceCalculated
 
float m_energyDifferenceValue
 
float m_previousEnergyDifferenceValue
 
LowpassFilter m_lowpassFilter
 
McLeod m_pitchTrackerMcLeod
 
Autocorrelation m_pitchTrackerAutocorrelation
 
float m_pitchMcLeod {0.0f}
 
float m_pitchAutocorrelation {0.0f}
 

Constructor & Destructor Documentation

◆ TimeDomainAnalysisFramework()

krotos::TimeDomainAnalysisFramework::TimeDomainAnalysisFramework ( int analysisFrameSize,
int sampleRate )

Constructor. Initialises the

Parameters
inputFrameIncrementthe distance moved between analysed frames
analysisBufferSizethe audio analysis buffer size
fsthe sampling frequency

Copyright Krotos LTD 2015

All rights reserved.

Member Function Documentation

◆ getEnergyDifference()

float krotos::TimeDomainAnalysisFramework::getEnergyDifference ( )

@Returns the change in energy over time

◆ getPeakEnergy()

float krotos::TimeDomainAnalysisFramework::getPeakEnergy ( )

@Returns the peak energy of the audio analysis buffer

◆ getPitchAutocorrelation()

float krotos::TimeDomainAnalysisFramework::getPitchAutocorrelation ( )

@Returns the pitch of the audio analysis buffer by autocorrelation method

◆ getPitchMcLeod()

float krotos::TimeDomainAnalysisFramework::getPitchMcLeod ( )

@Returns the pitch of the audio analysis buffer by McLeod method

◆ getRMS()

float krotos::TimeDomainAnalysisFramework::getRMS ( )

@Returns the RMS energy of the audio analysis buffer

◆ getSamplingFrequency()

int krotos::TimeDomainAnalysisFramework::getSamplingFrequency ( )

@Returns the sampling frequency

◆ getSignalEnvelope()

float krotos::TimeDomainAnalysisFramework::getSignalEnvelope ( )

@Returns the signal envelope

◆ initialisePitchTrackingAlgorithms()

void krotos::TimeDomainAnalysisFramework::initialisePitchTrackingAlgorithms ( )
private

Sets spectral frame and the spectral frame Size

◆ setSamplingFrequency()

void krotos::TimeDomainAnalysisFramework::setSamplingFrequency ( int fs)

Sets the sampling frequency to be used for audio analysis

Parameters
fsthe sampling frequency to be used

◆ setSignalEnvelopeSmoothingFactor()

void krotos::TimeDomainAnalysisFramework::setSignalEnvelopeSmoothingFactor ( float smoothingFactor)

Sets the smoothing factor for the signal envelope.

Parameters
smoothingFactorthe smoothing factor, where 1 is the most filtered, 0 is no smoothing at all

◆ setSignalFrame()

void krotos::TimeDomainAnalysisFramework::setSignalFrame ( std::vector< float > spectralFrame)

Receives a spectral frame to perform some analysis calculations and analysis features upon.

Member Data Documentation

◆ m_energyDifferenceCalculated

bool krotos::TimeDomainAnalysisFramework::m_energyDifferenceCalculated
private

◆ m_energyDifferenceValue

float krotos::TimeDomainAnalysisFramework::m_energyDifferenceValue
private

◆ m_lowpassFilter

LowpassFilter krotos::TimeDomainAnalysisFramework::m_lowpassFilter
private

◆ m_pitchAutocorrelation

float krotos::TimeDomainAnalysisFramework::m_pitchAutocorrelation {0.0f}
private

◆ m_pitchMcLeod

float krotos::TimeDomainAnalysisFramework::m_pitchMcLeod {0.0f}
private

◆ m_pitchTrackerAutocorrelation

Autocorrelation krotos::TimeDomainAnalysisFramework::m_pitchTrackerAutocorrelation
private

◆ m_pitchTrackerMcLeod

McLeod krotos::TimeDomainAnalysisFramework::m_pitchTrackerMcLeod
private

◆ m_previousEnergyDifferenceValue

float krotos::TimeDomainAnalysisFramework::m_previousEnergyDifferenceValue
private

◆ m_rmsCalculated

bool krotos::TimeDomainAnalysisFramework::m_rmsCalculated
private

◆ m_rmsValue

float krotos::TimeDomainAnalysisFramework::m_rmsValue
private

◆ m_samplingFrequency

int krotos::TimeDomainAnalysisFramework::m_samplingFrequency {-1}
private

◆ m_signalFrame

std::vector<float> krotos::TimeDomainAnalysisFramework::m_signalFrame
private

◆ m_signalFrameSize

int krotos::TimeDomainAnalysisFramework::m_signalFrameSize {-1}
private

The documentation for this class was generated from the following files: