Skip to content

Commit 1783fe5

Browse files
committed
chore(polysynth): make logging less verbose
1 parent eee3c5b commit 1783fe5

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

examples/polysynth/src/dsp.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use crate::params::{FilterParams, FilterType, OscShape, PolysynthParams};
2-
use crate::{SynthSample, MAX_BUFFER_SIZE, NUM_VOICES, OVERSAMPLE};
2+
use crate::{MAX_BUFFER_SIZE, NUM_VOICES, OVERSAMPLE};
33
use fastrand::Rng;
44
use fastrand_contrib::RngExt;
5-
use nih_plug::nih_log;
6-
use nih_plug::util::{db_to_gain, db_to_gain_fast};
5+
use nih_plug::util::db_to_gain;
76
use num_traits::{ConstOne, ConstZero};
87
use numeric_literals::replace_float_literals;
98
use std::sync::atomic::{AtomicU64, Ordering};
@@ -16,11 +15,10 @@ use valib::filters::svf::Svf;
1615
use valib::math::interpolation::{sine_interpolation, Interpolate, Sine};
1716
use valib::oscillators::polyblep::{SawBLEP, Sawtooth, Square, SquareBLEP, Triangle};
1817
use valib::oscillators::Phasor;
19-
use valib::saturators::{bjt, Asinh, Clipper, Saturator, Tanh};
18+
use valib::saturators::{bjt, Clipper, Saturator, Tanh};
2019
use valib::simd::{SimdBool, SimdValue};
2120
use valib::util::{ratio_to_semitone, semitone_to_ratio};
2221
use valib::voice::dynamic::DynamicVoice;
23-
use valib::voice::polyphonic::Polyphonic;
2422
use valib::voice::upsample::UpsampledVoice;
2523
use valib::voice::{NoteData, Voice};
2624
use valib::Scalar;
@@ -716,7 +714,6 @@ impl<T: ConstZero + ConstOne + Scalar> Voice for RawVoice<T> {
716714
}
717715

718716
fn release(&mut self, _: f32) {
719-
nih_log!("RawVoice: release(_)");
720717
self.vca_env.gate(false);
721718
self.vcf_env.gate(false);
722719
}

examples/polysynth/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ impl Plugin for PolysynthPlugin {
205205
let key = VoiceKey::new(voice_id, channel, note);
206206
let note_data = NoteData::from_midi(note, velocity);
207207
let id = self.voices.note_on(note_data);
208-
nih_log!("Note on {id} <- {key:?}");
209208
self.voice_id_map.add_voice(key, id);
210209
}
211210
NoteEvent::NoteOff {
@@ -217,10 +216,7 @@ impl Plugin for PolysynthPlugin {
217216
} => {
218217
let key = VoiceKey::new(voice_id, channel, note);
219218
if let Some((_, id)) = self.voice_id_map.remove_voice(key) {
220-
nih_log!("Note off {id} <- {key:?}");
221219
self.voices.note_off(id, velocity);
222-
} else {
223-
nih_log!("Note off {key:?}: ID not found");
224220
}
225221
}
226222
NoteEvent::Choke {

0 commit comments

Comments
 (0)