Skip to content

TheStaticTurtle/OSCr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSCr

OSCr is a very simple and versatile OSC router.

Configuration

In the configuration you define a list of "links". Each link represents a single device.

There exist multiple device types:

  • classic: Listens for a message from the device on a specific address/port and send it back to the specified address/port. A classic device can be listen-only or send-only.
  • x32: This is a specific implementation for the custom OSC protocol of the behringer x32 / midas m32 (only a subset is implemented)
  • virutal_metrics: This is a virtual link that generates "metrics" messages about the router

Each link then has a list of forwarders. A forwarder has:

  • A destination (required)
  • A list of local transforms for topics (compatible with "Unix shell-style wildcards")
  • A global transform that is applied to every message after local transforms

Example configuration

In this configuration there are four links:

OSCr will :

  • Listen for message from reaper and forward:
    • Every message to protokol with the /reaper prefix
    • Every message to touchosc with the /sound/reaper prefix
  • Listen for message from touchosc and forward:
    • Every message to protokol with the /touchosc prefix
    • Playback controls to reaper after removing the /sound/reaper prefix
  • Send metrics message every 1sec to:
    • protokol with the /virtual_metrics prefix
    • touchosc with the /system/osc/metrics prefix
links:
  - id: "reaper"
    type: classic
    incoming:
      host: 0.0.0.0
      port: 2001
    outgoing:
      host: 127.0.0.1
      port: 2000
    forward:
      - destination: protokol
        global_transform: { name: prefix, prefix: "/reaper" }
      - destination: touchosc
        global_transform: { name: prefix, prefix: "/sound/reaper" }


  - id: "touchosc"
    type: classic
    incoming:
      host: 127.0.0.1
      port: 4000
    outgoing:
      host: 127.0.0.1
      port: 4001
    forward:
      - destination: protokol
        global_transform: { name: prefix, prefix: "/touchosc" }
      - destination: reaper
        map:
          "/sound/reaper/play": { name: rewrite, new_topic: /play }
          "/sound/reaper/pause": { name: rewrite, new_topic: /pause }
          "/sound/reaper/stop": { name: rewrite, new_topic: /stop }

  - id: "protokol"
    type: classic
    outgoing:
      host: 127.0.0.1
      port: 10000

  - id: "virtual_metrics"
    type: virtual-metrics
    forward:
      - destination: protokol
        global_transform: { name: prefix, prefix: "/virtual_metrics" }
      - destination: touchosc
        global_transform: { name: prefix, prefix: "/system/osc/metrics" }

This configuration has been successfully tested with 32 track on reaper (60Hz update 0ms delay) which gives around 2.6k incoming msg/sec and 3.3k outgoing msg/sec. I also roughly tested up to 10k msg outgoing/sec without any apparent issues.

About

OSCr is a very simple and versatile OSC router.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages