Open Stage Control + TidalCycles = ❤️

Open Stage Control is just the name of the software, that may be a little bit confusing.

1 Like

Man, that software works so great with Tidal ! A huge thank to you for your tutorial too :slight_smile:

Did you ever try to insert a X/Y Controller widget and feed Tidal with "rangeX" and "rangeY" values ? It would be awesome in term of possibilities I guess.

1 Like

it really is, thanks for confirming!

Not yet, but it's a great idea!!

So, I've found a way to send OSC with a XY Controller in Open Stage Control.

  • Add a widget > Pads > xy
    Take note of its ID (in example : xy_1).

  • Contrary to a knob or a fader, the XY widget returns 2 values : rangeX and rangeY. However, the "preArgs" field in OSC parameters doesn't seem to accept many values. So we'll have to recover each value separately.
    The trick is to create 2 new input elements. Do this twice : Add a widget > Basics > Input

  • Affect each input element to a preArgs (for example : Pad_X and Pad_Y)

  • Set this value to Pad_X : #{@{xy_1}[0]}
    It returns the abscissa value from the XY widget.

  • And this value to Pad_Y : #{@{xy_1}[1]}
    = the ordinate value from the XY widget.

That's done.

An example with Tidal :

d1 $ sound "bev" # distort (cF 0 "pad_X") # accelerate (cF 0 "pad_Y")

You can now control both parameters in real time :slight_smile:
I let you imagine the world of awesomeness made possible with the multiXY widget !

3 Likes

If you have an incoming control value from 0 to 1, then you can use it to select a function from a list:

d1 $ selectF (cF0 "pad_X") [id, fast 2, hurry 2, every 3 (iter 4)]
  $ sound "bd sn mt ht"

To use it as a time pattern, for example the first input to 'fast', you can use cT:

d1 $ fast (range 1 4 $ cT0 "pad_Y") $ sound "bd mt ht lt"

By the way cF takes a default value, e.g. cF 0 "foo" to use the 'foo' pattern, or 0 if it's not yet set.

cF_ "foo" is the same but doesn't take a value, it just returns silence until the "foo" pattern is set.

cF0 is the same as cF 0

5 Likes

I had no idea this was possible. That's brutal.
You should also be able to pick samples / synths using it, too, right? Like:

d1 $ n "0(3,8)"
  # (selectF (cF0 "pad_X") . map s) ["bd", "sn", "superpiano"]
2 Likes

This is amazing.

It seems even more useful to send an integer over OSC so that we can pick the functions by whole number (at least this was my small discovery):

d1 $ pickF (cI0 "testI") [id, fast 2, hurry 2, every 3 (iter 4)]
  $ sound "bd sn mt ht"

PS: How is everyone getting the syntax highlighting in the forum?

2 Likes

Type "```" (unquoted) on lines above and below your actual code :sparkles:

1 Like

If you set up a XY Controller in Open Stage Control in the way that I explained, think about bypassing the widget's OSC parameters (osc > bypass > true) because it will unnecessarily flood Tidal's console with "unhandled OSC values" (with many decimals).

Also, the 2 inputs which get the separate X and Y values can be settled with the number of decimals you need, and it's a seamless process for Tidal then.

I've set up a multiXY widget this morning (it's like a XY widget but with multiple points). If you're interested, I can give some further explanations to set it up (and it's a monster tool in combination of live coding ahah).

1 Like

I'm definitely interested, please share it! I tried the XY Pad and your solution works wonders, it's amazing :slight_smile:
Thanks a lot for the bypass tip, my console was going nuts without that.

Setting up a multiXY widget in Open Stage Controller :

  • add widget > Pads > multiXY
  • Choose the number of points as needed in the menu.
  • Create a pair of inputs for each point you've chosen : add widget > Basics > input
  • Affect each input element to a preArgs (e.g : "Pad_X", "Pad_Y", "Pad_2_X", "Pad_2_Y" ).
  • Set values to each input element :
    #{@{multixy_1}[0]} with "Pad_X"
    #{@{multixy_1}[1]} with "Pad_Y"
    #{@{multixy_1}[2]} with "Pad_2_X"
    #{@{multixy_1}[3]} with "Pad_2_Y"
    etc... Values are increasing with additional points.
  • Don't forget to bypass multiXY widget's OSC
2 Likes

so after my initial faux pas in the thread and a couple of months of more intensive tidal cycles playing, I've finally come back to this and it looks awesome!

Thanks ghales, your video channel has some really useful stuff, and @a.d.du.nord, that real time control looks like it's going to solve one of the limitations I run across in tidal relatively regularly...

Post new-moon plans forming :smiley:

2 Likes

no problem dude! looking forward to see what you come up with :slight_smile:

