ref: 9faabab10c43d0dabc1ba467865b95c614bab372
parent: becf0913b0f88deee966cc4330347efa1c15d764
author: mulshine <mulshine@princeton.edu>
date: Mon Jan 21 10:47:02 EST 2019
Synced c/c++.
--- a/LEAF/Inc_cpp/leaf-808.hpp
+++ b/LEAF/Inc_cpp/leaf-808.hpp
@@ -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_cpp/leaf-808.cpp
+++ b/LEAF/Src_cpp/leaf-808.cpp
@@ -156,7 +156,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)
@@ -189,7 +188,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;
@@ -202,23 +207,22 @@
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.5f);
- tSVF_init(&hihat->bandpassOsc, SVFTypeBandpass,3500,0.5f);
+ 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_cpp/leaf-math.cpp
+++ b/LEAF/Src_cpp/leaf-math.cpp
@@ -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