OMK Logo
OMK Title

Patch-a-Week

Week 35

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 interface the Chimaera to Renoise.

Before proceeding, make sure to be familiar with the Renoise OSC API

Interfacing the Chimaera to Renoise (via custom output engine)

Under menu entry Edit/Preferences/OSC, enable OSC server, choose UDP as protocol and memorize the used port number (8000 by default).

renoise/preferences/osc

Now configure the Chimaera via OSC to send its output to the Renoise OSC server. Below you will find a code snipplet that does exactly that. The ChimaeraConf class can be found in our SuperCollider repository.

We use the custom output engine to serialize custom OSC postfix messages for Renoise. On an ON event, we trigger a /renoise/trigger/note_on event for current instrument (-1) and current track (-1) with MIDI note (x scaled from [0, 1] to [11.166, 53.833] based on 128 sensors) and velocity (0x7f). The corresponding note is stored in a register to be retrieved at an OFF event to trigger a /renoise/trigger/note_off event. Vicinity is mapped to volume (z scaled from [0, 1] to [0, 2]) of current track (-1) by appending a SET event to target method /renoise/song/track/-1/prefx_volume.

With this simple configuration, the Chimaera will communicate directly with Renoise via UDP and by changing the target methods, you will be able to steer pretty much every parameter of your Renoise patches. Instead of using SuperCollider to configure the Chimaera via OSC, one could use any means of sending OSC messages to the Chimaera, e.g. even directly via the Renoise scripting API. This will be part of an upcoming patch-a-week, though.

{
  var hostname, tx, chimconf;
  
  hostname = "hostname".unixCmdGetStdOutLines[0]++".local";
  thisProcess.openUDPPort(4444); // open port 4444 for listening to chimaera configuration replies
  tx = NetAddr ("chimaera.local", 4444);
  chimconf = ChimaeraConf(s, tx, tx);
  
  chimconf.sendMsg("/engines/reset");
  chimconf.sendMsg("/engines/offset", 0.002);
  chimconf.sendMsg("/engines/enabled", false);
  chimconf.sendMsg("/engines/address", hostname++":8000", {
  	chimconf.sendMsg("/engines/mode", "osc.udp");
  	chimconf.sendMsg("/engines/enabled", true);
  });
  
  chimconf.sendMsg("/engines/custom/reset");
  chimconf.sendMsg("/engines/custom/append", "on", "/renoise/trigger/note_on", "i(1~) i(1~) i(11.166 42.666 $x*+ @@ $g[) i(0x7f)");
  chimconf.sendMsg("/engines/custom/append", "off", "/renoise/trigger/note_off", "i(1~) i(1~) i($g])");
  chimconf.sendMsg("/engines/custom/append", "set", "/renoise/song/track/-1/prefx_volume", "f($z 2*)");
  chimconf.sendMsg("/engines/custom/enabled", true);
  
  chimconf.sendMsg("/sensors/rate", 2000);
  chimconf.sendMsg("/sensors/group/reset"); // reset groups
  chimconf.sendMsg("/sensors/group/attributes/0", 0.0, 1.0, false, true, false); // add group
  chimconf.sendMsg("/sensors/group/attributes/1", 0.0, 1.0, true, false, false); // add group
}.value;

WANTED:
Beta Testers

After a high interest at Maker Faire Rome, we are now running a beta-testing campaign to collect more comprehensive feedback of first-hand experiences of our final Chimaera prototype design from interested individuals. Get in contact with us. Now.

Please support free/libre software and hardware designs.

or

donate bitcoins

or

request bank credentials via encrypted mail for SEPA transfers.

Last update - 23 May 2017

GitHub Google+ SoundCloud Vimeo

Copyright © 2014-2017, Hanspeter Portner, Open Music Kontrollers, cc-by-sa 4.0. Uses libre javascript.