Close
0%
0%

Wireless OSC Touch Controller

Send 3 Buttons over Wifi with OSC Protocoll. Display Ableton BPM , Metronome and Looper State with NodeMCU

Similar projects worth following
For an interactive musical theater piece in 2020 we want our four perfomers to loop in realtime and modulate some fx while moving around in the room. This leads us to a NodeMCU , a 6-Axis Gyroscope and a 160x128 TFT Display built in an arm panel and 3 Foot Panels.

The minimal configuration we need is  3 Buttons , a Display for Looper State, Host BPM and Bar Informations, a gyroscope for modulations and a Wifi Connection. Because of the Touch iputs of the NodeMCU we use touch buttons.

Everything will be sent per OSC Protocoll over udp / Wifi.

Scribbles of the arm panel // by S.Fischer

The footpanel has the same configuration like the portable controller but without the gyroscope and with Power adapter instead of Battery.

Scribbles of the foot panel // by S.Fischer



The Code

The Arduino scipt works like a charm now and transmits the values of the buttons ans Gyroscope in realtime with the OSC Library. The input of the Ableton BPM , Beat Position and Looper State per OSC also works fine. See " TO DO" for details.

https://github.com/CNMAT/OSC

This is the OSC string for Button 1 :
OSCBundle msg; 
 int b1state = debouncer.read();
    if ( b1state == 1) {
    msg.add("/Performer1/Button/1").add((int32_t)b1state);

    tft.fillRect(5, 5,  40, 20, TFT_RED);
      }
if ( b1state == 0) {
    //Serial.println("1 Pressed");
    msg.add("/Performer1/Button/1").add((int32_t)b1state);

      }

And this is value X of the Gyroscope :

if( myIMU.readRegisterInt16(&temp, LSM6DS3_ACC_GYRO_OUTX_L_XL) != 0 )
  {
    errorsAndWarnings++;
  }
  //Serial.print(" X = ");
  float estimated_value = Filter.updateEstimate(temp);
  msg.add("/Performer1/Gyro/x").add((int32_t)estimated_value);



Debouncing and Filtering is done by the SimpleKalman Library and the Bounce2 Library.
https://github.com/thomasfredericks/Bounce2
https://github.com/denyssene/SimpleKalmanFilter

The display still has some overlay problems and is flickering a little.
SparkFun Libary is used for the display.

https://github.com/sparkfun/SparkFun_LSM6DS3_Arduino_Library/blob/master/src/SparkFunLSM6DS3.h


TO DO :
  1. add LiPo and charger
  2. 3D Design of arm panel with final parts
  3. upload/update per wifi

WirelessOSCcontroller_V1.15.toe

first touchdesigner file to convert incoming OSC messages

toe - 126.35 kB - 08/21/2019 at 00:40

Download

WirelessOSCcontrollerV8.ino

Working Code with Gyro,buttons and tft

ino - 10.68 kB - 08/21/2019 at 00:39

Download

View all 6 components

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates