OpenShot Library | libopenshot  0.4.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
openshot::STFT Class Reference

#include <audio_effects/STFT.h>

Inheritance diagram for openshot::STFT:
[legend]
Collaboration diagram for openshot::STFT:
[legend]

Public Member Functions

void process (juce::AudioBuffer< float > &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::AudioBuffer< float > input_buffer
 
int input_buffer_length
 
int input_buffer_write_position
 
int num_channels
 
int num_samples
 
juce::AudioBuffer< float > 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 21 of file STFT.h.

Constructor & Destructor Documentation

◆ STFT()

openshot::STFT::STFT ( )
inline

Definition at line 24 of file STFT.h.

◆ ~STFT()

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

Definition at line 26 of file STFT.h.

Member Function Documentation

◆ process()

void STFT::process ( juce::AudioBuffer< float > &  block)

◆ setup()

void STFT::setup ( const int  num_input_channels)

Definition at line 9 of file STFT.cpp.

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

◆ updateFftSize()

void STFT::updateFftSize ( const int  new_fft_size)
virtual

Definition at line 62 of file STFT.cpp.

Referenced by updateParameters().

◆ updateHopSize()

void STFT::updateHopSize ( const int  new_overlap)
virtual

Definition at line 93 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 107 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 75 of file STFT.h.

Referenced by process().

◆ current_output_buffer_read_position

int openshot::STFT::current_output_buffer_read_position
protected

Definition at line 77 of file STFT.h.

Referenced by process().

◆ current_output_buffer_write_position

int openshot::STFT::current_output_buffer_write_position
protected

Definition at line 76 of file STFT.h.

Referenced by process().

◆ current_samples_since_last_FFT

int openshot::STFT::current_samples_since_last_FFT
protected

Definition at line 78 of file STFT.h.

Referenced by process().

◆ fft

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

Definition at line 53 of file STFT.h.

Referenced by updateFftSize().

◆ fft_size

int openshot::STFT::fft_size
protected

Definition at line 52 of file STFT.h.

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

◆ fft_window

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

Definition at line 61 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 63 of file STFT.h.

Referenced by updateFftSize().

◆ hop_size

int openshot::STFT::hop_size
protected

Definition at line 66 of file STFT.h.

Referenced by process(), and updateHopSize().

◆ input_buffer

juce::AudioBuffer<float> openshot::STFT::input_buffer
protected

Definition at line 56 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ input_buffer_length

int openshot::STFT::input_buffer_length
protected

Definition at line 55 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ input_buffer_write_position

int openshot::STFT::input_buffer_write_position
protected

Definition at line 70 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ num_channels

int openshot::STFT::num_channels
protected

Definition at line 49 of file STFT.h.

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

◆ num_samples

int openshot::STFT::num_samples
protected

Definition at line 50 of file STFT.h.

Referenced by process().

◆ output_buffer

juce::AudioBuffer<float> openshot::STFT::output_buffer
protected

Definition at line 59 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ output_buffer_length

int openshot::STFT::output_buffer_length
protected

Definition at line 58 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 72 of file STFT.h.

Referenced by process(), and updateFftSize().

◆ output_buffer_write_position

int openshot::STFT::output_buffer_write_position
protected

Definition at line 71 of file STFT.h.

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

◆ overlap

int openshot::STFT::overlap
protected

Definition at line 65 of file STFT.h.

Referenced by updateHopSize(), and updateWindow().

◆ samples_since_last_FFT

int openshot::STFT::samples_since_last_FFT
protected

Definition at line 73 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 62 of file STFT.h.

Referenced by updateFftSize().

◆ window_scale_factor

float openshot::STFT::window_scale_factor
protected

Definition at line 68 of file STFT.h.

Referenced by updateWindow().

◆ window_type

int openshot::STFT::window_type
protected

Definition at line 67 of file STFT.h.

Referenced by updateWindow().


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