# Open Music Kontrollers

## 2014 - Week 43

Renoise is a great cross-platform tracker and it is one of many audio programs that supports both OSC and MIDI. In this patch-a-week post we demonstrate how easy it is to link the Chimaera to any MIDI instrument on any platform with Renoise as OSC-MIDI bridge.

This is a follow-up to the patch-a-week #36. Before proceeding, make sure to be familiar with:

### Renoise OSC-MIDI bridge (via oscmidi output engine)

The OSC and MIDI setup in Renoise is exactly the same as in patch-a-week #36, thus simply follow the instructions there.

Instead of using the custom output engine and building the rather complex OSC arguments from scratch, the oscmidi output engine supports the peculiar OSC formatting requirements of Renoise directly (starting from firmware version 0.6.0).

The oscmidi output engine takes care of converting continuous x-dimension into NOTE ON, PITCH BEND and NOTE OFF messages. You just need to provide each used group with the note offset and the pitch bend note range. The involved math is explained in detail in patch-a-week #32. For a device with $n$ sensors in a standard setup of one MIDI note per 3 sensors starting from octave $oct$ , note offset and pitch bend range are:

$\begin{array}{rcll}offset\left(oct,n\right)& =& oct\cdot 12-0.5-\frac{n%18}{6}& \text{(1)}\text{}\text{}\\ range\left(n\right)& =& \frac{n}{3}& \text{(2)}\text{}\text{}\end{array}$

For $n=160$ and $oct=3$ , we get:

$\begin{array}{rcll}offset\left(oct,n\right)& =& 32.833& \text{(1)}\text{}\text{}\\ range\left(n\right)& =& 53.333& \text{(2)}\text{}\text{}\end{array}$

The oscmidi output engine can map z-dimension to CONTROLLER, NOTE PRESSURE or CHANNEL PRESSURE. Controller messages are preferred, as many of them support 14-bit precision and the Chimaera will send 14-bit whenever possible. Both pressure messages only support 7bit precision which is only a fraction (1/16th) of what the Chimaera is able to resolve (11-bit).

``````/engines/oscmidi/enabled ii 12 1
/engines/oscmidi/multi ii 13 0
/engines/oscmidi/path is 14 '/renoise/trigger/midi'
/engines/oscmidi/format is 15 'int32'
/engines/oscmidi/reset i 16
/engines/oscmidi/attributes/0 isffi 17 'control_change' 32.833 53.333 0x07
/engines/oscmidi/attributes/1 isffi 18 'control_change' 32.833 53.333 0x07
``````

Get the Renoise patch for the OSC-MIDI bridge and the accompanying Lua configuration script at our Renoise repository e.g

Last update - 05 May 2019