essai avec 12 capteurs gamme"2"

This commit is contained in:
Christophe 2019-08-16 21:51:50 +02:00
parent 5305d825d4
commit de15fb083e
2 changed files with 216 additions and 69 deletions

View File

@ -6,9 +6,9 @@ A cette date, c'est surtout l'utilisation des logiciels qui m'a occupé, ainsi q
Résultat des recherches :
- il existe des formats normalisés pour les dimensions ce qui oriente le choix :
- il existe des formats normalisés pour les dimensions ce qui oriente le choix :
32 touches normes BDO parallèle concave
32 touches normes BDO parallèle concave
- les discussions et exemples ont amenés à envisager les capteurs :
@ -16,13 +16,12 @@ Résultat des recherches :
- pour le bois, ça se complique ; pas de solutions à cette date, possibilités:
+ économique sapin (bof)
+ MDF ou contreplaqué - nécessiterai du plaquage
+ bois brut, hêtre ou frêne
+ économique sapin (bof)
+ MDF ou contreplaqué - nécessiterai du plaquage
+ bois brut, hêtre ou frêne
il faut impérativemenent prévoir toutes les pièces avec dimensions sachant qu'il faut aussi des gabarits de découpe.
30/07/2019 :
prise de décision : prévoir un essai pour voir la forme des touches.
@ -33,9 +32,9 @@ les touches "dièses" 25 mm + réhausse 50 mm .
l'idée est de préparer un touche de chaque type.
Les soirées fablab vont être orientées plus vers l'électronique.
CAPTEURS EFFETS HALL :
capteur 3 broches:
- 5V
- GND
- S : sortie
@ -44,7 +43,6 @@ La sortie passe à GND lorsqu'on approche un aimant face "sud" à face "capteur"
Sinon on a la tension de référence liée à une résistance pull-up connecté dessus.
Dans un exemple la résistance est de 10 k ohm.
la consommation par capteur est évaluée à environs 7 ma.
prévoir le capteur de tel sorte qu'il détecte "touche enfoncée"
@ -52,9 +50,6 @@ prévoir le capteur de tel sorte qu'il détecte "touche enfoncée"
idée support 3D à encastré dans le bois et qui depasse pour fixer le capteur,
ainsi qu'un autre en face pour l'aimant.
le 02/08/2019
sortie du materiel pour faire des tests avec arduino et sonde effets hall.
@ -62,7 +57,6 @@ approche kicad pour faire des schema electrique : prévoir l'installation
utilisation arduino vu capteur
le 09/08/2019
depuis la dernière note, essai arduino - programmation
@ -232,8 +226,6 @@ Hex to MIDI note chart
76 : Bb 8
77 : B 8
essai ok avec un capteur sur note C2
message type noteOn(0x90 ; 0x24 ; 0x70) ; /* statut note on canal1 ; C2 ; vel 112 */
@ -248,49 +240,3 @@ Hex to MIDI note chart
corrections sur fichier "chrono"
re-tester le dernier logiciel (3 capteurs) avec synthe (motif ES) : OK

View File

