fix a few bugs in synth(pp)_{mono,poly}
This commit is contained in:
parent
ba9fdc710c
commit
5a4b9dc9b3
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user