| 
    SpectMorph
    
   | 
 
#include <smencoder.hh>
Public Member Functions | |
| bool | add_config_entry (const std::string ¶m, const std::string &value) | 
| bool | load_config (const std::string &filename) | 
| bool | get_param (const std::string ¶m, double &value) const | 
| bool | get_param (const std::string ¶m, 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 | 
Encoder parameters.
This struct contains parameters that configure the encoder algorithm.
| void EncoderParams::set_kill_function | ( | const std::function< bool()> & | kill_function | ) | 
to be able to terminate encoder before we are done
| void EncoderParams::setup_params | ( | const WavData & | wav_data, | 
| double | fundamental_freq | ||
| ) | 
use sane defaults for every parameter:
| size_t SpectMorph::EncoderParams::block_size = 0 | 
analysis block size in samples, must be the smallest power of N greater than frame_size
| bool SpectMorph::EncoderParams::enable_phases = true | 
whether to generate phases in output
| size_t SpectMorph::EncoderParams::frame_size = 0 | 
size of the analysis frame in samples
| float SpectMorph::EncoderParams::frame_size_ms = 0 | 
size of one analysis frame in milliseconds
| size_t SpectMorph::EncoderParams::frame_step = 0 | 
size of the frame step in samples
| float SpectMorph::EncoderParams::frame_step_ms = 0 | 
step size for analysis frames in milliseconds
| double SpectMorph::EncoderParams::fundamental_freq = 0 | 
user defined fundamental freq
| std::function<bool()> SpectMorph::EncoderParams::kill_function | 
allow termination during encode()
| float SpectMorph::EncoderParams::mix_freq = 0 | 
sample rate of the original audio file
| std::vector<float> SpectMorph::EncoderParams::window | 
window to be used for analysis (needs to have block_size entries)
| int SpectMorph::EncoderParams::zeropad = 0 | 
lower bound for the amount of zero padding used during analysis
 1.8.17