Hi,
I am totally new with Teensy (have a very basic understanding of the code) and am trying to build a MIDI controller with 16 stretch sensors (adafruit conductive rubber) as separate MIDI inputs. ultimately, I would like to map each stretch sensor to a different parameter in Ableton Live.
I got the code/wiring/connection with Ableton working for one sensor:
but I am stuck in extending it to more than one sensor.
for some reason I cannot upload a picture of my wiring, but as I said it works for one sensor, so I would just repeat the same circuit for another analgueRead and use usbMIDI.sendControlChange(1,valueStretch1, 1) to specify the channel? next to the code, I am not entirely sure about how to use the Teensy as a MIDIx16 in Ableton.
I am working with Mac (Monterey), Arduino 1.8.19 incl Teensyduino 1.56.
if anything is unclear, please let me know, very new to this
I really appreciate all suggestions/help!!
cheers,
franziska
I am totally new with Teensy (have a very basic understanding of the code) and am trying to build a MIDI controller with 16 stretch sensors (adafruit conductive rubber) as separate MIDI inputs. ultimately, I would like to map each stretch sensor to a different parameter in Ableton Live.
I got the code/wiring/connection with Ableton working for one sensor:
Code:
#include <MIDI.h>
int Stretch1 = 0; //name of data from sensor
void setup() { }
void loop() {
{ int accum = 0; // define a place to add values
for (int i = 0; i < 10; i++){ // loop ten times
accum += analogRead(14); // add the reading to accum
}
int value = accum/10; // get average
Serial.print("amazing "); //so it says which string
Serial.println(value); // print to serial monitor
Stretch1 = constrain(analogRead(14), 103, 211); //min max analogread
Stretch1 = map(Stretch1, 103, 211, 0, 127); //mapping the analogread
int valueStretch1 = Stretch1;
usbMIDI.sendControlChange(1,valueStretch1, 1); //(midi number, value, ?)
while (usbMIDI.read()) {} //needed for no bugs
delay(10);
}
}
but I am stuck in extending it to more than one sensor.
for some reason I cannot upload a picture of my wiring, but as I said it works for one sensor, so I would just repeat the same circuit for another analgueRead and use usbMIDI.sendControlChange(1,valueStretch1, 1) to specify the channel? next to the code, I am not entirely sure about how to use the Teensy as a MIDIx16 in Ableton.
I am working with Mac (Monterey), Arduino 1.8.19 incl Teensyduino 1.56.
if anything is unclear, please let me know, very new to this
I really appreciate all suggestions/help!!
cheers,
franziska