SpectMorph
Public Member Functions | Public Attributes | List of all members
SpectMorph::EncoderParams Class Reference

Encoder parameters. More...

#include <smencoder.hh>

Public Member Functions

bool add_config_entry (const std::string &param, const std::string &value)
 
bool load_config (const std::string &filename)
 
bool get_param (const std::string &param, double &value) const
 
bool get_param (const std::string &param, std::string &value) const
 
void setup_params (const WavData &wav_data, double fundamental_freq)
 
void set_kill_function (const std::function< bool()> &kill_function)
 

Public Attributes

float mix_freq = 0
 
float frame_step_ms = 0
 
float frame_size_ms = 0
 
int zeropad = 0
 
size_t frame_step = 0
 
size_t frame_size = 0
 
size_t block_size = 0
 
double fundamental_freq = 0
 
bool enable_phases = true
 
std::vector< float > window
 
std::function< bool()> kill_function
 

Detailed Description

Encoder parameters.

This struct contains parameters that configure the encoder algorithm.

Member Function Documentation

◆ set_kill_function()

void EncoderParams::set_kill_function ( const std::function< bool()> &  kill_function)

to be able to terminate encoder before we are done

◆ setup_params()

void EncoderParams::setup_params ( const WavData wav_data,
double  fundamental_freq 
)

use sane defaults for every parameter:

Member Data Documentation

◆ block_size

size_t SpectMorph::EncoderParams::block_size = 0

analysis block size in samples, must be the smallest power of N greater than frame_size

◆ enable_phases

bool SpectMorph::EncoderParams::enable_phases = true

whether to generate phases in output

◆ frame_size

size_t SpectMorph::EncoderParams::frame_size = 0

size of the analysis frame in samples

◆ frame_size_ms

float SpectMorph::EncoderParams::frame_size_ms = 0

size of one analysis frame in milliseconds

◆ frame_step

size_t SpectMorph::EncoderParams::frame_step = 0

size of the frame step in samples

◆ frame_step_ms

float SpectMorph::EncoderParams::frame_step_ms = 0

step size for analysis frames in milliseconds

◆ fundamental_freq

double SpectMorph::EncoderParams::fundamental_freq = 0

user defined fundamental freq

◆ kill_function

std::function<bool()> SpectMorph::EncoderParams::kill_function

allow termination during encode()

◆ mix_freq

float SpectMorph::EncoderParams::mix_freq = 0

sample rate of the original audio file

◆ window

std::vector<float> SpectMorph::EncoderParams::window

window to be used for analysis (needs to have block_size entries)

◆ zeropad

int SpectMorph::EncoderParams::zeropad = 0

lower bound for the amount of zero padding used during analysis


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