proper brick and gui scaling, minbpm/maxbpm
This commit is contained in:
@@ -11,13 +11,18 @@ class Oscillator {
|
||||
float value; // is returned, constrained between "low" and "high"
|
||||
float low = -1.0;
|
||||
float high = 1.0;
|
||||
float minBPM, maxBPM;
|
||||
boolean playing, pause, valInvert;
|
||||
|
||||
Oscillator(float bpm_, int[] osciModes_) {
|
||||
minBPM = 5;
|
||||
maxBPM = 15;
|
||||
|
||||
bpm(bpm_);
|
||||
possibleModes = osciModes_;
|
||||
mode = possibleModes[int(random(possibleModes.length))];
|
||||
play();
|
||||
|
||||
}
|
||||
|
||||
void amplitude(float low_, float high_) {
|
||||
@@ -62,7 +67,7 @@ class Oscillator {
|
||||
beatCount++;
|
||||
if (random(1) > .5) {
|
||||
mode = possibleModes[int(random(possibleModes.length))];
|
||||
bpm(int(random(2, 20)));
|
||||
bpm(random(minBPM, maxBPM));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user