Flow to Resolume

A cross-platform webbluetooth solution to connect the Flow sensors to Resolume via an OSC bridge.

To use web bluetooth and web osc need to install osc-web\

Has certain dependencies, node and socket:

https://nodejs.org/en/

Installation:

$ git clone git://github.com/automata/osc-web.git

$ cd osc-web/

$ npm install

Using:

$ cd osc-web

Replace the bridge.js file in osc-web with the one in the repository. The bridge.js file in the repository essentially processes a regular expression to parse the OSC message and send values to Resolume.

$ node bridge.js

This starts osc-web and must run in the background.

Step 1: Open index.html in the Chrome Browser and connect to sensors (two sensors in this example)

Connection to bluetooth

Step 2: Observe data in osc bridge

Receiving OSC messages

Step 3: Observe changes in Resolume (see BPM for example)

Observe changes in Resolume

Step 4: You can change the address of OSC messages in Resolume by editing socket.emit statements in sketchBluetooth.js One can also receiving data from more than two sensors based on the code below.

//Assign arriving sensor data to respective device devices[id.toString()] = iput; if(devices[Object.keys(devices)[0]]!=undefined) { sensor1Value = devices[Object.keys(devices)[0]];

  console.log(sensor1Value);
}
if(devices[Object.keys(devices)[1]]!=undefined)
{
  sensor2Value  = devices[Object.keys(devices)[1]];
  
  console.log(sensor2Value);
}
// Add more statements like this for the six sesnors

//Send data to two different OSC addresses in Resolume
 socket.emit('message', "/composition/tempocontroller/tempo" + sensor1Value.toString()); 
 socket.emit('message', "/composition/master" + sensor2Value.toString());