Hey! I'm playing with Open Stage Control, it's a fantastic piece of software. Looking at the possibilities, there is one thing I'd love to do with it: do some visual feedback on euclidean rythms.

The idea is to use a matrix container and make it a row of N leds. Then, it is possible to send messages such as /matrix/5 1 and it will turn on the led at index 5. Now, that would come in handy to display how a rythm looks like, if it is bound to N steps.

So far, here is what I've got:

First, I followed the Custom OSC tutorial so I can send messages to Open Stage.

:{
let osTarget = Target {oName = "openstage",
                       oAddress = "127.0.0.1",
                       oPort = 8080,
                       oLatency = 0.2,
                       oSchedule = Live,
                       oWindow = Nothing}
    osFormats   = [OSC "/matrix/{index}" $ ArgList [("led", Nothing)]]
    index       = pI "index"
    led         = pI "led"
    oscmap      = [(osTarget, osFormats),
                   (superdirtTarget, [superdirtShape])]

:}

tidal <- startStream defaultConfig oscmap

My Open Stage interface looks like this (the important part here is the row of leds, obviously):

control

Now, to control that row of leds, I can do this:

d1 $ index (run 16) # led "1 0 0 1" -- your sequence of 1 and 0 goes here

Now, if I use an euclidean rythm:

d1 $ index (run 16) # led "1(3,16)"

This will turn on led [0,5,10] as expected, but it won't affect the other steps, so it won't "clean" them. Snooping around I found there are a bunch of euclid functions, such as euclidInv, which led me to this:

d1 $ index (run 16) # (euclid 3 16 $ led 1)
d2 $ index (run 16) # (euclidInv 3 16 $ led 0)

That one will do the cleaning trick, but I'm sure there is a clean one-liner somewhere and I can't see it...

3 Likes

Awwwwww yisssssss

d1 $ index (run 16) # (euclidFull beats 16 (led 1) (led 0))

As usual, just after posting a question, I find the answer :smiley: I guess writing it down helps to reframe the problem...

EDIT: ok so the final version is this:

let beats = cI 0 "beats"
    shift = cI 0 "shift"
in d1 $ index (run 16) # (rot (-shift) $ euclidFull beats 16 (led 1 # s "bd") (led 0))

With this, I can control the number of beats and the offset from the Open Stage interface, and have the led pattern update in realtime. It would be even better if the whole led pattern could update at once, but I guess the progressive refresh is good enough!

I need your Open Stage Control CSS really bad :~~
that print looks friggin awesome. how'd you do it?

By the way, this concept of sending visual feedback OSC is brilliant! I'll have a go at it soon enough. This could grow into a fully interactive hybrid platform for running tidalcycles

Not sure what you are referring to, I used the default theme for Open Stage Control. Here is my control.json file, it it helps !

