cleaned up, added record button
This commit is contained in:
24
effects.pde
24
effects.pde
@@ -1,19 +1,3 @@
|
||||
final static int SINE = 0; //add 0.25 to phase to get cos
|
||||
final static int SAWTOOTH = 1;
|
||||
final static int SAWTOOTHINVERSE = 2;
|
||||
final static int SQUARE = 3; //switches between -1 and 1, that's all
|
||||
final static int TRIANGLE = 4;
|
||||
final static int TAN = 5;
|
||||
final static int TANINVERSE = 6;
|
||||
final static int RAMP = 7; //line for half the sequence up to 1, then stay at 1 for the other half
|
||||
final static int RAMPINVERSE = 8; //line for half the sequence up to 1, then stay at 1 for the other half
|
||||
final static int RAMPUPDOWN = 9; //line up, stay, line down, stay
|
||||
final static int RANDOM = 10;
|
||||
|
||||
final static int RANDOMIZE_ALL = 777; //not for wave-generation. meant for low frequency oscillator that calls a function after every beat
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
ASDFPIXELSORT
|
||||
@@ -23,16 +7,16 @@ final static int RANDOMIZE_ALL = 777; //not for wave-generation. meant for low f
|
||||
class ASDFPIXELSORT extends Shader {
|
||||
ASDFPIXELSORT() {
|
||||
name = "fxASDFPixelSort";
|
||||
params.add(new Param("black", INTVAL, -17000000, -2000000, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANGLE}));
|
||||
params.add(new Param("black", INTVAL, -17000000, -2000000, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANG}));
|
||||
params.add(new Param("mode", INTVAL, 0, 2, new int[]{RANDOM}));
|
||||
}
|
||||
int previousMode;
|
||||
|
||||
void apply() {
|
||||
if (previousMode != int(params.get(1).value)) {
|
||||
if (params.get(1).value == 0) changeParam(0, new Param("black", INTVAL, -17000000, -2000000, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANGLE}));
|
||||
if (params.get(1).value == 1) changeParam(0, new Param("brightness", INTVAL, 0, 200, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANGLE}));
|
||||
if (params.get(1).value == 2) changeParam(0, new Param("white", INTVAL, -15000000, -700000, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANGLE}));
|
||||
if (params.get(1).value == 0) changeParam(0, new Param("black", INTVAL, -17000000, -2000000, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANG}));
|
||||
if (params.get(1).value == 1) changeParam(0, new Param("brightness", INTVAL, 0, 200, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANG}));
|
||||
if (params.get(1).value == 2) changeParam(0, new Param("white", INTVAL, -15000000, -700000, new int[]{SINE, SAWTOOTH, RAMPUPDOWN, TAN, TANINVERSE, TRIANG}));
|
||||
}
|
||||
previousMode = int(params.get(1).value);
|
||||
row = 0;
|
||||
|
||||
Reference in New Issue
Block a user