mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
backported various bugfixes from master:
- fixed bug in distortion when using stereo and sample&hold - legacy fix for global sections save/load memory out of bounds access - fixed delay index fuckup during export when skipping instruments with delay mode "note sync" - fixed export crash caused by direct use of std::string in printf for store modes
This commit is contained in:
parent
45a35d8772
commit
fd1013586a
Binary file not shown.
Binary file not shown.
@ -748,27 +748,28 @@ go4kDST_func_do:
|
|||||||
%endif
|
%endif
|
||||||
movzx eax, byte [VAL-1] ; // get type flag
|
movzx eax, byte [VAL-1] ; // get type flag
|
||||||
%ifdef GO4K_USE_DST_SH
|
%ifdef GO4K_USE_DST_SH
|
||||||
fld dword [edx+go4kDST_val.snhfreq] ; // snh in
|
fld dword [edx+go4kDST_val.snhfreq] ; // snh in (inr)
|
||||||
%ifdef GO4K_USE_DST_MOD_SH
|
%ifdef GO4K_USE_DST_MOD_SH
|
||||||
fadd dword [WRK+go4kDST_wrk.sm] ; // snh' in
|
fadd dword [WRK+go4kDST_wrk.sm] ; // snh' in (inr)
|
||||||
%endif
|
%endif
|
||||||
fmul st0, st0 ; // square the input so we never get negative and also have a smoother behaviour in the lower frequencies
|
fmul st0, st0 ; // square the input so we never get negative and also have a smoother behaviour in the lower frequencies
|
||||||
fchs
|
fchs
|
||||||
fadd dword [WRK+go4kDST_wrk.snhphase]; // snh' in
|
fadd dword [WRK+go4kDST_wrk.snhphase]; // snh' in (inr)
|
||||||
fst dword [WRK+go4kDST_wrk.snhphase]
|
fst dword [WRK+go4kDST_wrk.snhphase]
|
||||||
fldz ; // 0 snh' in
|
fldz ; // 0 snh' in (inr)
|
||||||
fucomip st1 ; // 0 snh' in
|
fucomip st1 ; // snh' in (inr)
|
||||||
|
fstp dword [esp-4] ; // in (inr)
|
||||||
jc short go4kDST_func_hold
|
jc short go4kDST_func_hold
|
||||||
fld1 ; // 1 snh' in
|
fld1 ; // 1 in (inr)
|
||||||
faddp st1, st0 ; // 1+snh' in
|
fadd dword [esp-4] ; // 1+snh' in (inr)
|
||||||
fstp dword [WRK+go4kDST_wrk.snhphase]; // in
|
fstp dword [WRK+go4kDST_wrk.snhphase]; // in (inr)
|
||||||
%endif
|
%endif
|
||||||
; // calc pregain and postgain
|
; // calc pregain and postgain
|
||||||
%ifdef GO4K_USE_DST_STEREO
|
%ifdef GO4K_USE_DST_STEREO
|
||||||
test al, byte STEREO ; // outr inl
|
test al, byte STEREO
|
||||||
jz short go4kDST_func_mono
|
jz short go4kDST_func_mono
|
||||||
fxch st1 ; // inr inl
|
fxch st1 ; // inr inl
|
||||||
fld dword [edx+go4kDST_val.drive] ; // drive inr inl
|
fld dword [edx+go4kDST_val.drive] ; // drive inr inl
|
||||||
%ifdef GO4K_USE_DST_MOD_DM
|
%ifdef GO4K_USE_DST_MOD_DM
|
||||||
fadd dword [WRK+go4kDST_wrk.dm]
|
fadd dword [WRK+go4kDST_wrk.dm]
|
||||||
%endif
|
%endif
|
||||||
@ -779,26 +780,26 @@ go4kDST_func_do:
|
|||||||
fxch st1 ; // inl outr
|
fxch st1 ; // inl outr
|
||||||
go4kDST_func_mono:
|
go4kDST_func_mono:
|
||||||
%endif
|
%endif
|
||||||
fld dword [edx+go4kDST_val.drive] ; // drive in
|
fld dword [edx+go4kDST_val.drive] ; // drive in (outr)
|
||||||
%ifdef GO4K_USE_DST_MOD_DM
|
%ifdef GO4K_USE_DST_MOD_DM
|
||||||
fadd dword [WRK+go4kDST_wrk.dm]
|
fadd dword [WRK+go4kDST_wrk.dm]
|
||||||
%endif
|
%endif
|
||||||
call go4kWaveshaper ; // out
|
call go4kWaveshaper ; // out (outr)
|
||||||
%ifdef GO4K_USE_DST_SH
|
%ifdef GO4K_USE_DST_SH
|
||||||
fst dword [WRK+go4kDST_wrk.out] ; // out'
|
fst dword [WRK+go4kDST_wrk.out] ; // out' (outr)
|
||||||
%endif
|
%endif
|
||||||
ret ; // out'
|
ret ; // out' (outr)
|
||||||
%ifdef GO4K_USE_DST_SH
|
%ifdef GO4K_USE_DST_SH
|
||||||
go4kDST_func_hold:
|
go4kDST_func_hold: ; // in (inr)
|
||||||
fstp st0 ; // in
|
fstp st0 ; // (inr)
|
||||||
fstp st0
|
|
||||||
%ifdef GO4K_USE_DST_STEREO
|
%ifdef GO4K_USE_DST_STEREO
|
||||||
test al, byte STEREO ; // outr inl
|
test al, byte STEREO
|
||||||
jz short go4kDST_func_monohold
|
jz short go4kDST_func_monohold ; // (inr)
|
||||||
fld dword [WRK+go4kDST_wrk.out2] ; // out2
|
fstp st0 ; //
|
||||||
|
fld dword [WRK+go4kDST_wrk.out2] ; // outr
|
||||||
go4kDST_func_monohold:
|
go4kDST_func_monohold:
|
||||||
%endif
|
%endif
|
||||||
fld dword [WRK+go4kDST_wrk.out] ; // out
|
fld dword [WRK+go4kDST_wrk.out] ; // out (outr)
|
||||||
ret
|
ret
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ void Go4kVSTi_UpdateDelayTimes()
|
|||||||
|
|
||||||
if (v->id == M_DLL)
|
if (v->id == M_DLL)
|
||||||
{
|
{
|
||||||
DLL_valP v = (DLL_valP)(SynthObj.InstrumentValues[i][u]);
|
//DLL_valP v = (DLL_valP)(SynthObj.InstrumentValues[i][u]);
|
||||||
if (v->reverb)
|
if (v->reverb)
|
||||||
{
|
{
|
||||||
if (v->leftreverb)
|
if (v->leftreverb)
|
||||||
@ -476,6 +476,7 @@ void Go4kVSTi_UpdateDelayTimes()
|
|||||||
int delay;
|
int delay;
|
||||||
if (v->synctype == 2)
|
if (v->synctype == 2)
|
||||||
{
|
{
|
||||||
|
(&go4k_delay_times)[delayindex] = 0; // added for debug. doesnt hurt though
|
||||||
v->delay = 0;
|
v->delay = 0;
|
||||||
v->count = 1;
|
v->count = 1;
|
||||||
}
|
}
|
||||||
@ -549,7 +550,7 @@ void Go4kVSTi_Tick(float *oleft, float *oright, int samples)
|
|||||||
// send a stayalive signal to the host
|
// send a stayalive signal to the host
|
||||||
for (int i = 0; i < samples; i++)
|
for (int i = 0; i < samples; i++)
|
||||||
{
|
{
|
||||||
float signal = 0.0625*((float)(i&63)/32.0f - 1.0f);
|
float signal = 0.03125*((float)(i & 255) / 128.0f - 1.0f);
|
||||||
*oleft++ = signal;
|
*oleft++ = signal;
|
||||||
*oright++ = signal;
|
*oright++ = signal;
|
||||||
}
|
}
|
||||||
@ -1403,7 +1404,9 @@ void Go4kVSTi_LoadInstrument(char* filename, char channel)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Go4kVSTi_ResetGlobal();
|
Go4kVSTi_ResetGlobal();
|
||||||
fread(SynthObj.InstrumentNames[channel], 1, 64, file);
|
// read the instrument name in a dummy buffer, as global section doesnt have an own name
|
||||||
|
BYTE dummyNameBuf[64];
|
||||||
|
fread(dummyNameBuf, 1, 64, file);
|
||||||
if (version13)
|
if (version13)
|
||||||
{
|
{
|
||||||
BYTE dummyBuf[16];
|
BYTE dummyBuf[16];
|
||||||
@ -1512,7 +1515,8 @@ void Go4kVSTi_SaveInstrument(char* filename, char channel)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fwrite(SynthObj.InstrumentNames[channel], 1, 64, file);
|
// write a dummy name for global section as it doesnt have an own name
|
||||||
|
fwrite("GlobalUnitsStoredAs.4ki ", 1, 64, file);
|
||||||
fwrite(SynthObj.GlobalValues, 1, MAX_UNITS*MAX_UNIT_SLOTS, file);
|
fwrite(SynthObj.GlobalValues, 1, MAX_UNITS*MAX_UNIT_SLOTS, file);
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
@ -2055,12 +2059,8 @@ void Go4kVSTi_SaveByteStream(HINSTANCE hInst, char* filename, int useenvlevels,
|
|||||||
{
|
{
|
||||||
if (!v->reverb)
|
if (!v->reverb)
|
||||||
{
|
{
|
||||||
// if not notesync
|
// just push a dummy index
|
||||||
if (v->synctype != 2)
|
delay_indices.push_back(-1);
|
||||||
{
|
|
||||||
// just push a dummy index
|
|
||||||
delay_indices.push_back(-1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2598,7 +2598,7 @@ void Go4kVSTi_SaveByteStream(HINSTANCE hInst, char* filename, int useenvlevels,
|
|||||||
fprintf(file, " .size\n");
|
fprintf(file, " .size\n");
|
||||||
fprintf(file, "endstruc\n");
|
fprintf(file, "endstruc\n");
|
||||||
fprintf(file, "%%endif\n");
|
fprintf(file, "%%endif\n");
|
||||||
|
|
||||||
fprintf(file, "%%ifdef GO4K_USE_FSTG\n");
|
fprintf(file, "%%ifdef GO4K_USE_FSTG\n");
|
||||||
fprintf(file, "GO4K_FSTG_ID equ 12\n");
|
fprintf(file, "GO4K_FSTG_ID equ 12\n");
|
||||||
fprintf(file, "%%macro GO4K_FSTG 2\n");
|
fprintf(file, "%%macro GO4K_FSTG 2\n");
|
||||||
@ -3130,7 +3130,7 @@ void Go4kVSTi_SaveByteStream(HINSTANCE hInst, char* filename, int useenvlevels,
|
|||||||
// modes = "FST_MUL";
|
// modes = "FST_MUL";
|
||||||
if (v->type & FST_POP)
|
if (v->type & FST_POP)
|
||||||
modes += "+FST_POP";
|
modes += "+FST_POP";
|
||||||
fprintf(file, "\tGO4K_FST\tAMOUNT(%d),DEST(%d*MAX_UNIT_SLOTS+%d+%s)\n", v->amount, v->dest_unit-emptySkip, v->dest_slot, modes );
|
fprintf(file, "\tGO4K_FST\tAMOUNT(%d),DEST(%d*MAX_UNIT_SLOTS+%d+%s)\n", v->amount, v->dest_unit-emptySkip, v->dest_slot, modes.c_str());
|
||||||
}
|
}
|
||||||
// global storage
|
// global storage
|
||||||
else
|
else
|
||||||
|
@ -748,27 +748,28 @@ go4kDST_func_do:
|
|||||||
%endif
|
%endif
|
||||||
movzx eax, byte [VAL-1] ; // get type flag
|
movzx eax, byte [VAL-1] ; // get type flag
|
||||||
%ifdef GO4K_USE_DST_SH
|
%ifdef GO4K_USE_DST_SH
|
||||||
fld dword [edx+go4kDST_val.snhfreq] ; // snh in
|
fld dword [edx+go4kDST_val.snhfreq] ; // snh in (inr)
|
||||||
%ifdef GO4K_USE_DST_MOD_SH
|
%ifdef GO4K_USE_DST_MOD_SH
|
||||||
fadd dword [WRK+go4kDST_wrk.sm] ; // snh' in
|
fadd dword [WRK+go4kDST_wrk.sm] ; // snh' in (inr)
|
||||||
%endif
|
%endif
|
||||||
fmul st0, st0 ; // square the input so we never get negative and also have a smoother behaviour in the lower frequencies
|
fmul st0, st0 ; // square the input so we never get negative and also have a smoother behaviour in the lower frequencies
|
||||||
fchs
|
fchs
|
||||||
fadd dword [WRK+go4kDST_wrk.snhphase]; // snh' in
|
fadd dword [WRK+go4kDST_wrk.snhphase]; // snh' in (inr)
|
||||||
fst dword [WRK+go4kDST_wrk.snhphase]
|
fst dword [WRK+go4kDST_wrk.snhphase]
|
||||||
fldz ; // 0 snh' in
|
fldz ; // 0 snh' in (inr)
|
||||||
fucomip st1 ; // 0 snh' in
|
fucomip st1 ; // snh' in (inr)
|
||||||
|
fstp dword [esp-4] ; // in (inr)
|
||||||
jc short go4kDST_func_hold
|
jc short go4kDST_func_hold
|
||||||
fld1 ; // 1 snh' in
|
fld1 ; // 1 in (inr)
|
||||||
faddp st1, st0 ; // 1+snh' in
|
fadd dword [esp-4] ; // 1+snh' in (inr)
|
||||||
fstp dword [WRK+go4kDST_wrk.snhphase]; // in
|
fstp dword [WRK+go4kDST_wrk.snhphase]; // in (inr)
|
||||||
%endif
|
%endif
|
||||||
; // calc pregain and postgain
|
; // calc pregain and postgain
|
||||||
%ifdef GO4K_USE_DST_STEREO
|
%ifdef GO4K_USE_DST_STEREO
|
||||||
test al, byte STEREO ; // outr inl
|
test al, byte STEREO
|
||||||
jz short go4kDST_func_mono
|
jz short go4kDST_func_mono
|
||||||
fxch st1 ; // inr inl
|
fxch st1 ; // inr inl
|
||||||
fld dword [edx+go4kDST_val.drive] ; // drive inr inl
|
fld dword [edx+go4kDST_val.drive] ; // drive inr inl
|
||||||
%ifdef GO4K_USE_DST_MOD_DM
|
%ifdef GO4K_USE_DST_MOD_DM
|
||||||
fadd dword [WRK+go4kDST_wrk.dm]
|
fadd dword [WRK+go4kDST_wrk.dm]
|
||||||
%endif
|
%endif
|
||||||
@ -779,26 +780,26 @@ go4kDST_func_do:
|
|||||||
fxch st1 ; // inl outr
|
fxch st1 ; // inl outr
|
||||||
go4kDST_func_mono:
|
go4kDST_func_mono:
|
||||||
%endif
|
%endif
|
||||||
fld dword [edx+go4kDST_val.drive] ; // drive in
|
fld dword [edx+go4kDST_val.drive] ; // drive in (outr)
|
||||||
%ifdef GO4K_USE_DST_MOD_DM
|
%ifdef GO4K_USE_DST_MOD_DM
|
||||||
fadd dword [WRK+go4kDST_wrk.dm]
|
fadd dword [WRK+go4kDST_wrk.dm]
|
||||||
%endif
|
%endif
|
||||||
call go4kWaveshaper ; // out
|
call go4kWaveshaper ; // out (outr)
|
||||||
%ifdef GO4K_USE_DST_SH
|
%ifdef GO4K_USE_DST_SH
|
||||||
fst dword [WRK+go4kDST_wrk.out] ; // out'
|
fst dword [WRK+go4kDST_wrk.out] ; // out' (outr)
|
||||||
%endif
|
%endif
|
||||||
ret ; // out'
|
ret ; // out' (outr)
|
||||||
%ifdef GO4K_USE_DST_SH
|
%ifdef GO4K_USE_DST_SH
|
||||||
go4kDST_func_hold:
|
go4kDST_func_hold: ; // in (inr)
|
||||||
fstp st0 ; // in
|
fstp st0 ; // (inr)
|
||||||
fstp st0
|
|
||||||
%ifdef GO4K_USE_DST_STEREO
|
%ifdef GO4K_USE_DST_STEREO
|
||||||
test al, byte STEREO ; // outr inl
|
test al, byte STEREO
|
||||||
jz short go4kDST_func_monohold
|
jz short go4kDST_func_monohold ; // (inr)
|
||||||
fld dword [WRK+go4kDST_wrk.out2] ; // out2
|
fstp st0 ; //
|
||||||
|
fld dword [WRK+go4kDST_wrk.out2] ; // outr
|
||||||
go4kDST_func_monohold:
|
go4kDST_func_monohold:
|
||||||
%endif
|
%endif
|
||||||
fld dword [WRK+go4kDST_wrk.out] ; // out
|
fld dword [WRK+go4kDST_wrk.out] ; // out (outr)
|
||||||
ret
|
ret
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ IDR_ASM_RES BINARY "4klang.bin"
|
|||||||
IDD_GO4KVSTIDIALOG DIALOGEX 0, 0, 594, 341
|
IDD_GO4KVSTIDIALOG DIALOGEX 0, 0, 594, 341
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Alcatraz - 4klang Synth Plugin - Version 3.11"
|
CAPTION "Alcatraz - 4klang Synth Plugin - Version 3.11.1"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "Load Patch Data",IDC_LOAD_PATCH,13,13,70,14
|
PUSHBUTTON "Load Patch Data",IDC_LOAD_PATCH,13,13,70,14
|
||||||
|
@ -35,7 +35,7 @@ IDR_ASM_RES BINARY "4klang.bin"
|
|||||||
IDD_GO4KVSTIDIALOG DIALOGEX 0, 0, 594, 341
|
IDD_GO4KVSTIDIALOG DIALOGEX 0, 0, 594, 341
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Alcatraz - 8klang Synth Plugin (4klang addon) - Version 3.11"
|
CAPTION "Alcatraz - 8klang Synth Plugin (4klang addon) - Version 3.11.1"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "Load Patch Data",IDC_LOAD_PATCH,13,13,70,14
|
PUSHBUTTON "Load Patch Data",IDC_LOAD_PATCH,13,13,70,14
|
||||||
|
Loading…
x
Reference in New Issue
Block a user