ref: 23d8a0e92b63c23fd1e3437456080874e4bbd5e0
parent: 60e4c523968e5e528de0dcd8a2050d37fe22901e
author: spiricom <jeff@snyderphonics.com>
date: Fri May 29 16:07:33 EDT 2020
added rosenberg glottal pulse fast setter
--- a/leaf/Inc/leaf-effects.h
+++ b/leaf/Inc/leaf-effects.h
@@ -138,7 +138,7 @@
void tRosenbergGlottalPulse_setOpenLength (tRosenbergGlottalPulse* const, float openLength);
void tRosenbergGlottalPulse_setPulseLength (tRosenbergGlottalPulse* const, float pulseLength);
-
+ void tRosenbergGlottalPulse_setOpenLengthAndPulseLength (tRosenbergGlottalPulse* const gp, float openLength, float pulseLength);
//==============================================================================
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
--- a/leaf/Src/leaf-effects.c
+++ b/leaf/Src/leaf-effects.c
@@ -621,6 +621,13 @@
g->pulseLength = pulseLength;
}
+void tRosenbergGlottalPulse_setOpenLengthAndPulseLength (tRosenbergGlottalPulse* const gp, float openLength, float pulseLength)
+{
+ _tRosenbergGlottalPulse* g = *gp;
+ g->openLength = openLength;
+ g->pulseLength = pulseLength;
+ g->invPulseLengthMinusOpenLength = 1.0f / (g->pulseLength - g->openLength);
+}