mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-01 18:42:40 +00:00
parent
49a9de1d93
commit
90878c325d
1 changed files with 2 additions and 1 deletions
|
@ -146,8 +146,9 @@ void DivMacroStruct::doMacro(DivInstrumentMacro& source, bool released, bool tic
|
|||
if (ADSR_HIGH>ADSR_LOW) {
|
||||
val=ADSR_LOW+((pos+(ADSR_HIGH-ADSR_LOW)*pos)>>8);
|
||||
} else {
|
||||
val=ADSR_LOW+(((ADSR_HIGH-ADSR_LOW)*pos-pos)>>8);
|
||||
val=ADSR_HIGH+(((255-pos)+(ADSR_LOW-ADSR_HIGH)*(255-pos))>>8);
|
||||
}
|
||||
logV("val: %d",val);
|
||||
}
|
||||
if (type==2) { // LFO
|
||||
lfoPos+=LFO_SPEED;
|
||||
|
|
Loading…
Reference in a new issue