auto gabber kick is fast now

master
dennisdebel 5 years ago
parent 5816d5a8ec
commit 6ad3583451

@ -1,10 +1,10 @@
/* /*
* *
* GABBER KICK auto-kick (internal kick) * ultra auto GABBER KICK auto-kick (internal kick)
* *
* // A2 sets pitch and delay of ATTACK (timbre) * // A2 sets pitch and delay of ATTACK (timbre/double kick)
* // A1 sets pitch and delay of SUSTAIN (actual phatness) * // A1 sets pitch and delay of SUSTAIN (actual phatness/pitch/tripple kick)
* // A0 sets kick speed (trigger) * // A0 sets kick speed (trigger speed)
*/ */
#define SPEAKER_PIN 11 #define SPEAKER_PIN 11
bool triggered; // logic: trigered, yes or no bool triggered; // logic: trigered, yes or no
@ -20,24 +20,19 @@ void setup() {
void loop() { void loop() {
int input3 = digitalRead(A3); // read analog pin 3 int input3 = digitalRead(A3); // read analog pin 3
int LFO = analogRead(A0)*2; // read analog pin 1 (note duration 0-2000ms) int LFO = map(analogRead(A0),0,1023,0,50); // read analog pin 1 (trigger well actually note duration 0-1023ms)
//fake trigger //fake trigger (doesnt really work at gabber bpms though...)
for(int i=0;i<2;i++){ for(int i=0;i<1;i++){
Serial.println("Got trigger!"); Serial.println("Got trigger!");
// analogWrite(11,0); //nasty attack try (speaker clip/click)
// delay(analogRead(A2));
// analogWrite(11,255);
// delay(analogRead(A2));
// analogWrite(11,0);
//ATTACK //ATTACK
for(int i=0;i<10;i++){ // i = DELAY+SUSTAIN+RELEASE of ATTACK for(int i=0;i<5;i++){ // i = DELAY+SUSTAIN+RELEASE of ATTACK
analogWrite(11,0); analogWrite(11,0);
delayMicroseconds(analogRead(A2)*i); // lower the pitch over time delayMicroseconds(analogRead(A2)*i*i); // lower the pitch over time
analogWrite(11,255); analogWrite(11,255);
delayMicroseconds(analogRead(A2)*i); // lower the pitch over time delayMicroseconds(analogRead(A2)*i*i); // lower the pitch over time
analogWrite(11,0); analogWrite(11,0);
// delay(1); // delay(1);
@ -46,7 +41,7 @@ void loop() {
//delay(1); //delay(1);
//SUSTAIN RELEASE //SUSTAIN RELEASE
for(int i=0;i<55;i++){ // i = DELAY+SUSTAIN+RELEASE for(int i=0;i<LFO;i++){ // i = DELAY+SUSTAIN+RELEASE < this should be linked to lfo..
analogWrite(11,0); analogWrite(11,0);
delayMicroseconds(analogRead(A1)*i); // lower the pitch over time delayMicroseconds(analogRead(A1)*i); // lower the pitch over time
analogWrite(11,255); analogWrite(11,255);
@ -55,9 +50,9 @@ void loop() {
delay(1); delay(1);
} }
delay(LFO); //fake trigger delay time
} }
delay(LFO); //fake trigger delay time
} }

Loading…
Cancel
Save