fix a few bugs in synth(pp)_{mono,poly}

This commit is contained in:
Stefano D'Angelo 2024-02-24 19:23:25 +01:00
parent ba9fdc710c
commit 5a4b9dc9b3
4 changed files with 9 additions and 9 deletions

View File

@ -180,8 +180,8 @@ static void plugin_set_sample_rate(plugin *instance, float sample_rate) {
instance->sync_count = (size_t)bw_roundf(sample_rate * SYNC_RATE);
instance->noise_kv[0] = 6.f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs) * bw_pink_filt_get_scaling_k(&instance->pink_filt_coeffs);
instance->noise_kv[1] = 0.1f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs);
instance->noise_kv[0] = 0.1f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs);
instance->noise_kv[1] = 6.f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs) * bw_pink_filt_get_scaling_k(&instance->pink_filt_coeffs);
}
static size_t plugin_mem_req(plugin *instance) {

View File

@ -171,7 +171,7 @@ static void plugin_init(plugin *instance) {
instance->rand_state = 0xbaddecaf600dfeed;
for (int i = 0; i < N_VOICES; j++) {
for (int i = 0; i < N_VOICES; i++) {
instance->b0[i] = instance->voices[i].buf[0];
instance->b1[i] = instance->voices[i].buf[1];
instance->b2[i] = instance->voices[i].buf[2];
@ -218,8 +218,8 @@ static void plugin_set_sample_rate(plugin *instance, float sample_rate) {
instance->sync_count = (size_t)bw_roundf(sample_rate * SYNC_RATE);
instance->noise_kv[0] = 6.f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs) * bw_pink_filt_get_scaling_k(&instance->pink_filt_coeffs);
instance->noise_kv[1] = 0.1f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs);
instance->noise_kv[0] = 0.1f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs);
instance->noise_kv[1] = 6.f * bw_noise_gen_get_scaling_k(&instance->noise_gen_coeffs) * bw_pink_filt_get_scaling_k(&instance->pink_filt_coeffs);
}
static size_t plugin_mem_req(plugin *instance) {

View File

@ -166,8 +166,8 @@ void impl_set_sample_rate(impl handle, float sample_rate) {
instance->syncCount = (size_t)bw_roundf(sample_rate * SYNC_RATE);
instance->noiseKV[0] = 6.f * instance->noiseGen.getScalingK() * instance->pinkFilt.getScalingK();
instance->noiseKV[1] = 0.1f * instance->noiseGen.getScalingK();
instance->noiseKV[0] = 0.1f * instance->noiseGen.getScalingK();
instance->noiseKV[1] = 6.f * instance->noiseGen.getScalingK() * instance->pinkFilt.getScalingK();
}
void impl_reset(impl handle) {

View File

@ -202,8 +202,8 @@ void impl_set_sample_rate(impl handle, float sample_rate) {
instance->syncCount = (size_t)bw_roundf(sample_rate * SYNC_RATE);
instance->noiseKV[0] = 6.f * instance->noiseGen.getScalingK() * instance->pinkFilt.getScalingK();
instance->noiseKV[1] = 0.1f * instance->noiseGen.getScalingK();
instance->noiseKV[0] = 0.1f * instance->noiseGen.getScalingK();
instance->noiseKV[1] = 6.f * instance->noiseGen.getScalingK() * instance->pinkFilt.getScalingK();
}
void impl_reset(impl handle) {