mirror of
https://github.com/vsariola/sointu.git
synced 2025-12-02 07:23:24 -05:00
Implement new effect: bit-crusher.
Maybe a combined hold/bit-crusher effect is needed someday.
This commit is contained in:
@ -78,6 +78,27 @@ su_op_hold_holding:
|
||||
|
||||
%endif ; HOLD_ID > -1
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; CRUSH Tick
|
||||
;-------------------------------------------------------------------------------
|
||||
%if CRUSH_ID > -1
|
||||
|
||||
SECT_TEXT(sucrush)
|
||||
|
||||
EXPORT MANGLE_FUNC(su_op_crush,0)
|
||||
%ifdef INCLUDE_STEREO_CRUSH
|
||||
jnc su_op_crush_mono
|
||||
call su_stereo_filterhelper
|
||||
%define INCLUDE_STEREO_FILTERHELPER
|
||||
su_op_crush_mono:
|
||||
%endif
|
||||
fdiv dword [edx+su_crush_ports.resolution]
|
||||
frndint
|
||||
fmul dword [edx+su_crush_ports.resolution]
|
||||
ret
|
||||
|
||||
%endif ; CRUSH_ID > -1
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; GAIN Tick
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
@ -156,6 +156,36 @@ struc su_hold_wrk
|
||||
.holdval resd 1
|
||||
endstruc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; CRUSH effect related defines
|
||||
;-------------------------------------------------------------------------------
|
||||
%assign CRUSH_ID -1
|
||||
|
||||
%macro USE_CRUSH 0
|
||||
%if CRUSH_ID == -1
|
||||
%assign CRUSH_ID CUR_ID
|
||||
%assign CUR_ID CUR_ID + 2
|
||||
%xdefine OPCODES OPCODES MANGLE_FUNC(su_op_crush,0),
|
||||
%xdefine NUMPARAMS NUMPARAMS 1,
|
||||
%endif
|
||||
%endmacro
|
||||
|
||||
%macro SU_CRUSH 2
|
||||
db %2
|
||||
USE_CRUSH
|
||||
%xdefine CMDS CMDS CRUSH_ID + %1,
|
||||
%if %1 == STEREO
|
||||
%define INCLUDE_STEREO_CRUSH
|
||||
%endif
|
||||
%endmacro
|
||||
|
||||
%define RESOLUTION(val) val
|
||||
|
||||
struc su_crush_ports
|
||||
.resolution resd 1
|
||||
.params
|
||||
endstruc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; GAIN effect related defines
|
||||
;-------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user