From 7b20af0eec0c10ba7cd19c942db1ac62f9c0cf09 Mon Sep 17 00:00:00 2001 From: Dimas Leenman Date: Wed, 20 Jul 2022 14:31:00 +0200 Subject: [PATCH] proper macros I hope --- src/dsp/mod.rs | 14 +++++++------- src/dsp/node_formant.rs | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/dsp/mod.rs b/src/dsp/mod.rs index 0a54d15..aede570 100644 --- a/src/dsp/mod.rs +++ b/src/dsp/mod.rs @@ -972,6 +972,12 @@ macro_rules! node_list { (1 offs n_id d_id r_s f_def stp_d -1.0, 1.0, 0.0) {2 0 mode setting(0) mode fa_noise_mode 0 1} [0 sig], + formant => Formant UIType::Generic UICategory::Osc + (0 freq n_pit d_pit r_fq f_freq stp_d 0.0, 1.0, 0.5) + (1 form n_pit d_pit r_fq f_freq stp_d 0.0, 1.0, 0.5) + (2 atk n_pit d_pit r_fq f_freq stp_d 0.0, 1.0, 0.5) + (3 dcy n_pit d_pit r_fq f_freq stp_d 0.0, 1.0, 0.5) + [0 sig], sfilter => SFilter UIType::Generic UICategory::Signal (0 inp n_id d_id r_id f_def stp_d -1.0, 1.0, 0.0) (1 freq n_pit d_pit r_fq f_freq stp_d -1.0, 0.5647131, 1000.0) @@ -1004,13 +1010,7 @@ macro_rules! node_list { (14 mix n_id d_id r_id f_def stp_d 0.0, 1.0, 0.5) [0 sig_l] [1 sig_r], - formant => Formant UIType::Generic UICategory::Signal - (0 freq n_id d_id r_id f_def stp_d 0.0, 1.0, 0.5) - (1 form n_id d_id r_id f_def stp_d 0.0, 1.0, 0.5) - (2 atk n_id d_id r_id f_def stp_d 0.0, 1.0, 0.5) - (3 dcy n_id d_id r_id f_def stp_d 0.0, 1.0, 0.5) - [0 sig], - test => Test UIType::Generic UICategory::IOUtil + test => Test UIType::Generic UICategory::IOUtil (0 f n_id d_id r_id f_def stp_d 0.0, 1.0, 0.5) {1 0 p param(0.0) knob fa_test_s 0 10} {2 1 trig param(0.0) knob fa_test_s 0 0} diff --git a/src/dsp/node_formant.rs b/src/dsp/node_formant.rs index 50d5086..3084c29 100644 --- a/src/dsp/node_formant.rs +++ b/src/dsp/node_formant.rs @@ -63,10 +63,10 @@ impl DspNode for Formant { for frame in 0..ctx.nframes() { // get the inputs - let base_freq = denorm::Sampl::freq(base_freq, frame); - let formant_freq = denorm::Sampl::freq(formant_freq, frame); - let attack_freq = denorm::Sampl::freq(attack_freq, frame); - let decay_freq = denorm::Sampl::freq(decay_freq, frame); + let base_freq = denorm::Formant::freq(base_freq, frame); + let formant_freq = denorm::Formant::freq(formant_freq, frame); + let attack_freq = denorm::Formant::freq(attack_freq, frame); + let decay_freq = denorm::Formant::freq(decay_freq, frame); // where the two decays meet let carrier_center = decay_freq / (attack_freq + decay_freq);