- LFO: added Sync modes Frequency, Phase and Frequency + Phase

- added GUI Parameter MIDISYNC_MODE and MIDISYNC_BERATDIV
- wired MIDISYNC params down to global LFO

git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@726 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2020-08-15 12:32:16 +00:00
parent 7b731dd270
commit 0f8abfd428
9 changed files with 278 additions and 42 deletions
+14 -1
View File
@@ -29,6 +29,15 @@ enum
LFO_NUM_WAVEFORMS
};
enum
{
LFO_SYNC_MODE_OFF,
LFO_SYNC_MODE_F,
LFO_SYNC_MODE_P,
LFO_SYNC_MODE_F_P,
LFO_NUM_SYNC_MODES
};
enum
{
LFO_PARAM2_WAVEFORM,
@@ -37,12 +46,15 @@ enum
LFO_PARAM2_DELAY,
LFO_PARAM2_ATTACK,
LFO_PARAM2_SYMMETRY,
LFO_PARAM2_MIDISYNC_MODE,
LFO_PARAM2_MIDISYNC_BEATDIV,
LFO_NUM_PARAMS
};
typedef struct _ssync_t
{
synth_float_t phase;
synth_float_t phase_int;
synth_float_t phase_ref;
synth_float_t omega;
@@ -51,6 +63,7 @@ typedef struct _ssync_t
synth_float_t accu;
int phase_update;
struct _slfo_t *pLfo;
} sync_t;
@@ -68,7 +81,7 @@ extern "C" {
// --------------------------------------------------------------
// Exported functions
// --------------------------------------------------------------
void Sync_init(sync_t *pObj);
void Sync_init(sync_t *pObj, struct _slfo_t *pLfo);
void Sync_phase_update(sync_t *pObj, synth_float_t phase_ref);
sync_result_t Sync_process(sync_t *pObj, synth_float_t omega_base);
synth_float_t Sync_mod(synth_float_t x, synth_float_t y);