Wiki

Reso-nance numérique | Arts et cultures libres

Outils du site


projets:malinette-brutbox:accueil

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
projets:malinette-brutbox:accueil [2015/09/18 20:02]
resonance [Logiciel]
projets:malinette-brutbox:accueil [2016/04/04 11:05]
resonance supprimée
Ligne 1: Ligne 1:
 ====== Malinette BrutBox ====== ====== Malinette BrutBox ======
- 
  
 {{{project {{{project
Ligne 24: Ligne 23:
 {{:projets:malinette-brutbox:scenebrutbox.jpg|}} {{:projets:malinette-brutbox:scenebrutbox.jpg|}}
  
-  * Nom : BrutBox ?+  * Nom : BrutBox
   * État de l'art : [[http://orguesensoriel.com/|Orgue Sensoriel]]. Refaire sensiblement la même chose en moins cher, en libre/reproductible, (en moins bien ergonomiquement ?) mais en plus intéressant musicalement. Les capteurs sont distingués pour les animateurs : déclencheurs/variateurs, afin qu'ils s'accaparent le dispositif. Notez la taille des capteurs, les couleurs, la fixation, la connectique en Jack et l'utilisation avec 1 seul handicapé et 1 animateur.    * État de l'art : [[http://orguesensoriel.com/|Orgue Sensoriel]]. Refaire sensiblement la même chose en moins cher, en libre/reproductible, (en moins bien ergonomiquement ?) mais en plus intéressant musicalement. Les capteurs sont distingués pour les animateurs : déclencheurs/variateurs, afin qu'ils s'accaparent le dispositif. Notez la taille des capteurs, les couleurs, la fixation, la connectique en Jack et l'utilisation avec 1 seul handicapé et 1 animateur. 
   * Entrées : kinect, accéleromètre sans fil, neurosky (sans routage), capteur distance, piezo pince, micro, crayon graphite, conductivité corps (genre makey makey), webcam (face tracking, fiducials, ...), gros boutons, pavé XY façon kaospad, tapis XY   * Entrées : kinect, accéleromètre sans fil, neurosky (sans routage), capteur distance, piezo pince, micro, crayon graphite, conductivité corps (genre makey makey), webcam (face tracking, fiducials, ...), gros boutons, pavé XY façon kaospad, tapis XY
Ligne 32: Ligne 31:
   * Production : Armada   * Production : Armada
  
-==== État de l'art ====+===== État de l'art =====
 <WRAP group> <WRAP group>
 <WRAP third column> <WRAP third column>
Ligne 58: Ligne 57:
 Nous utilisons pour le moment, la carte Teensy 2.0 qui permet de convertir en MIDI les données de nos capteurs. Nous utilisons pour le moment, la carte Teensy 2.0 qui permet de convertir en MIDI les données de nos capteurs.
 En guise de connectique nous avons opté pour des connecteurs USB (pour éviter les faux contacts). En guise de connectique nous avons opté pour des connecteurs USB (pour éviter les faux contacts).
 +
 +
 +**Gravure :**\\
 +On fait de la gravure a l'anglaise a la cnc , vitesse 100mm/mn... passe 0.1mm, cela prend envion 40minutes de faire la carte principale, et 10 minutes par plaque usb B.
 +
 +  * **Fichier actuels :** (dxf+cambam+gcode) : {{:projets:malinette-brutbox:pcb-brutbox-012016.zip|}} 
 +  * Fichiers anciens : {{:projets:malinette-brutbox:teensy20-usbx8.ai|}} ,{{:projets:malinette-brutbox:teensy20-usbx8.svg|}} 
  
 {{ :projets:malinette-brutbox:screen_shot_05-11-15_at_04.09_pm.png?500 |}} {{ :projets:malinette-brutbox:screen_shot_05-11-15_at_04.09_pm.png?500 |}}
-{{:projets:malinette-brutbox:teensy20-usbx8.ai|}} ,{{:projets:malinette-brutbox:teensy20-usbx8.svg|}}  
 {{:projets:malinette-brutbox:teensy-pin-assignments.gif?nolink|teensy pin assignments}} {{:projets:malinette-brutbox:teensy-pin-assignments.gif?nolink|teensy pin assignments}}
 {{:projets:malinette-brutbox:pcb-teensy-usb-implementation.jpg|}} {{:projets:malinette-brutbox:pcb-teensy-usb-implementation.jpg|}}
Ligne 66: Ligne 71:
  
  
-==== Firmware Teensy 2 ====+ 
 +==== Firmware Teensy actuel (Make it brut / Fevrier 2016) ==== 
 +++++ *teensy-8-floatsIN-MAKE-IT-BRUT.ino* | 
 +<code cpp> 
 +// the MIDI channel number to send messages 
 +const int channel = 1; 
 +  
 +// the MIDI continuous controller for each analog input 
 +const int controllerA0 = 1; // 
 +const int controllerA1 = 2; // 
 +const int controllerA2 = 3; //  
 +const int controllerA3 = 4; // 
 +const int controllerA4 = 5; //  
 +const int controllerA5 = 6; //  
 +const int controllerA6 = 7; //  
 +const int controllerA7 = 8; //  
 +  
 +void setup() { 
 +
 +  
 +// store previously sent values, to detect changes 
 +int previousA0 = -1; 
 +int previousA1 = -1; 
 +int previousA2 = -1; 
 +int previousA3 = -1; 
 +int previousA4 = -1; 
 +int previousA5 = -1; 
 +int previousA6 = -1; 
 +int previousA7 = -1; 
 + 
 +elapsedMillis msec = 0; 
 +  
 +void loop() { 
 +  // only check the analog inputs 50 times per second, 
 +  // to prevent a flood of MIDI messages 
 +  if (msec >= 50) { 
 +    msec = 0; 
 +    int n0 = analogRead(A0) / 8; 
 +    int n1 = analogRead(A1) / 8; 
 +    int n2 = analogRead(A2) / 8; 
 +    int n3 = analogRead(A3) / 8; 
 +    int n4 = analogRead(A4) / 8; 
 +    int n5 = analogRead(A5) / 8;     
 +    int n6 = analogRead(A6) / 8; 
 +    int n7 = analogRead(A7) / 8;     
 +  
 +    // only transmit MIDI messages if analog input changed 
 +    if (n0 != previousA0) { 
 +      usbMIDI.sendControlChange(controllerA0, n0, channel); 
 +      previousA0 = n0; 
 +    } 
 +    if (n1 != previousA1) { 
 +      usbMIDI.sendControlChange(controllerA1, n1, channel); 
 +      previousA1 = n1; 
 +    } 
 +    if (n2 != previousA2) { 
 +      usbMIDI.sendControlChange(controllerA2, n2, channel); 
 +      previousA2 = n2; 
 +    } 
 +    if (n3 != previousA3) { 
 +      usbMIDI.sendControlChange(controllerA3, n3, channel); 
 +      previousA3 = n3; 
 +    } 
 +    if (n4 != previousA4) { 
 +      usbMIDI.sendControlChange(controllerA4, n4, channel); 
 +      previousA4 = n4; 
 +    } 
 +    if (n5 != previousA5) { 
 +      usbMIDI.sendControlChange(controllerA5, n5, channel); 
 +      previousA5 = n5; 
 +    } 
 +  
 +    if (n6 != previousA6) { 
 +      usbMIDI.sendControlChange(controllerA6, n6, channel); 
 +      previousA6 = n6; 
 +    } 
 +    if (n7 != previousA7) { 
 +      usbMIDI.sendControlChange(controllerA7, n7, channel); 
 +      previousA7 = n7; 
 +    } 
 + 
 +  
 +  } 
 +  
 +  // MIDI Controllers should discard incoming MIDI messages. 
 +  // http://forum.pjrc.com/threads/24179-Teensy-3-Ableton-Analog-CC-causes-midi-crash 
 +  while (usbMIDI.read()) { 
 +    // ignore incoming messages 
 +  } 
 +
 +</code> 
 +++++ 
 + 
 +==== Olds Firmwares Teensy 2 ====
   * [[.:brutbox-firmware-old:|versions avant 09/06/215]]   * [[.:brutbox-firmware-old:|versions avant 09/06/215]]
   * Fichiers : ...   * Fichiers : ...
Ligne 81: Ligne 179:
 </code> </code>
  
 +
 +++++ teensy_brutbox.ino (12 ana + encoder,sans on/off, sans capa) |
 +<code cpp>
 +/* 
 + * TEENSY 2 for BRUTBOX
 + * Analog sensors + encoder + touch
 + *
 + * Licence : GNU/GPL3
 + * Date : 12/06/2015
 + * Website : http://reso-nance.org/wiki/projets/malinette-brutbox
 + *
 + * Hardware add-on : the MPR121 module for touch sensors
 + *
 + * Midi mapping :
 + * 12 analog sensors (midi controller from 0 to 11)
 + * 1 encoder (midi controller 12)
 + */
 + 
 +// Include libraries
 +#include <Encoder.h>
 + 
 +// Midi channel
 +const int channel = 1;
 + 
 +// Analog setup
 +int anaPins[] = {22,11,12,13,14,15,16,17,18,19,20,21}; // analog pins
 +const int anaNb = 12; // number of inputs
 +int anaCtl[] = {11,10,9,8,7,6,5,4,3,2,1,0}; // controller in
 +int anaValues[anaNb]; // current analog values
 +int anaLastValues[anaNb]; // previous analog values
 + 
 +// Encoder setup
 +Encoder encoderSensor (7, 8);
 +long encoderOldPosition  = -999;
 +long encoderNewPosition;
 +long encoderLastPosition;
 +
 +// Sampling rate
 +elapsedMillis msec = 0;
 + 
 +void setup() { 
 +
 + 
 +void loop() {
 +   if (msec >= 40) {
 +    msec = 0;
 + 
 +      // Analog sensors loop
 +      for (int i = 0; i < anaNb; i++) {
 +              anaValues[i] = (int) analogRead(anaPins[i])  / 8 ;
 +              if (anaValues[i] != anaLastValues[i]) {  
 +                  usbMIDI.sendControlChange(anaCtl[i], anaValues[i], channel);
 +                  anaLastValues[i] = anaValues[i];
 +       }
 +       }
 +       
 +      // Encoder loop
 +       encoderNewPosition = encoderSensor.read();
 +       if (encoderNewPosition != encoderOldPosition) {
 +          if (encoderNewPosition > encoderOldPosition) {usbMIDI.sendControlChange(12, 0, channel);
 +          else if (encoderNewPosition < encoderOldPosition) {usbMIDI.sendControlChange(12, 127, channel);}
 +          encoderOldPosition = encoderNewPosition;
 +        }    
 +  }
 + 
 +  while (usbMIDI.read()) {
 +    // Discard incoming MIDI messages.
 +  }
 +}
 +</code>
 +++++
  
 ++++ teensy_brutbox.ino (8 analogique simple , pas de librairie encoder, wire, capacitif...) | ++++ teensy_brutbox.ino (8 analogique simple , pas de librairie encoder, wire, capacitif...) |
Ligne 517: Ligne 686:
 ++++ ++++
  
 +++++ test-nrpn.ino (sur 1 capteur analo A0) !! mais erreur de compilation… |
 +<code cpp>
 +// Fixed values, for demonstration
 +uint32_t channel = 1;          // channels are 1 to 16
 +uint32_t param = 0;   // your parameter number here, 0 to 16k
 +//uint32_t val = 2;          // your value here, 0 to 16k
 +// in actual use this would come from some physical controller like an analog value
 +// or be computed by monitoring an encoder
  
 +void sendNRPNHR(uint32_t parameter, uint32_t value, uint32_t channel)  {
 +  // Send an arbitrary 14-bit value to an arbitrary 14-bit non-registered parameter
 +  // Note that param MSB and LSB are shared between RPN and NRPN, so set both at once
 +  // Also, null out the RPN (and NRPN) active parameter (best practice) after data is sent (as it persists)
  
 +  // Control change 99 for NRPN, MSB of param
 +  usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((99 & 0x7F) << 16) | ((parameter & 0x7F) << 24));
 +  // Control change 98 for NRPN, LSB of param
 +  usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((98 & 0x7F) << 16) | (((parameter >>7) & 0x7F) << 24));
 +  // Control change 6 for Data Entry MSB of value
 +  usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((6 & 0x7F) << 16) | ((value & 0x7F) << 24));
 +  // Control change 38 for Data Entry LSB of param
 +  usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((38 & 0x7F) << 16) | (((value >>7) & 0x7F) << 24));
 +  // Now null out active parameter by sending null (127, 0x7F) as MSB and LSB
 +  // Control change 101 for RPN, MSB of param
 +  usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((101 & 0x7F) << 16) | (0x7F << 24));
 +  // Control change 100 for NRPN, LSB of param
 +  usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((100 & 0x7F) << 16) | (0x7F << 24));
 +}
  
 +
 +void setup() {
 +}
 +
 +// store previously sent values, to detect changes
 +int previousA0 = -1;
 +elapsedMillis msec = 0;
 +
 +void loop() {
 +  // only check the analog inputs 50 times per second,
 +  // to prevent a flood of MIDI messages
 +  if (msec >= 80) {
 +    msec = 0;
 +    int n0 = analogRead(A0);
 +
 +        if (n0 != previousA0) {
 +         //int valA0 = map(n0, 0, 1023, 0, 16383);
 +         sendNRPNHR(param, n0, 1); // channel 1
 +         previousA0 = n0;
 +        }
 +  }
 +}
 +
 +
 +
 +/////////////////////////////////// LOG ERREURS //////////////////////////////////////////////////////
 +Arduino : 1.6.7 (Mac OS X), TD: 1.27, Carte : "Teensy 2.0, MIDI, 16 MHz, US English"
 +
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino: In function 'void sendNRPNHR(uint32_t, uint32_t, uint32_t)':
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:14:83: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((99 & 0x7F) << 16) | ((parameter & 0x7F) << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:14:115: error: 'usb_midi_write_packed' was not declared in this scope
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((99 & 0x7F) << 16) | ((parameter & 0x7F) << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:16:83: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((98 & 0x7F) << 16) | (((parameter >>7) & 0x7F) << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:18:82: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((6 & 0x7F) << 16) | ((value & 0x7F) << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:20:83: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((38 & 0x7F) << 16) | (((value >>7) & 0x7F) << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:23:84: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((101 & 0x7F) << 16) | (0x7F << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:23:99: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((101 & 0x7F) << 16) | (0x7F << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:25:84: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((100 & 0x7F) << 16) | (0x7F << 24));
 +^
 +/Users/zinc5/Documents/Arduino/test-nrpn2/test-nrpn2.ino:25:99: warning: left shift count >= width of type [enabled by default]
 +usb_midi_write_packed(0xB00B | (((channel - 1) & 0x0F) << 8)  | ((100 & 0x7F) << 16) | (0x7F << 24));
 +^
 +exit status 1
 +Erreur lors de la compilation.
 +</code>
 +++++
 ==== Capteurs ==== ==== Capteurs ====
 [[.:brouillon-capteurs|Brouillon]] [[.:brouillon-capteurs|Brouillon]]
Ligne 617: Ligne 872:
 ===== Logiciel ===== ===== Logiciel =====
  
-{{ :projets:malinette-brutbox:brutbox_nantes.png?nolink |}} +{{:projets:malinette-brutbox:bb-2016-02-25-gantner.png|}} 
-**Dernière version de septembre 2015** (residence à Nantes chez Stereolux) : {{:projets:malinette-brutbox:brutboxx18092015.zip|}}+**Dernière version : fevrier 2016** (résidence à l'Espace Gantner) :{{:projets:malinette-brutbox:bb-2016-02-24-gantner.zip|}}
  
-Elle contient une séquence d'une dizaine d'exemples pour quelques heures d'atelier avec différents exercices : voix, effets audio, ondes cérébrale, guitare électronique, loopsampler, capteur lumière et sons binauraux...+Nouveautés : 
 +  * Partition commune entre les collections d'objets communs à Brutbox et Malinette. 
 +  * Sous menu dans le menu projet pour organiser les créations par dossier 
 +  * intégration de l'objet IN "faceOSC" des petits debrouillards 
 +  * intégration du bloc video dans les entrées bb
  
-  * Basé sur la Malinette et Pure Data Extended : https://git.framasoft.org/resonance/malinette/tree/master+!temporairement : les enregistrements Brutbox arrivent dans le dossier media/recording de la Malinette
  
 +Cette version contient la séquence d'une dizaine d'exemples pour quelques heures d'atelier avec différents exercices : voix, effets audio, ondes cérébrale, guitare électronique, loopsampler, capteur lumière et sons binauraux...
  
  
-===== Boite et decoupe laser ===== +  * Basé sur la Malinette et Pure Data Extended : https://git.framasoft.org/resonance/malinette/tree/master 
-{{:projets:malinette-brutbox:brutbox-proto2.zip|fichiers de découpe des boites et PCB}}+ 
 + 
 +===== Boite en bois et decoupe laser ===== 
 +<WRAP  round important 80%> 
 +Attention certains fichiers ont des problèmes d'échelle (à multiplier par 125%), et d'autres sont outdatés... 
 +</WRAP>
  
 +  * {{:projets:malinette-brutbox:brutbox-proto2.zip|fichiers de découpe des boites et PCB}}
 +  * {{:projets:malinette-brutbox:bb-gaitelyrique.zip|fichiers de découpe des boites non corrects.}}
  
-------+Nous avons utilisé un générateur de boite : http://boxmaker.connectionlab.org
 ==== Prototype 0.1 ==== ==== Prototype 0.1 ====
   * [[.:pistes:|Pistes initiales]]   * [[.:pistes:|Pistes initiales]]