From 2b077a13a20ef3cc4a8217ea5c644dbf35f88930 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 15 May 2025 14:00:27 +0200 Subject: [PATCH] clean up includes --- clip/aw_clipsoftly.h | 1 + clip/aw_tube2.h | 1 + dynamics/aw_pop2.h | 1 + dynamics/pump.h | 5 ++++- filter/aw_eq.h | 1 + filter/ybandpass.h | 2 +- filter/yhighpass.h | 2 +- filter/ylowpass.h | 2 +- filter/ynotch.h | 2 +- synth/midi_synth.h | 1 - synth/tx_envelope.h | 1 + util/retro_buf.h | 3 +-- 12 files changed, 14 insertions(+), 8 deletions(-) diff --git a/clip/aw_clipsoftly.h b/clip/aw_clipsoftly.h index cd6b236..b15f1fe 100644 --- a/clip/aw_clipsoftly.h +++ b/clip/aw_clipsoftly.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include namespace trnr { // soft clipper based on ClipSoftly by Chris Johnson diff --git a/clip/aw_tube2.h b/clip/aw_tube2.h index 56fa4fa..d3e102e 100644 --- a/clip/aw_tube2.h +++ b/clip/aw_tube2.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include namespace trnr { // modeled tube preamp based on tube2 by Chris Johnson diff --git a/dynamics/aw_pop2.h b/dynamics/aw_pop2.h index 7282f75..4694f9d 100644 --- a/dynamics/aw_pop2.h +++ b/dynamics/aw_pop2.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include namespace trnr { // compressor based on pop2 by Chris Johnson diff --git a/dynamics/pump.h b/dynamics/pump.h index 2cdc5c6..b619354 100644 --- a/dynamics/pump.h +++ b/dynamics/pump.h @@ -1,5 +1,8 @@ #pragma once +#include +#include "audio_math.h" + namespace trnr { template class pump { @@ -91,7 +94,7 @@ public: // transfer function float gain_reduction_db = envelope_db * (slope - 1.0); - float gain_reduction_lin = trnr::db_2_lin(gain_reduction_db); + float gain_reduction_lin = db_2_lin(gain_reduction_db); // compress left and right signals sample output_l = input_l * gain_reduction_lin; diff --git a/filter/aw_eq.h b/filter/aw_eq.h index 8b5bb8f..2b7e878 100644 --- a/filter/aw_eq.h +++ b/filter/aw_eq.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include namespace trnr { // 3 band equalizer with high/lowpass filters based on EQ by Chris Johnson. diff --git a/filter/ybandpass.h b/filter/ybandpass.h index 5ad1098..eab2cf3 100644 --- a/filter/ybandpass.h +++ b/filter/ybandpass.h @@ -2,7 +2,7 @@ #define _USE_MATH_DEFINES #include #include -#include +#include namespace trnr { template diff --git a/filter/yhighpass.h b/filter/yhighpass.h index 5bef148..e32e2e7 100644 --- a/filter/yhighpass.h +++ b/filter/yhighpass.h @@ -2,7 +2,7 @@ #define _USE_MATH_DEFINES #include #include -#include +#include namespace trnr { template diff --git a/filter/ylowpass.h b/filter/ylowpass.h index bf82b54..a200f2d 100644 --- a/filter/ylowpass.h +++ b/filter/ylowpass.h @@ -2,7 +2,7 @@ #define _USE_MATH_DEFINES #include #include -#include +#include namespace trnr { template diff --git a/filter/ynotch.h b/filter/ynotch.h index f9d52c2..a16e6ba 100644 --- a/filter/ynotch.h +++ b/filter/ynotch.h @@ -2,7 +2,7 @@ #define _USE_MATH_DEFINES #include #include -#include +#include namespace trnr { template diff --git a/synth/midi_synth.h b/synth/midi_synth.h index bab3a12..caecdfa 100644 --- a/synth/midi_synth.h +++ b/synth/midi_synth.h @@ -3,7 +3,6 @@ #include "midi_event.h" #include "voice_allocator.h" #include -#include #include namespace trnr { diff --git a/synth/tx_envelope.h b/synth/tx_envelope.h index 782a802..7fd83d5 100644 --- a/synth/tx_envelope.h +++ b/synth/tx_envelope.h @@ -1,5 +1,6 @@ #pragma once #include +#include namespace trnr { diff --git a/util/retro_buf.h b/util/retro_buf.h index fa0d719..9fdca8d 100644 --- a/util/retro_buf.h +++ b/util/retro_buf.h @@ -2,7 +2,6 @@ #include "../filter/chebyshev.h" #include "../companding/ulaw.h" -#include namespace trnr { @@ -130,7 +129,7 @@ private: double wrap(double value, double max) { while (value > max) { - value =- max; + value -= max; } return value; }