mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
Change loadnote to load values from [-1,1], to allow using notes for both positive and negative modulations.
Also change SPEED to take this change into account.
This commit is contained in:
@ -65,7 +65,7 @@ su_op_addp_mono:
|
||||
%endif
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
; LOADNOTE opcode: load the current note, scaled to [0,1]
|
||||
; LOADNOTE opcode: load the current note, scaled to [-1,1]
|
||||
;-------------------------------------------------------------------------------
|
||||
; Mono: (empty) -> n, where n is the note
|
||||
; Stereo: (empty) -> n n
|
||||
@ -80,6 +80,8 @@ su_op_loadnote_mono:
|
||||
%endif
|
||||
fild dword [INP-su_voice.inputs+su_voice.note]
|
||||
do fmul dword [,c_i128,]
|
||||
do fsub dword [,c_0_5,] ; s-.5
|
||||
fadd st0, st0 ; 2*s-1
|
||||
ret
|
||||
|
||||
%endif
|
||||
|
Reference in New Issue
Block a user