ref: becf0913b0f88deee966cc4330347efa1c15d764
parent: 36ee16b1cc0d164245df413860b91718285498b6
parent: b0f54b934de962a04c77ec53da5d6916ea150843
author: mulshine <mulshine@princeton.edu>
date: Mon Jan 21 10:43:28 EST 2019
Merge branch 'master' of https://github.com/spiricom/LEAF
--- 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
@@ -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/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