Refactor all values to have a universal support for modulations.

The modulation is now always added during value transformation.
With this, a lot of *_MOD defines could be removed.
The waveform for some tests changed slightly, because when the
value is saved to memory after modulating it, there is some
rounding errors.
This commit is contained in:
Veikko Sariola
2020-05-01 16:56:30 +03:00
parent 0c08f3d41c
commit 53a1be9b61
35 changed files with 110 additions and 350 deletions

View File

@ -55,8 +55,8 @@ SECT_DATA(g4kmuc4)
EXPORT MANGLE_DATA(go4k_synth_parameter_values)
GO4K_BEGIN_PARAMDEF(Instrument0)
GO4K_FLD VALUE(128)
GO4K_FSTG AMOUNT(96),DEST((1*go4k_instrument.size*MAX_VOICES/4)+(3*MAX_UNIT_SLOTS+0)+(go4k_instrument.workspace/4)+FST_SET+FST_POP)
GO4K_FLD VALUE(96)
GO4K_FSTG AMOUNT(96),GLOBAL_VALUE_MOD(1,3,FLD,value,FST_SET+FST_POP)
GO4K_FLD VALUE(64)
GO4K_FLD VALUE(64)
GO4K_OUT GAIN(128), AUXSEND(0)
@ -64,8 +64,8 @@ GO4K_END_PARAMDEF
;// global parameters
GO4K_BEGIN_PARAMDEF(Global)
GO4K_ACC ACCTYPE(OUTPUT)
GO4K_FLD VALUE(0)
GO4K_FSTG AMOUNT(96),DEST((0*go4k_instrument.size*MAX_VOICES/4)+(2*MAX_UNIT_SLOTS+0)+(go4k_instrument.workspace/4)+FST_SET+FST_POP)
GO4K_FLD VALUE(32)
GO4K_FSTG AMOUNT(96),GLOBAL_VALUE_MOD(0,2,FLD,value,FST_SET+FST_POP)
GO4K_FLD VALUE(64)
GO4K_FOP OP(FOP_ADDP)
GO4K_OUT GAIN(128), AUXSEND(0)