/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* A chorus effect made using LFO and variable delay. One for each channel
* (left,right), with different starting phase for stereo effect.
*
* @author Karl Helgason
*/
private static class VariableDelay {
private final float[] delaybuffer;
delaybuffer = new float[maxbuffersize];
}
}
}
}
}
float[] delaybuffer = this.delaybuffer;
for (int i = 0; i < len; i++) {
int ri = (int) r;
float s = r - ri;
float o = a * (1 - s) + b * (s);
lastdelay += delaydelta;
}
else
for (int i = 0; i < len; i++) {
int ri = (int) r;
float s = r - ri;
float o = a * (1 - s) + b * (s);
lastdelay += delaydelta;
}
}
}
}
private static class LFODelay {
private final double samplerate;
private final double controlrate;
this.samplerate = samplerate;
this.controlrate = controlrate;
// vdelay = new VariableDelay((int)(samplerate*4));
}
}
phase_step = g;
}
}
}
}
}
phase += phase_step;
}
phase += phase_step;
}
}
private boolean mix = true;
private boolean dirty = true;
private double dirty_vdelay1L_rate;
private double dirty_vdelay1R_rate;
private double dirty_vdelay1L_depth;
private double dirty_vdelay1R_depth;
private float dirty_vdelay1L_feedback;
private float dirty_vdelay1R_feedback;
private float dirty_vdelay1L_reverbsendgain;
private float dirty_vdelay1R_reverbsendgain;
private float controlrate;
this.controlrate = controlrate;
}
long value) {
switch ((int)value) {
case 0: // Chorus 1 0 (0%) 3 (0.4Hz) 5 (1.9ms) 0 (0%)
break;
case 1: // Chorus 2 5 (4%) 9 (1.1Hz) 19 (6.3ms) 0 (0%)
break;
case 2: // Chorus 3 8 (6%) 3 (0.4Hz) 19 (6.3ms) 0 (0%)
break;
case 3: // Chorus 4 16 (12%) 9 (1.1Hz) 16 (5.3ms) 0 (0%)
break;
case 4: // FB Chorus 64 (49%) 2 (0.2Hz) 24 (7.8ms) 0 (0%)
break;
case 5: // Flanger 112 (86%) 1 (0.1Hz) 5 (1.9ms) 0 (0%)
break;
default:
break;
}
dirty = true;
dirty = true;
dirty = true;
}
dirty = true;
}
}
}
}
public void processControlLogic() {
if (dirty) {
dirty = false;
}
}
public void processAudio() {
if (silentcounter > 1) {
if (!mix) {
}
return;
}
} else
silentcounter = 0;
if (mix) {
} else {
}
}
if (pin == 0)
}
}
if (pin == 0)
if (pin == 1)
if (pin == 2)
}
}