ref: 98bd108b19d300d9bda1c4cf19b2ea33a740493f
parent: 30770cd56474197cdc8faed47ebfb844294071fd
author: Jeff Snyder <jeff@snyderphonics.com>
date: Mon Jan 14 12:07:44 EST 2019
cleaned up hihat object
--- a/LEAF/Inc/leaf-808.h
+++ b/LEAF/Inc/leaf-808.h
@@ -80,6 +80,7 @@
void t808Hihat_setOscBandpassFreq (t808Hihat* const, float freq);
void t808Hihat_setOscBandpassQ (t808Hihat* const hihat, float Q);
void t808Hihat_setStickBandPassFreq (t808Hihat* const, float freq);
+void t808Hihat_setStickBandPassQ (t808Hihat* const hihat, float Q);
void t808Hihat_setOscFreq (t808Hihat* const, float freq);
void t808Hihat_setStretch (t808Hihat* const hihat, float stretch);
void t808Hihat_setFM (t808Hihat* const hihat, float FM_amount);
--- a/LEAF/Src/leaf-808.c
+++ b/LEAF/Src/leaf-808.c
@@ -155,7 +155,6 @@
void t808Hihat_setDecay(t808Hihat* const hihat, float decay)
{
tEnvelope_setDecay(&hihat->envGain,decay);
- tEnvelope_setDecay(&hihat->noiseFMGain,decay);
}
void t808Hihat_setHighpassFreq(t808Hihat* const hihat, float freq)
@@ -188,7 +187,13 @@
tSVF_setFreq(&hihat->bandpassStick,freq);
}
+void t808Hihat_setStickBandPassQ(t808Hihat* const hihat, float Q)
+{
+ tSVF_setQ(&hihat->bandpassStick,Q);
+}
+
+
void t808Hihat_setOscFreq(t808Hihat* const hihat, float freq)
{
hihat->freq = freq;
@@ -201,23 +206,21 @@
tSquare_init(&hihat->p[i]);
}
- tNoise_init(&hihat->stick, WhiteNoise);
+ tNoise_init(&hihat->stick, PinkNoise);
tNoise_init(&hihat->n, WhiteNoise);
// need to fix SVF to be generic
- tSVF_init(&hihat->bandpassStick, SVFTypeBandpass,2500.0,1.2f);
- tSVF_init(&hihat->bandpassOsc, SVFTypeBandpass,3500,0.3f);
+ tSVF_init(&hihat->bandpassStick, SVFTypeBandpass,2500.0f,1.2f);
+ tSVF_init(&hihat->bandpassOsc, SVFTypeBandpass,3500.0f,0.3f);
tEnvelope_init(&hihat->envGain, 0.0f, 50.0f, OFALSE);
- tEnvelope_init(&hihat->noiseFMGain, 0.0f, 500.0f, OFALSE);
- tEnvelope_init(&hihat->envStick, 0.0f, 4.0f, OFALSE);
+ tEnvelope_init(&hihat->envStick, 0.0f, 7.0f, OFALSE);
tHighpass_init(&hihat->highpass, 7000.0f);
hihat->freq = 40.0f;
hihat->stretch = 0.0f;
- hihat->FM_amount = 1000.0f;
-
+
tSquare_setFreq(&hihat->p[0], 2.0f * hihat->freq);
tSquare_setFreq(&hihat->p[1], 3.00f * hihat->freq);
tSquare_setFreq(&hihat->p[2], 4.16f * hihat->freq);
--- a/LEAF/Src/leaf-math.c
+++ b/LEAF/Src/leaf-math.c
@@ -58,7 +58,7 @@
return (69.0f + 12.0f * log2(f * INV_440));
}
-// Erbe shaper
+// Jones shaper
float LEAF_shaper(float input, float m_drive)
{
float fx = input * 2.0f; // prescale