Cycling74 / rnbo-runner-panel

Web interface to the RNBO runner
MIT License
9 stars 1 forks source link

FR: expose port aliases #48

Closed x37v closed 2 months ago

x37v commented 10 months ago

for instance, system i/o might have better names in the aliases

{
  "FULL_PATH": "/rnbo/jack/info/ports/aliases",
  "DESCRIPTION": "Ports and a list of their aliases",
  "CONTENTS": {
    "system:playback_1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system:playback_1",
      "TYPE": "s",
      "VALUE": [
        "coreaudio:Vanatoo T0:in_Front Left1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system:playback_2": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system:playback_2",
      "TYPE": "s",
      "VALUE": [
        "coreaudio:Vanatoo T0:in_Front Right2"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:capture_1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:capture_1",
      "TYPE": "s",
      "VALUE": [
        "coremidi:Bus 1:out1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:capture_2": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:capture_2",
      "TYPE": "s",
      "VALUE": [
        "coremidi:from Max 1:out2"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:capture_3": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:capture_3",
      "TYPE": "s",
      "VALUE": [
        "coremidi:from Max 2:out3"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:playback_1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:playback_1",
      "TYPE": "s",
      "VALUE": [
        "coremidi:Bus 1:in1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:playback_2": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:playback_2",
      "TYPE": "s",
      "VALUE": [
        "coremidi:to Max 1:in2"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:playback_3": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:playback_3",
      "TYPE": "s",
      "VALUE": [
        "coremidi:to Max 2:in3"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "SinkOnly-0:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/SinkOnly-0:midiout1",
      "TYPE": "s",
      "VALUE": [
        "SinkOnly-0:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:capture_4": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:capture_4",
      "TYPE": "s",
      "VALUE": [
        "coremidi:virtual1:out4"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:capture_5": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:capture_5",
      "TYPE": "s",
      "VALUE": [
        "coremidi:virtual2:out5"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:playback_4": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:playback_4",
      "TYPE": "s",
      "VALUE": [
        "coremidi:virtual1:in4"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "system_midi:playback_5": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/system_midi:playback_5",
      "TYPE": "s",
      "VALUE": [
        "coremidi:virtual2:in5"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "remote_example-0:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/remote_example-0:midiout1",
      "TYPE": "s",
      "VALUE": [
        "remote_example-0:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "FreqCycle-1:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/FreqCycle-1:midiout1",
      "TYPE": "s",
      "VALUE": [
        "FreqCycle-1:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "FreqCycle-2:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/FreqCycle-2:midiout1",
      "TYPE": "s",
      "VALUE": [
        "FreqCycle-2:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "PassThru-3:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/PassThru-3:midiout1",
      "TYPE": "s",
      "VALUE": [
        "PassThru-3:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "FreqCycle-0:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/FreqCycle-0:midiout1",
      "TYPE": "s",
      "VALUE": [
        "FreqCycle-0:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "FeedbackSynth-0:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/FeedbackSynth-0:midiout1",
      "TYPE": "s",
      "VALUE": [
        "FeedbackSynth-0:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "PassThru-2:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/PassThru-2:midiout1",
      "TYPE": "s",
      "VALUE": [
        "PassThru-2:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    },
    "remote_example-3:midiout1": {
      "FULL_PATH": "/rnbo/jack/info/ports/aliases/remote_example-3:midiout1",
      "TYPE": "s",
      "VALUE": [
        "remote_example-3:rnbomidiout1"
      ],
      "ACCESS": 3,
      "CLIPMODE": "none",
      "EXTENDED_TYPE": "list"
    }
  }
}
x37v commented 10 months ago

no need to expose rnbomidiout1 as an alias though, it is just used internally

might wanna mouse over ports to get aliases or non aliased names depending on what the default is?

fde31 commented 10 months ago

beyond aliases - what's actually the idea of having the instance ins & outs listed in as part of the jack ports? Currently that's the thing throwing things off wrt creating "system" nodes and makes it hard to potentially cater for other node types if their prefixes aren't "hardcoded".

Currently requesting /rnbo/jack/info/ports gives you a list of what seems like all ports? The UI currently filters them by checking for a system: or system_midi:prefix in order to distinguish it from what's assigned to things in /rnbo/inst/....

Is that actually the most reliable / failsafe way to do it or is there a better way?

x37v commented 10 months ago

Is that actually the most reliable / failsafe way to do it or is there a better way?

The idea is that there you have all the i/o that jack sees, including those that the runner provides. Maybe it would be simpler to add a node in /rnbo/jack/ that allows you to make any connection so that we can connect system pass thru, connect non rnbo nodes, etc?

I think for a user, if you're doing OSC.. there is utility in having the instanced based connection: "foo:bar" -> /rnbo/inst/0/jack/connections/audio/sources/out1

but maybe the runner panel would benefit from a more generic "hook whatever sink to whatever source"

fde31 commented 10 months ago

That's not necessarily what I meant - I'd just like to get a list of ports that are non-instance (read system or whatever) associated rather than doing the error-prone prefix filtering which seems to be different depending on the platform.

fde31 commented 10 months ago

so #50 addresses the more generic system nodes creation.

Back to the core of the issue - not really problematic to store a map of port ids and aliases. The questions is just how we'd like to display this to the user. A popup in a patching env seems potentially noisy / crowded? We could also display a fixed positioned "helper" at the bottom (small info toolbar) that shows a port alias on hover.

x37v commented 10 months ago

the helper at the bottom could work.. though, we might get away with simply using the first alias for display, except for rnbomidiout1