mirror of
https://github.com/cnlohr/lolra.git
synced 2026-06-17 00:09:31 +00:00
Almos thtere maybe?
This commit is contained in:
@@ -429,11 +429,13 @@ async function sendLoop()
|
|||||||
else if( targetModulation == 1 )
|
else if( targetModulation == 1 )
|
||||||
{ /* FM */
|
{ /* FM */
|
||||||
var diffphase = phase - FMlastphase;
|
var diffphase = phase - FMlastphase;
|
||||||
this.lastphase = phase;
|
FMlastphase = phase;
|
||||||
if( diffphase < 0.0 ) diffphase += 1.0;
|
if( diffphase - FMiirphase < 0.0 ) diffphase += 1.0;
|
||||||
if( diffphase > 1.0 ) diffphase -= 1.0;
|
if( diffphase - FMiirphase > 1.0 ) diffphase -= 1.0;
|
||||||
FMiirphase = FMiirphase * 0.999 + diffphase * 0.001;
|
FMiirphase = FMiirphase * 0.999 + diffphase * 0.001;
|
||||||
diffphase -= FMiirphase;
|
diffphase -= FMiirphase;
|
||||||
|
if( diffphase > 0.5 ) diffphase -= 1;
|
||||||
|
if( diffphase <-0.5 ) diffphase += 1;
|
||||||
var po = FMphaseout = FMphaseout * 0.993 + diffphase;
|
var po = FMphaseout = FMphaseout * 0.993 + diffphase;
|
||||||
if( po < 0.0 ) po += 1.0;
|
if( po < 0.0 ) po += 1.0;
|
||||||
if( po > 1.0 ) po -= 1.0;
|
if( po > 1.0 ) po -= 1.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user