OpenShot Library | libopenshot  0.2.7
Public Member Functions | Protected Attributes | List of all members
openshot::STFT Class Reference

#include <audio_effects/STFT.h>

Inheritance diagram for openshot::STFT:
openshot::Robotization::RobotizationEffect openshot::Whisperization::WhisperizationEffect

Public Member Functions

void process (juce::AudioSampleBuffer &block)
 
void setup (const int num_input_channels)
 
 STFT ()
 
virtual void updateFftSize (const int new_fft_size)
 
virtual void updateHopSize (const int new_overlap)
 
void updateParameters (const int new_fft_size, const int new_overlap, const int new_window_type)
 
virtual void updateWindow (const int new_window_type)
 
virtual ~STFT ()
 

Protected Attributes

int current_input_buffer_write_position
 
int current_output_buffer_read_position
 
int current_output_buffer_write_position
 
int current_samples_since_last_FFT
 
std::unique_ptr< juce::dsp::FFT > fft
 
int fft_size
 
juce::HeapBlock< float > fft_window
 
juce::HeapBlock< juce::dsp::Complex< float > > frequency_domain_buffer
 
int hop_size
 
juce::AudioSampleBuffer input_buffer
 
int input_buffer_length
 
int input_buffer_write_position
 
int num_channels
 
int num_samples
 
juce::AudioSampleBuffer output_buffer
 
int output_buffer_length
 
int output_buffer_read_position
 
int output_buffer_write_position
 
int overlap
 
int samples_since_last_FFT
 
juce::HeapBlock< juce::dsp::Complex< float > > time_domain_buffer
 
float window_scale_factor
 
int window_type
 

Detailed Description

Definition at line 13 of file STFT.h.

Constructor & Destructor Documentation

◆ STFT()

openshot::STFT::STFT ( )
inline

Definition at line 16 of file STFT.h.

◆ ~STFT()

virtual openshot::STFT::~STFT ( )
inlinevirtual

Definition at line 18 of file STFT.h.

Member Function Documentation

◆ process()

void STFT::process ( juce::AudioSampleBuffer &  block)

◆ setup()

void STFT::setup ( const int  num_input_channels)

Definition at line 5 of file STFT.cpp.

Referenced by openshot::Robotization::GetFrame(), and openshot::Whisperization::GetFrame().

◆ updateFftSize()

void STFT::updateFftSize ( const int  new_fft_size)
virtual

Definition at line 58 of file STFT.cpp.

Referenced by updateParameters().

◆ updateHopSize()

void STFT::updateHopSize ( const int  new_overlap)
virtual

Definition at line 89 of file STFT.cpp.

Referenced by updateParameters().

◆ updateParameters()

void STFT::updateParameters ( const int  new_fft_size,
const int  new_overlap,
const int  new_window_type 
)

◆ updateWindow()

void STFT::updateWindow ( const int  new_window_type)
virtual

Definition at line 103 of file STFT.cpp.

Referenced by updateParameters().

Member Data Documentation

◆ current_input_buffer_write_position

int openshot::STFT::current_input_buffer_write_position
protected

Definition at line 67 of file STFT.h.

Referenced by process().

◆ current_output_buffer_read_position

int openshot::STFT::current_output_buffer_read_position
protected

Definition at line 69 of file STFT.h.

Referenced by process().

◆ current_output_buffer_write_position

int openshot::STFT::current_output_buffer_write_position
protected

Definition at line 68 of file STFT.h.

Referenced by process().

◆ current_samples_since_last_FFT

int openshot::STFT::current_samples_since_last_FFT
protected

Definition at line 70 of file STFT.h.

Referenced by process().

◆ fft

std::unique_ptr<juce::dsp::FFT> openshot::STFT::fft
protected

Definition at line 45 of file STFT.h.

Referenced by updateFftSize().

◆ fft_size

int openshot::STFT::fft_size
protected

Definition at line 44 of file STFT.h.

Referenced by updateFftSize(), updateHopSize(), and updateWindow().

◆ fft_window

juce::HeapBlock<float> openshot::STFT::fft_window
protected

Definition at line 53 of file STFT.h.

Referenced by updateFftSize(), and updateWindow().

◆ frequency_domain_buffer

juce::HeapBlock<juce::dsp::Complex<float> > openshot::STFT::frequency_domain_buffer
protected

Definition at line 55 of file STFT.h.

Referenced by updateFftSize().

◆ hop_size

int openshot::STFT::hop_size
protected

Definition at line 58 of file STFT.h.

Referenced by process(), and updateHopSize().

◆ input_buffer

juce::AudioSampleBuffer openshot::STFT::input_buffer
protected

Definition at line 48 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ input_buffer_length

int openshot::STFT::input_buffer_length
protected

Definition at line 47 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ input_buffer_write_position

int openshot::STFT::input_buffer_write_position
protected

Definition at line 62 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ num_channels

int openshot::STFT::num_channels
protected

Definition at line 41 of file STFT.h.

Referenced by process(), setup(), and updateFftSize().

◆ num_samples

int openshot::STFT::num_samples
protected

Definition at line 42 of file STFT.h.

Referenced by process().

◆ output_buffer

juce::AudioSampleBuffer openshot::STFT::output_buffer
protected

Definition at line 51 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ output_buffer_length

int openshot::STFT::output_buffer_length
protected

Definition at line 50 of file STFT.h.

Referenced by process(), updateFftSize(), and updateHopSize().

◆ output_buffer_read_position

int openshot::STFT::output_buffer_read_position
protected

Definition at line 64 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ output_buffer_write_position

int openshot::STFT::output_buffer_write_position
protected

Definition at line 63 of file STFT.h.

Referenced by process(), updateFftSize(), and updateHopSize().

◆ overlap

int openshot::STFT::overlap
protected

Definition at line 57 of file STFT.h.

Referenced by updateHopSize(), and updateWindow().

◆ samples_since_last_FFT

int openshot::STFT::samples_since_last_FFT
protected

Definition at line 65 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ time_domain_buffer

juce::HeapBlock<juce::dsp::Complex<float> > openshot::STFT::time_domain_buffer
protected

Definition at line 54 of file STFT.h.

Referenced by updateFftSize().

◆ window_scale_factor

float openshot::STFT::window_scale_factor
protected

Definition at line 60 of file STFT.h.

Referenced by updateWindow().

◆ window_type

int openshot::STFT::window_type
protected

Definition at line 59 of file STFT.h.

Referenced by updateWindow().


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