mandelellis::mandelellis() : // initialize method configuration parameters sample_rate(22050), window_size(1024), hop(0.5f), max_pcmlength(60*sample_rate), ps_bins(window_size/2+1), mel_bins(36), mfcc_bins(20), // spectra and filters ps(windowfunction::hann(window_size), hop), mel(ps_bins, mel_bins, sample_rate), mfccs(mel_bins, mfcc_bins), gs(mfcc_bins) { // Configure the musly_track features and save the musly_track offsets // the feature mean track_mu = track_addfield_floats("gaussian.mu", gs.get_dim()); // add the covariance (symmetric matrix) track_covar = track_addfield_floats("gaussian.covar", gs.get_covarelems()); // add the covariance (symmetric matrix) track_covar_inverse = track_addfield_floats("gaussian.covar_inverse", gs.get_covarelems()); }
timbre::timbre() : // initialize method configuration parameters sample_rate(22050), window_size(1024), hop(0.5f), max_pcmlength(60*sample_rate), ps_bins(window_size/2+1), mel_bins(36), mfcc_bins(25), // spectra and filters ps(windowfunction::hann(window_size), hop), mel(ps_bins, mel_bins, sample_rate), mfccs(mel_bins, mfcc_bins), gs(mfcc_bins), mp(this) { // Configure the musly_track features and save the musly_track offsets // the feature mean track_mu = track_addfield_floats("gaussian.mu", gs.get_dim()); // add the covariance (symmetric matrix) track_covar = track_addfield_floats("gaussian.covar", gs.get_covarelems()); // add the log(det(covar)) of the covariance for performance reasons track_logdet = track_addfield_floats("gaussian.covar_logdet", 1); // React on changes to the trackid mapping in the ordered_idpool idpool.set_observer(this); }