X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=Audio.pde;h=def7d0e1062ba7697415cef9ce98298f0f64a937;hb=4760e696dd25f659896876c10ff5cb98b69fb84f;hp=4547a746cf9b3edb3617ee296f779ff188bd1524;hpb=32986078325e1348b0429cd58811fa1aa0ceb7c4;p=SugarCubes.git diff --git a/Audio.pde b/Audio.pde index 4547a74..def7d0e 100644 --- a/Audio.pde +++ b/Audio.pde @@ -39,8 +39,8 @@ public static class GraphicEQ { } } - final float logTen = log(10); - public float log10(float val) { + static final float logTen = log(10); + public static float log10(float val) { return log(val) / logTen; } @@ -70,13 +70,13 @@ public static class GraphicEQ { float value = constrain(positiveDecibels / decibelRange, 0, 1); if (value > bandVals[i].getValuef()) { - bandVals[i].setEndVal(value, attack.getValuef() * 20).trigger(); + bandVals[i].setRangeFromHereTo(value, attack.getValuef() * 20).trigger(); } } for (LinearEnvelope band : bandVals) { band.run(deltaMs); if (!band.isRunning() && band.getValuef() > 0) { - band.setEndVal(0, release.getValuef() * 1600).trigger(); + band.setRangeFromHereTo(0, release.getValuef() * 1600).trigger(); } } }