Skip to content

Open Sound Control (OSC) Interface

chichian edited this page Jan 4, 2018 · 19 revisions

trowaSoft Sequencer OSC Interface

The trowaSoft sequencers (trigSeq, trigSeq64, and voltSeq) can be controlled and send feedback via OSC. The namespace is tsseq. Currently, each sequencer instance must use different ports. In the future, sequencers may be allowed to use the same ports to listen to and talk to the same end point.

OSC functionality provided by oscpack library. For more information about OSC, please visit opensoundcontrol.org.

This feature is available as of v0.5.5.1. This interface is an alpha and will likely change as we figure out how best to integrate OSC.

Please report bugs or give feedback on the OSC interface on the Github Issue Tracker.

Setup & Usage

Starting OSC

To start using OSC on the sequencer, you will need to know the IP Address of the OSC client and the input/output ports. Any PD patches we supply will likely be set to localhost (127.0.0.1), using ports 7000 and 7001.

  1. Click on the "OSC" button to bring up the OSC Configuration form on the top display screen.

  2. By default the IP Address will be set to your local machine (127.0.0.1) and if this is the first instance of a sequencer in OSC mode, the default output port will be 7000 and the default input port will be 7001. If these are not correct, then edit the form fields with your desired values. Only IPv4 is supported.

  3. Press the [ENABLE] button to attempt to start up OSC. The blue message at the top should go from "OSC Not Connected" to showing the connected IP Address and ports. The "OSC" button should also light up blue. If there were any errors connecting then it should state the error in red underneath the IP Address form field.

  4. Press the "OSC" button again to hide the configuration form.

Stopping OSC

  1. Click on the "OSC" button to bring up the OSC Configuration form on the top display screen.
  2. Press the [DISABLE] button. The blue message at the top should return to "OSC Not Connected".

Troubleshooting

