«Supercollider to Renoise» by g_montel

on 25 Mar'13 11:24 in patternoscrenoisevsti

Renoise tracker (see renoise.com) can be controlled with OSC commands. With this Renoise Event Type, you can easily generate some patterns which will be played by Renoise. Useful if you want to make patterns with VSTi :-)

Usage : - start Renoise - in preferences, start OSC server - load a sample or VSTi in a sample slot in Renoise - start Supercollider - try this code - make more patterns !

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// declare an event type which sends OSC commands to Renoise

(
Event.addEventType(\renoise, { |server|
  var renoiseOscServer = NetAddr("127.0.0.1", 8000);
  var notes = [~midinote.value, ~ctranspose.value, ~velocity.value, ~sustain.value, ~lag.value, ~timingOffset.value, ~instr.value, ~track.value].flop;
  var timeNoteOn, timeNoteOff, instrument, track, velocity;
  var serverLatency;

  serverLatency = server.latency ? 0;

  notes.do {|note|
    instrument = note[6] ? -1;
    track = note[7] ? -1;
    velocity = note[2].asInt.clip(0,127);

    // sustain and timingOffset are in beats, lag is in seconds
    timeNoteOn = (thisThread.clock.tempo.reciprocal*note[5])+note[4]+server.latency;
    timeNoteOff = (thisThread.clock.tempo.reciprocal*(note[3]+note[5]))+note[4]+server.latency;
    SystemClock.sched(timeNoteOn, {renoiseOscServer.sendMsg("/renoise/trigger/note_on", instrument.asInt, track.asInt, (note[0]+note[1]).asInt, velocity )});
    SystemClock.sched(timeNoteOff, {renoiseOscServer.sendMsg("/renoise/trigger/note_off", instrument.asInt, track.asInt, (note[0]+note[1]).asInt)});
  }
});
)

// Now start Renoise OSC server, load a sample, and try some patterns

// straight timing
(
Pbind(*[
  type: \renoise,
  legato: Pgauss(0.2,0.05,inf),
  dur: 0.2,
  degree: [2,5,12],
  track: Prand([0,1], inf),
  ctranspose: Pseq([0,0,0,0,4,4,4,4,5,5,5,5],inf),
  velocity: Pgauss(64,10,inf),
]).play;
)

// loose timing
(
Pbind(*[
  type: \renoise,
  legato: 0.1,
  dur: 0.2,
  midinote: [66, 69, 74],
  lag: Pwhite(-0.05!3, 0.05)
]).play;
)
descendants
«Re: Supercollider to Renoise» by anonymous (private)
full graph
raw 1602 chars (focus & ctrl+a+c to copy)
comments
Fernando user 27 Oct'13 20:08

fantástico

rukano user 24 Dec'14 18:05

very useful!

philthomson user 15 Feb'15 21:34

Is there a way to specify an instrument to use in the pattern? I tried 'instrument: 0' and 'instrument: 1' and neither seemed to work.

g_montel user 28 Mar'15 04:57

use instr: 1

user 31 Mar'18 16:30

^^^ This sends notes to specific instruments within Renoise. Any way to record those patterns to individual tracks simultaneously?

user 31 Mar'18 20:41

"track: #" works

user 31 Mar'18 20:43

http://doc.sccode.org/Tutorials/A-Practical-Guide/PG_01_Introduction.html