{
  "session": {
    "type": "root",
    "id": "root",
    "interaction": true,
    "width": "auto",
    "height": "auto",
    "colorBg": "auto",
    "colorText": "auto",
    "colorWidget": "auto",
    "alphaFillOn": "auto",
    "padding": "auto",
    "css": "",
    "variables": "@{parent.variables}",
    "traversing": false,
    "layout": "default",
    "justify": "start",
    "gridTemplate": "",
    "contain": true,
    "scroll": true,
    "innerPadding": true,
    "verticalTabs": false,
    "value": "",
    "default": "",
    "linkId": "",
    "script": "",
    "address": "/ctrl",
    "preArgs": "",
    "typeTags": "",
    "decimals": 2,
    "target": "",
    "ignoreDefaults": false,
    "bypass": false,
    "widgets": [
      {
        "type": "panel",
        "top": 40,
        "left": 40,
        "id": "bd",
        "visible": true,
        "interaction": true,
        "width": 440,
        "height": 120,
        "expand": "false",
        "colorBg": "auto",
        "colorText": "auto",
        "colorWidget": "auto",
        "colorStroke": "auto",
        "colorFill": "auto",
        "alphaStroke": "auto",
        "alphaFillOff": "auto",
        "alphaFillOn": "auto",
        "lineWidth": "auto",
        "padding": "auto",
        "css": "",
        "variables": "@{parent.variables}",
        "traversing": false,
        "layout": "default",
        "justify": "start",
        "gridTemplate": "",
        "contain": true,
        "scroll": true,
        "innerPadding": true,
        "verticalTabs": false,
        "value": "",
        "default": "",
        "linkId": "",
        "script": "",
        "address": "auto",
        "preArgs": "",
        "typeTags": "",
        "decimals": 2,
        "target": "",
        "ignoreDefaults": false,
        "bypass": false,
        "widgets": [
          {
            "type": "knob",
            "top": 50,
            "left": 10,
            "id": "@{parent.id}_beats",
            "visible": true,
            "interaction": true,
            "width": 50,
            "height": 50,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "design": "solid",
            "pips": false,
            "dashed": false,
            "spring": false,
            "doubleTap": false,
            "range": {
              "min": 0,
              "max": 8
            },
            "logScale": false,
            "sensitivity": 1,
            "steps": 9,
            "origin": "auto",
            "value": "",
            "default": 0,
            "linkId": "",
            "script": "",
            "address": "/ctrl",
            "preArgs": "@{parent.id}_beats",
            "typeTags": "si",
            "decimals": 0,
            "target": "",
            "ignoreDefaults": false,
            "bypass": false,
            "mode": "vertical",
            "angle": 270,
            "html": ""
          },
          {
            "type": "fader",
            "top": 20,
            "left": 80,
            "id": "@{parent.id}_shift",
            "visible": true,
            "interaction": true,
            "width": 260,
            "height": 30,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "design": "default",
            "knobSize": "auto",
            "horizontal": true,
            "pips": false,
            "dashed": false,
            "gradient": [],
            "snap": false,
            "spring": false,
            "doubleTap": false,
            "range": {
              "min": 0,
              "max": 7
            },
            "logScale": false,
            "sensitivity": 1,
            "steps": 8,
            "origin": "auto",
            "value": "",
            "default": 0,
            "linkId": "",
            "script": "",
            "address": "/ctrl",
            "preArgs": "@{parent.id}_shift",
            "typeTags": "si",
            "decimals": 0,
            "target": "",
            "ignoreDefaults": false,
            "bypass": false,
            "html": ""
          },
          {
            "type": "matrix",
            "top": 60,
            "left": 80,
            "id": "@{parent.id}_pattern",
            "visible": true,
            "interaction": true,
            "width": 260,
            "height": 40,
            "expand": "false",
            "colorBg": "auto",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "widgetType": "led",
            "quantity": 8,
            "start": 0,
            "props": {},
            "layout": "horizontal",
            "gridTemplate": "",
            "traversing": true,
            "innerPadding": true,
            "value": "",
            "default": "",
            "linkId": "",
            "script": "",
            "address": "/@{parent.id}/pattern",
            "preArgs": "",
            "typeTags": "",
            "decimals": 0,
            "target": "",
            "ignoreDefaults": false,
            "bypass": false,
            "justify": "start",
            "contain": true,
            "scroll": true,
            "variables": "@{parent.variables}",
            "widgets": [],
            "tabs": [],
            "html": ""
          },
          {
            "type": "text",
            "top": 10,
            "left": 10,
            "id": "text_@{parent.id}",
            "visible": true,
            "width": 40,
            "height": 30,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "vertical": false,
            "wrap": false,
            "align": "center",
            "value": "@{parent.id}",
            "default": "",
            "linkId": "",
            "script": "",
            "address": "auto",
            "preArgs": "",
            "target": "",
            "html": ""
          },
          {
            "type": "knob",
            "top": 40,
            "left": 350,
            "id": "@{parent.id}_roll",
            "visible": true,
            "interaction": true,
            "width": 60,
            "height": 60,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "design": "solid",
            "mode": "vertical",
            "spring": false,
            "pips": false,
            "dashed": false,
            "angle": 270,
            "doubleTap": false,
            "range": {
              "min": 1,
              "max": 4
            },
            "logScale": false,
            "sensitivity": 1,
            "steps": 4,
            "origin": "auto",
            "value": "",
            "default": "",
            "linkId": "",
            "script": "",
            "address": "/ctrl",
            "preArgs": "@{parent.id}_roll",
            "typeTags": "si",
            "decimals": 0,
            "target": "",
            "ignoreDefaults": false,
            "bypass": false,
            "html": ""
          },
          {
            "type": "text",
            "top": 10,
            "left": 340,
            "id": "text_3",
            "visible": true,
            "width": 80,
            "height": 20,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "vertical": false,
            "wrap": false,
            "align": "center",
            "value": "roll",
            "default": "",
            "linkId": "",
            "script": "",
            "address": "auto",
            "preArgs": "",
            "target": "",
            "html": ""
          }
        ],
        "tabs": [],
        "html": ""
      },
      {
        "type": "clone",
        "top": 170,
        "left": 40,
        "id": "clone_1",
        "visible": true,
        "interaction": true,
        "width": 440,
        "height": 130,
        "expand": "false",
        "css": "",
        "widgetId": "bd",
        "props": {
          "id": "sd"
        },
        "label": "",
        "variables": "@{parent.variables}"
      },
      {
        "type": "clone",
        "top": 310,
        "left": 40,
        "id": "clone_2",
        "visible": true,
        "interaction": true,
        "width": 440,
        "height": 130,
        "expand": "false",
        "css": "",
        "widgetId": "bd",
        "props": {
          "id": "hh"
        },
        "label": "",
        "variables": "@{parent.variables}"
      },
      {
        "type": "panel",
        "top": 40,
        "left": 490,
        "id": "bpm",
        "visible": true,
        "interaction": true,
        "width": 190,
        "height": 190,
        "expand": "false",
        "colorBg": "auto",
        "colorText": "auto",
        "colorWidget": "auto",
        "colorStroke": "auto",
        "colorFill": "auto",
        "alphaStroke": "auto",
        "alphaFillOff": "auto",
        "alphaFillOn": "auto",
        "lineWidth": "auto",
        "padding": "auto",
        "css": "",
        "variables": "@{parent.variables}",
        "traversing": false,
        "layout": "default",
        "justify": "start",
        "gridTemplate": "",
        "contain": true,
        "scroll": true,
        "innerPadding": true,
        "verticalTabs": false,
        "value": "",
        "default": "",
        "linkId": "",
        "script": "",
        "address": "auto",
        "preArgs": "",
        "typeTags": "",
        "decimals": 2,
        "target": "",
        "ignoreDefaults": false,
        "bypass": false,
        "widgets": [
          {
            "type": "text",
            "top": 0,
            "left": 0,
            "id": "text_1",
            "visible": true,
            "width": 180,
            "height": 30,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "vertical": false,
            "wrap": false,
            "align": "center",
            "value": "BPM",
            "default": "",
            "linkId": "",
            "script": "",
            "address": "auto",
            "preArgs": "",
            "target": "",
            "html": ""
          },
          {
            "type": "knob",
            "top": 40,
            "left": 40,
            "id": "bpm_knob",
            "visible": true,
            "interaction": true,
            "width": "auto",
            "height": "auto",
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "design": "solid",
            "mode": "vertical",
            "spring": false,
            "pips": false,
            "dashed": false,
            "angle": 270,
            "doubleTap": false,
            "range": {
              "min": 60,
              "max": 180
            },
            "logScale": false,
            "sensitivity": 1,
            "steps": "",
            "origin": "auto",
            "value": "",
            "default": 90,
            "linkId": "",
            "script": "",
            "address": "/ctrl",
            "preArgs": "bpm",
            "typeTags": "",
            "decimals": 0,
            "target": "",
            "ignoreDefaults": false,
            "bypass": false,
            "html": ""
          },
          {
            "type": "text",
            "top": 150,
            "left": 50,
            "id": "bpm_display",
            "visible": true,
            "width": 80,
            "height": 30,
            "expand": "false",
            "colorText": "auto",
            "colorWidget": "auto",
            "colorStroke": "auto",
            "colorFill": "auto",
            "alphaStroke": "auto",
            "alphaFillOff": "auto",
            "alphaFillOn": "auto",
            "lineWidth": "auto",
            "padding": "auto",
            "css": "",
            "vertical": false,
            "wrap": false,
            "align": "center",
            "value": "@{bpm_knob.value}",
            "default": "",
            "linkId": "",
            "script": "",
            "address": "auto",
            "preArgs": "",
            "target": "",
            "html": ""
          }
        ],
        "tabs": [],
        "html": ""
      },
      {
        "type": "panel",
        "top": 450,
        "left": 40,
        "id": "bb",
        "visible": true,
        "interaction": true,
        "width": 440,
        "height": 200,
        "expand": "false",
        "colorText": "auto",
        "colorWidget": "auto",
        "colorStroke": "auto",
        "colorFill": "auto",
        "alphaStroke": "auto",
        "alphaFillOff": "auto",
        "alphaFillOn": "auto",
        "lineWidth": "auto",
        "padding": "auto",
        "css": "",
        "colorBg": "auto",
        "layout": "default",
        "justify": "start",
        "gridTemplate": "",
        "contain": true,
        "scroll": true,
        "innerPadding": true,
        "verticalTabs": false,
        "variables": "@{parent.variables}",
        "traversing": false,
        "value": "",
        "default": "",
        "linkId": "",
        "script": "",
        "address": "auto",
        "preArgs": "",
        "typeTags": "",
        "decimals": 2,
        "target": "",
        "ignoreDefaults": false,
        "bypass": false,
        "widgets": [],
        "tabs": [],
        "html": ""
      }
    ],
    "tabs": [],
    "visible": true,
    "html": ""
  },
  "version": "1.6.0",
  "type": "Open Stage Control session"
}
1 Like

Thanks! The way I did it, the main drawback is the lag in the display - the pattern gets updated as it plays. I guess it could be useful in some situations, though!