If the sequencer has problems connecting:

  1. Check that you are not already using the same port on another sequencer. Currently, each sequencer will capture its own listening port so two sequencers cannot share :(.
  2. Check the client/host device is on the same network.
  3. Check that the ports are not blocked by a firewall.

TODO: Finish more troubleshooting/tips.

Purr-Data (PD) Patches

Purr-Data patches are available to communicate with various control surfaces. Obviously we don't own every controller, so you can follow the patch examples and this document to create your own PD patch for your own controller if it is not available here.

General Purr-Data Setup

  1. Download and install Purr-Data for your platform from the releases page: https://github.com/agraef/purr-data/releases.
  2. You can now either use an existing PD patch or create your own (you can follow the Launchpad PD patch as an example).
  3. Set up the IP address, input port, and output port in the patch.
  4. Enable OSC on a trowaSoft sequencer (set up the IP and ports).

Launchpad PD Patch

This particular patch and controller are best suited for the trigSeq64.

PurrData Setup

  1. Download the PD patch trigSeq64_Launchpad.pd (or look in the trowaSoft plugin directory, in the folder "pd" and find the patch).
  2. Open the patch in PurrData.
  3. [PurrData] Change the IP Address (if needed). If you are running it on the same computer as VCV Rack, it will be 127.0.0.1 and you do not have to change anything. Otherwise this is the IP address of the computer that is running VCV Rack.
  4. [PurrData] Change the PD Output Port (if needed). This will be the trowaSoft sequencer's INPUT port (PD will output to the sequencer, the sequencer will read this in).
  5. [PurrData] Change the PD Input Port (if needed). This will be the trowaSoft sequencer's OUTPUT port (the sequencer will output over this port, PD will read this in).

VCV Rack (trigSeq64)

  1. Add a trigSeq64 to your Rack patch.
  2. Follow the Starting OSC instructions. The IP Address will be the IP Address of the computer running PurrData. If you are running PurrData on the same computer, you can leave it as 127.0.0.1.
  3. [Rack] Change the Output Port (if needed). This will be the PD INPUT port.
  4. [Rack] Change the Input Port (if needed). This will be the PD OUTPUT port.

Launchpad Mappings

Button Symbol Function Notes
learn (^) N/A – Not yet mapped
view (v) N/A – Not yet mapped
page left (<) Reset
page right (>) Play/Pause
inst (session) Jump to step Hold down (session) and press a Pad to move the playhead to that step.
fx (user 1) Set Play Length Hold down (user 1) and press a Pad to set the Play Length.
user (user 2) Set Play Pattern Hold down (user 2) and press a Pad to select the Pattern to play.
mixer (mixer) Set Edit Pattern / Edit Channel (9-16) Hold down (mixer) and press a Pad to select the Edit Pattern. Hold down (mixer) and press a RHS button to set the Edit Channel (9-16).
RHS buttons (8) (|>) Set Edit Channel Set Edit Channel to 1-8. Hold down (mixer) button at the same time for 9-16.
Pad buttons [ ] Step / Length / Pattern By default, turns on/off step for current Edit Channel. With a function key, will set the Playhead, Play Length, or Edit Pattern.

Sequencer Output OSC Messages

The following messages will be sent from the sequencer. In general, messages will only be sent when the state of that object/value changes.

NOTE: In general, numbering of items is 0-based. For example step starts at 0 for the first step and goes from 0 to 63 for a trigSeq64.

Function Status Address Parameters Event Trigger Notes
Send Play State (Playing/Paused) Done /tsseq/play/state int playing Play state changed. 0:Pause, 1:On
Send Internal step clock tick or External clock pulse Done /tsseq/clock int step Clock tick / step increment (from internal clock or external clock). New step # sent (0-15 or 0-63)
Sequencer RESET button click Done /tsseq/reset “bang” Reset button clicked or signal received.
Send Current Playing Pattern Done /tsseq/play/pat int pattern Playing pattern # changed. Pattern 0-63
Send Current BPM Done /tsseq/bpm float bpm, int divisorId Tempo changed divisorId: 0:1/4, 1:1/8, 2:1/8T, 3:1/16. The sequencer will send the BPM value (not the tempo value) for display purposes in BPM.
Send BPM Divisor Done /tsseq/bpmnote int divisorId BPM display changed divisorId: 0:1/4, 1:1/8, 1:1/8T, 2:1/16
Send Step Value Done /tsseq/step int step, float value, int pattern, int channel Step value changed Value: trigSeq sends 0 or 1; voltSeq sends -10 to +10.
Send Current Length Done /tsseq/play/len int stepLength Step length (play length) changed. Length is 1 to numSteps (numSteps has a maximum of 16 for trigSeq and voltSeq; maximum of 64 for trigSeq64).
Send Current Output Mode (TRIG, RTRIG, GATE) or (VOLT, NOTE, PATT) Done /tsseq/play/omode int modeId Output mode changed trigSeq: (0:TRIG, 1:RTRG, 2:GATE;) or voltSeq: (0:VOLT, 1:NOTE, 2:PATT).
Send Current Edit Pattern Done /tsseq/edit/pat int pattern Current Pattern being edited has changed. Pattern 0-63
Send Current Edit Channel Done /tsseq/edit/ch int channel Current Channel being edited has changed. Channel 0-15
Send Mode (Edit, Performance) /tsseq/mode int mode Current Performance Mode changed. 0: Edit, 1: Performance. Currently the Sequencer GUIs have no way to set this, it is only settable via OSC.

Sequencer Input OSC Messages

The sequencer will respond to the following messages.

NOTE: In general, numbering of items is 0-based. For example step starts at 0 for the first step and goes from 0 to 63 for a trigSeq64.

TODO: Copy & Paste functions.

Function Status Address Parameters Event Trigger Notes
Set Play State Done /tsseq/play/state/set int value Set the Play/Running state. 0:Pause, 1:On
Toggle Play/Pause Done /tsseq/play/state/tog -NONE- Toggle the Play/Running state. Toggle the playing state on or off
Reset Done /tsseq/reset/set -NONE- Reset the sequencer (same as hitting the Reset button or getting a Reset signal). Reset the sequencer to index 0.
Change Playing Pattern Done /tsseq/play/pat/set int pattern Set the currently playing Pattern. Pattern 0-63
Set BPM Done /tsseq/play/bpm/set float tempo Set the current tempo (0-1). Send 0 to 1
Set BPM Note Done /tsseq/play/bpmnote/set int divisorId Set the current BPM display. divisorId: 0:1/4, 1:1/8, 1:1/8T, 2:1/16
Add to the BPM Note Index (selection) Done /tsseq/play/bpmnote/add int addIx Increment or decrement in the BPM display note list. Jump this many in the BPM Note list (i.e. +1 to go to the next, -1 to go to the previous)
Change Step Length Done /tsseq/play/len/set int step Set the playing step length. Set the length (1 to numSteps)
Set Ouput Mode (TRIG, RTRIG, GATE) or (VOLT, NOTE, PATT) Done /tsseq/play/omode/set int modeId Set the Output Mode trigSeq: (0:TRIG, 1:RTRG, 2:GATE;) or voltSeq: (0:VOLT, 1:NOTE, 2:PATT).
Change Edit Pattern Done /tsseq/edit/pat/set int pattern Set the currently editing Pattern. Pattern 0-63
Change Edit Channel Done /tsseq/edit/ch/set int channel Set the currently editing Channel. Channel 0-15
Set the Step Value Done /tsseq/edit/step/set int step, float value, (opt) int pattern, (opt) int channel Set the value for the step. step starts at 0 (i.e. 0-15 or 0-63) and the value is the value to set it to. trigSeq only accepts 0 or 1. voltSeq accepts -10 to +10. The pattern and channel may also be supplied otherwise they will apply to the pattern & channel currently being edited (shown) on the sequencer.
Toggle Edit Step Done /tsseq/edit/step/tog int step, (opt) float value, (opt) int pattern, (opt) int channel Toggle the value for the step. Toggle the current value at the given step. For trigSeq, toggles on/off. For voltSeq, may multiply value by -1.
Jump to Step Number (playing) Done /tsseq/play/step/set int step Jump the play head to this step number. step starts at 0 (i.e. 0-15 or 0-63). NOTE: The currently playing step is allowed to finish, but the next tick plays this step.
Set Mode (Edit, Performance) Done /tsseq/mode/set int mode Set the Performance mode. 0: Edit, 1: Performance. Currently the Sequencer GUIs have no way to set this, it is only settable via OSC.
Toggle Mode (Edit, Performance) Done – Needs to send reload /tsseq/mode/tog -NONE- Toggle the Performance mode.
Clone this wiki locally