@ -1,23 +1,85 @@
/* capteur branché avec sortie sur pin24 arduino */
bool EtatEntree24 = HIGH ;
bool VarSuivi24 = HIGH ;
bool EtatEntree25 = HIGH ;
bool VarSuivi25 = HIGH ;
bool EtatEntree26 = HIGH ;
bool VarSuivi26 = HIGH ;
bool EtatEntree27 = HIGH ;
bool VarSuivi27 = HIGH ;
bool EtatEntree28 = HIGH ;
bool VarSuivi28 = HIGH ;
bool EtatEntree29 = HIGH ;
bool VarSuivi29 = HIGH ;
bool EtatEntree30 = HIGH ;
bool VarSuivi30 = HIGH ;
bool EtatEntree31 = HIGH ;
bool VarSuivi31 = HIGH ;
bool EtatEntree32 = HIGH ;
bool VarSuivi32 = HIGH ;
bool EtatEntree33 = HIGH ;
bool VarSuivi33 = HIGH ;
bool EtatEntree34 = HIGH ;
bool VarSuivi34 = HIGH ;
bool EtatEntree35 = HIGH ;
bool VarSuivi35 = HIGH ;
void setup()
{
pinMode(24,INPUT);
pinMode(25,INPUT);
pinMode(26,INPUT);
pinMode(27,INPUT);
pinMode(28,INPUT);
pinMode(29,INPUT);
pinMode(30,INPUT);
pinMode(31,INPUT);
pinMode(32,INPUT);
pinMode(33,INPUT);
pinMode(34,INPUT);
pinMode(35,INPUT);
Serial.begin(31250); /* initialisation d'un port serie au debit MIDI */
noteOn(0x80, 0x24 , 0x00 ) ; /* note off sur canal1 ; C2 ; vel 0 */
noteOn(0x80, 0x25 , 0x00 ) ;
noteOn(0x80, 0x26 , 0x00 ) ; /* note off sur canal1 ; D2 ; vel 0 */
noteOn(0x80, 0x27 , 0x00 ) ;
noteOn(0x80, 0x28 , 0x00 ) ; /* note off sur canal1 ; E2 ; vel 0 */
noteOn(0x80, 0x29 , 0x00 ) ;
noteOn(0x80, 0x30 , 0x00 ) ;
noteOn(0x80, 0x31 , 0x00 ) ;
noteOn(0x80, 0x32 , 0x00 ) ;
noteOn(0x80, 0x33 , 0x00 ) ;
noteOn(0x80, 0x34 , 0x00 ) ;
noteOn(0x80, 0x35 , 0x00 ) ;
}
@ -36,8 +98,20 @@ void loop()
{
EtatEntree24 = digitalRead(24);
EtatEntree25 = digitalRead(25);
EtatEntree26 = digitalRead(26);
EtatEntree27 = digitalRead(27);
EtatEntree28 = digitalRead(28);
EtatEntree29 = digitalRead(29);
EtatEntree30 = digitalRead(30);
EtatEntree31 = digitalRead(31);
EtatEntree32 = digitalRead(32);
EtatEntree33 = digitalRead(33);
EtatEntree34 = digitalRead(34);
EtatEntree35 = digitalRead(35);
if ( (EtatEntree24 != VarSuivi24) && (EtatEntree24 == HIGH) )
{
noteOn(0x80, 0x24 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */
@ -52,6 +126,20 @@ void loop()
VarSuivi24 = LOW;
}
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"); */
VarSuivi25 = LOW;
}
if ( (EtatEntree26 != VarSuivi26) && (EtatEntree26 == HIGH) )
{
noteOn(0x80, 0x26 , 0x00) ; /* note off sur canal1 ; D2 ; vel 0 */
@ -66,6 +154,21 @@ void loop()
VarSuivi26 = LOW;
}
if ( (EtatEntree27 != VarSuivi27) && (EtatEntree27 == HIGH) )
{
noteOn(0x80, 0x27 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */
/* Serial.println("touche lachee"); */
VarSuivi27 = HIGH;
}
if ( (EtatEntree27 != VarSuivi27) && (EtatEntree27 == LOW) )
{
noteOn(0x90, 0x27 , 0x70) ; /* note on sur canal1 ; C2 ; vel */
/* Serial.println("touche appuyee"); */
VarSuivi27 = LOW;
}
if ( (EtatEntree28 != VarSuivi28) && (EtatEntree28 == HIGH) )
{
noteOn(0x80, 0x28 , 0x00) ; /* note off sur canal1 ; C2 ; vel 0 */
@ -81,8 +184,106 @@ void loop()
}
if ( (EtatEntree29 != VarSuivi29) && (EtatEntree29 == HIGH) )
{
noteOn(0x80, 0x29 , 0x00) ; /* note off sur canal1 ; ; vel 0 */
/* Serial.println("touche lachee"); */
VarSuivi29 = HIGH;
}
if ( (EtatEntree29 != VarSuivi29) && (EtatEntree29 == LOW) )
{
noteOn(0x90, 0x29 , 0x70) ; /* note on sur canal1 ; C2 ; vel */
/* Serial.println("touche appuyee"); */
VarSuivi29 = LOW;
}
if ( (EtatEntree30 != VarSuivi30) && (EtatEntree30 == HIGH) )
{
noteOn(0x80, 0x2A , 0x00) ;
VarSuivi30 = HIGH;
}
if ( (EtatEntree30 != VarSuivi30) && (EtatEntree30 == LOW) )
{
noteOn(0x90, 0x2A , 0x70) ;
VarSuivi30 = LOW;
}
if ( (EtatEntree31 != VarSuivi31) && (EtatEntree31 == HIGH) )
{
noteOn(0x80, 0x2B , 0x00) ;
VarSuivi31 = HIGH;
}
if ( (EtatEntree31 != VarSuivi31) && (EtatEntree31 == LOW) )
{
noteOn(0x90, 0x2B , 0x70) ;
VarSuivi31 = LOW;
}
if ( (EtatEntree32 != VarSuivi32) && (EtatEntree32 == HIGH) )
{
noteOn(0x80, 0x2C , 0x00) ;
VarSuivi32 = HIGH;
}
if ( (EtatEntree32 != VarSuivi32) && (EtatEntree32 == LOW) )
{
noteOn(0x90, 0x2C , 0x70) ;
VarSuivi32 = LOW;
}
if ( (EtatEntree33 != VarSuivi33) && (EtatEntree33 == HIGH) )
{
noteOn(0x80, 0x2D , 0x00) ;
VarSuivi33 = HIGH;
}
if ( (EtatEntree33 != VarSuivi33) && (EtatEntree33 == LOW) )
{
noteOn(0x90, 0x2D , 0x70) ;
VarSuivi33 = LOW;
}
if ( (EtatEntree34 != VarSuivi34) && (EtatEntree34 == HIGH) )
{
noteOn(0x80, 0x2E , 0x00) ;
VarSuivi34 = HIGH;
}
if ( (EtatEntree34 != VarSuivi34) && (EtatEntree34 == LOW) )
{
noteOn(0x90, 0x2E , 0x70) ;
VarSuivi34 = LOW;
}
if ( (EtatEntree35 != VarSuivi35) && (EtatEntree35 == HIGH) )
{
noteOn(0x80, 0x2F , 0x00) ;
VarSuivi35 = HIGH;
}
if ( (EtatEntree35 != VarSuivi35) && (EtatEntree35 == LOW) )
{
noteOn(0x90, 0x2F , 0x70) ;
VarSuivi35 = LOW;
}