From 67bacd19c77799bd79fba94cb2742f526297b739 Mon Sep 17 00:00:00 2001 From: CHRISTOPHE Date: Sat, 17 Aug 2019 02:07:54 +0200 Subject: [PATCH] re arrangement de lignes --- .../MidiHallSynthChrom/MidiHallSynthChrom.ino | 39 ++++++++----------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/ressource arduino/MidiHallSynthChrom/MidiHallSynthChrom.ino b/ressource arduino/MidiHallSynthChrom/MidiHallSynthChrom.ino index cb3d0e2..929bacb 100644 --- a/ressource arduino/MidiHallSynthChrom/MidiHallSynthChrom.ino +++ b/ressource arduino/MidiHallSynthChrom/MidiHallSynthChrom.ino @@ -13,8 +13,10 @@ bool EtatEntree27 = HIGH ; bool VarSuivi27 = HIGH ; + bool EtatEntree28 = HIGH ; bool VarSuivi28 = HIGH ; + bool EtatEntree29 = HIGH ; bool VarSuivi29 = HIGH ; @@ -23,7 +25,6 @@ bool EtatEntree31 = HIGH ; bool VarSuivi31 = HIGH ; - bool EtatEntree32 = HIGH ; bool VarSuivi32 = HIGH ; @@ -100,46 +101,41 @@ void loop() EtatEntree24 = digitalRead(24); EtatEntree25 = digitalRead(25); EtatEntree26 = digitalRead(26); - EtatEntree27 = digitalRead(27); + EtatEntree27 = digitalRead(27); EtatEntree28 = digitalRead(28); - EtatEntree29 = digitalRead(29); + EtatEntree29 = digitalRead(29); EtatEntree30 = digitalRead(30); - EtatEntree31 = digitalRead(31); - EtatEntree32 = digitalRead(32); + EtatEntree31 = digitalRead(31); + EtatEntree32 = digitalRead(32); EtatEntree33 = digitalRead(33); - EtatEntree34 = digitalRead(34); - EtatEntree35 = digitalRead(35); + EtatEntree34 = digitalRead(34); + EtatEntree35 = digitalRead(35); if ( (EtatEntree24 != VarSuivi24) && (EtatEntree24 == HIGH) ) { - noteOn(0x80, 0x24 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */ - /* Serial.println("touche lachee"); */ - VarSuivi24 = HIGH; - } - + noteOn(0x80, 0x24 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */ + VarSuivi24 = HIGH; /* "touche relachée" */ + } if ( (EtatEntree24 != VarSuivi24) && (EtatEntree24 == LOW) ) { - noteOn(0x90, 0x24 , 0x70) ; /* note on sur canal1 ; C2 ; vel */ - /* Serial.println("touche appuyee"); */ - VarSuivi24 = LOW; + noteOn(0x90, 0x24 , 0x70) ; /* note on sur canal1 ; C2 ; vel */ + VarSuivi24 = LOW; /* "touche appuyee" */ } if ( (EtatEntree25 != VarSuivi25) && (EtatEntree25 == HIGH) ) { noteOn(0x80, 0x25 , 0x00) ; - /* Serial.println("touche lachee"); */ VarSuivi25 = HIGH; - } - + } if ( (EtatEntree25 != VarSuivi25) && (EtatEntree25 == LOW) ) { - noteOn(0x90, 0x25 , 0x70) ; /* note on sur canal1 ; C2 ; vel */ - /* Serial.println("touche appuyee"); */ + noteOn(0x90, 0x25 , 0x70) ; /* note on sur canal1 ; C#2 ; vel */ VarSuivi25 = LOW; } + if ( (EtatEntree26 != VarSuivi26) && (EtatEntree26 == HIGH) ) { noteOn(0x80, 0x26 , 0x00) ; /* note off sur canal1 ; D2 ; vel 0 */ @@ -307,6 +303,3 @@ void loop() delay(100); */ } - - -