- use jsy_min/jsy_max
- fixed includes - removed redundant MW table - added Missing JK_MidiClock
This commit is contained in:
+5
-5
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "synth_defs.h"
|
||||
#include "blit.h"
|
||||
#include "fir/fir2.h"
|
||||
#include <fir/fir2.h>
|
||||
#include "vector_utils.h"
|
||||
|
||||
// --------------------------------------------------------------
|
||||
@@ -144,8 +144,8 @@ void BLIT_ModInit(blit_common_t *pCom)
|
||||
blep = 0;
|
||||
for (n=0; n < pCom->pTableSizes[m]; n++)
|
||||
{
|
||||
a = sin(x*pi);
|
||||
b = sin(m*x*pi);
|
||||
a = sin(x*jsy_pi);
|
||||
b = sin(m*x*jsy_pi);
|
||||
if (a == 0)
|
||||
blit = (synth_float_t)m;
|
||||
else
|
||||
@@ -234,7 +234,7 @@ void BLIT_Prepare(blit_t *pObj, UINT32 len)
|
||||
synth_float_t pitch_buf[SYNTH_MAX_BUFSIZE];
|
||||
synth_float_t out_buf[SYNTH_MAX_BUFSIZE];
|
||||
|
||||
len = min(len, SYNTH_MAX_BUFSIZE);
|
||||
len = jsy_min(len, SYNTH_MAX_BUFSIZE);
|
||||
|
||||
// Let Oscillators run with different pitches to randomize phase
|
||||
Add_inplace_VS(pitch_buf, 0, 8*440.0*(1+0.01*(synth_float_t)rand()/RAND_MAX), len);
|
||||
@@ -343,7 +343,7 @@ void BLIT_Process_SQR_Vector(blit_t *pObj, synth_float_t *pPitch, synth_float_t
|
||||
{
|
||||
pObj->pwm = (synth_float_t)pCV_pwm[i];
|
||||
}
|
||||
dutycycle = min(1, max(0, pObj->dutycycle + pObj->pwm));
|
||||
dutycycle = jsy_min(1, jsy_max(0, pObj->dutycycle + pObj->pwm));
|
||||
pObj->pulse_offset = 2*(dutycycle-0.5);
|
||||
pObj->sqr_x2 = pObj->sqr_x1 + dutycycle - 1;
|
||||
pObj->sqr_pol2 = pObj->sqr_pol1;
|
||||
|
||||
Reference in New Issue
Block a user