Open Sound Control: Difference between revisions
imported>Taktik No edit summary |
imported>Achenar No edit summary |
||
Line 1: | Line 1: | ||
= Open Sound Control (OSC) = | = Open Sound Control (OSC) = | ||
Open Sound Control was | Open Sound Control was created as a successor to the MIDI control protocol. It enables communication between computer software, sound synthesizers and other multimedia devices that support OSC. | ||
Its advantages over MIDI include: an open-ended and dynamic URL-style symbolic naming scheme, symbolic and high-resolution numeric argument data, pattern matching language to specify multiple recipients of a single message, high resolution time tags and "bundles" of messages whose effects must occur simultaneously. | Its advantages over MIDI include: an open-ended and dynamic URL-style symbolic naming scheme, symbolic and high-resolution numeric argument data, pattern matching language to specify multiple recipients of a single message, high resolution time tags and "bundles" of messages whose effects must occur simultaneously. The protocol is also not bound by specific hardware (i.e. MIDI cables and ports) and can be transferred across any network connection, even remotely via the internet. | ||
This makes OSC much more powerful than MIDI, but due to its open-ended specification, both the OSC client ''(which sends OSC data)'' and the OSC server ''(which receives data, i.e. Renoise)'' must be separately configured, unlike MIDI which is essentially "Plug & Play". | |||
For more general information about OSC have a look at the [http://en.wikipedia.org/wiki/Open_Sound_Control OSC Wikipedia page] and the [http://opensoundcontrol.org/ official OSC homepage]. | For more general information about OSC have a look at the [http://en.wikipedia.org/wiki/Open_Sound_Control OSC Wikipedia page] and the [http://opensoundcontrol.org/ official OSC homepage]. | ||
Line 14: | Line 12: | ||
== Setup == | == Setup == | ||
Renoise can use OSC in one of two ways: | |||
# fully configurable and | # Using Renoise as an OSC server ''(OSC receiver)'' via a preconfigured OSC message set. | ||
# Using the fully configurable and customisable Renoise scripting API. This allows you to send and receive any form of OSC message and define your own communication protocol, but obviously requires programming knowledge. See the [http://scripting.renoise.com|Renoise Scripting API pages] for more information. | |||
To setup Renoise as OSC server, open the OSC options panel by choosing ''"Edit -> Preferences -> OSC"'' from the main menu: | To setup Renoise as an OSC server, open the OSC options panel by choosing ''"Edit -> Preferences -> OSC"'' from the main menu: | ||
[[Image:Vvoois_renoise_preferences_osc.png]] | [[Image:Vvoois_renoise_preferences_osc.png]] | ||
Line 32: | Line 30: | ||
* '''Explanation Panel:''' When clicking on a command in the Command List, an explanation of what the command does is displayed here. | * '''Explanation Panel:''' When clicking on a command in the Command List, an explanation of what the command does is displayed here. | ||
=== | === The Default OSC Implementation of Renoise === | ||
* /evaluate(string) | * '''/evaluate(string)''' | ||
Evaluate a custom Lua expression ''(e.g. renoise.song().transport.bpm = 234)''. | |||
* /song/bpm(number) | * '''/song/bpm(number)''' | ||
Set the song's [[Transport_Panel|current BPM]] [32 - 999]. | |||
* /song/edit/mode(boolean) | * '''/song/edit/mode(boolean)''' | ||
Set the song's global [[Recording_and_Editing_Notes#Edit_Mode|Edit Mode]] on or off. | |||
* /song/edit/octave(number) | * '''/song/edit/octave(number)''' | ||
Set the song's [[Transport_Panel|current octave]] [0 - 8]. | |||
* /song/edit/pattern_follow(boolean) | * '''/song/edit/pattern_follow(boolean)''' | ||
Enable or disable the global Pattern Follow mode. | |||
* /song/edit/step(number) | * '''/song/edit/step(number)''' | ||
Set the songs current edit_step [0 - 8] | |||
* /song/lpb(number) | * '''/song/lpb(number)''' | ||
Set the songs current Lines Per Beat [1 - 255] | |||
* /song/record/chord_mode(boolean) | * '''/song/record/chord_mode(boolean)''' | ||
Enable or disable the global chord mode | |||
* /song/record/quantization_step(number) | * '''/song/record/quantization_step(number)''' | ||
Set the global record quantization step [1 - 32] | |||
* /song/record/quantization(boolean) | * '''/song/record/quantization(boolean)''' | ||
Enable or disable the global record quantization | |||
* /song/sequence/schedule_add(number) | * '''/song/sequence/schedule_add(number)''' | ||
Add a scheduled sequence playback pos | |||
* /song/sequence/schedule_set(number) | * '''/song/sequence/schedule_set(number)''' | ||
Replace the current schedule playback pos | |||
* /song/sequence/slot_mute(number, number) | * '''/song/sequence/slot_mute(number, number)''' | ||
Mute the given track, sequence slot in the matrix | |||
* /song/sequence/slot_unmute(number, number) | * '''/song/sequence/slot_unmute(number, number)''' | ||
Unmute the given track, sequence slot in the matrix | |||
* /song/sequence/trigger(number) | * '''/song/sequence/trigger(number)''' | ||
Set playback pos to the specified sequence pos | |||
* /song/tpl(number) | * '''/song/tpl(number)''' | ||
Set the songs current Ticks Per Line [1 - 16] | |||
* /song/track/XXX/device/XXX/bypass(boolean) | * '''/song/track/XXX/device/XXX/bypass(boolean)''' | ||
Set bypass status of an device [true or false].<br /> | |||
XXX is the device index, -1 the currently selected device | ''(XXX is the device index, -1 chooses the currently selected device)'' | ||
* /song/track/XXX/device/XXX/set_parameter_by_index(number, number) | * '''/song/track/XXX/device/XXX/set_parameter_by_index(number, number)''' | ||
Set parameter value of an device [0 - 1].<br /> | |||
XXX is the device index, -1 the currently selected device | ''(XXX is the device index, -1 chooses the currently selected device)'' | ||
* /song/track/XXX/device/XXX/set_parameter_by_name(string, number) | * ''/song/track/XXX/device/XXX/set_parameter_by_name(string, number)''' | ||
Set parameter value of an device [0 - 1] | |||
XXX is the device index, -1 the currently selected device | XXX is the device index, -1 the currently selected device | ||
* /song/track/XXX/mute | * '''/song/track/XXX/mute''' | ||
Mute track XXX | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/output_delay(number) | * '''/song/track/XXX/output_delay(number)''' | ||
Set track XXX's delay in ms [-100 - 100] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/postfx_panning(number) | * '''/song/track/XXX/postfx_panning(number)''' | ||
Set track XXX's post FX panning [-50 - 50] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/postfx_volume_db(number) | * '''/song/track/XXX/postfx_volume_db(number)''' | ||
Set track XXX's post FX volume in dB [-200 - 3] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/postfx_volume(number) | * '''/song/track/XXX/postfx_volume(number)''' | ||
Set track XXX's post FX volume [0 - db2lin(3)] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/prefx_panning(number) | * '''/song/track/XXX/prefx_panning(number)''' | ||
Set track XXX's pre FX panning [-50 - 50] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/prefx_volume_db(number) | * '''/song/track/XXX/prefx_volume_db(number)''' | ||
Set track XXX's pre FX volume in dB [-200 - 3] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/prefx_volume(number) | * '''/song/track/XXX/prefx_volume(number)''' | ||
Set track XXX's pre FX volume [0 - db2lin(3)] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/prefx_width(number) | * '''/song/track/XXX/prefx_width(number)''' | ||
Set track XXX's pre FX width [0, 1] | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/solo | * '''/song/track/XXX/solo''' | ||
Solo track XXX | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /song/track/XXX/unmute | * '''/song/track/XXX/unmute''' | ||
Unmute track XXX | |||
XXX is the track index, -1 the currently selected track | XXX is the track index, -1 the currently selected track | ||
* /transport/continue | * '''/transport/continue''' | ||
Continue playback | |||
* /transport/loop/block_move_backwards | * '''/transport/loop/block_move_backwards''' | ||
Move loop block one segment backwards | |||
* /transport/loop/block_move_forwards | * '''/transport/loop/block_move_forwards''' | ||
Move loop block one segment forwards | |||
* /transport/loop/block(boolean) | * '''/transport/loop/block(boolean)''' | ||
Enable or disable pattern block looping | |||
* /transport/loop/pattern(boolean) | * '''/transport/loop/pattern(boolean)''' | ||
Enable or disable looping the current pattern | |||
The thread 'Win32 Thread' (0x1120) has exited with code 0 (0x0). | The thread 'Win32 Thread' (0x1120) has exited with code 0 (0x0). | ||
* /transport/loop/sequence(number, number) | * '''/transport/loop/sequence(number, number)''' | ||
Disable or set a new sequence loop range | |||
* /transport/panic | * '''/transport/panic''' | ||
Stop playback and reset all playing instruments and DSPs | |||
* /transport/start | * '''/transport/start''' | ||
Start playback or restart playing the current pattern | |||
* /transport/stop | * '''/transport/stop''' | ||
Stop playback | |||
* /trigger/midi(number) | * '''/trigger/midi(number)''' | ||
Trigger a raw MIDI event. arg#1: the MIDI event as number | |||
* /trigger/note_off(number, number, number) | * '''/trigger/note_off(number, number, number)''' | ||
Trigger a Note-Off. arg#1: instrument (-1 for the currently selected one), arg#2: track (again -1 for the selected one). arg#3: note value (0-119). | |||
* /trigger/note_on(number, number, number, number) | * '''/trigger/note_on(number, number, number, number)''' | ||
Trigger a Note-On. arg#1: instrument (-1 for the currently selected one), arg#2: track (again -1 for the selected one). arg#3: note value (0-119), arg#4: velocity (0-127) | |||
Revision as of 16:35, 9 November 2010
Open Sound Control (OSC)
Open Sound Control was created as a successor to the MIDI control protocol. It enables communication between computer software, sound synthesizers and other multimedia devices that support OSC.
Its advantages over MIDI include: an open-ended and dynamic URL-style symbolic naming scheme, symbolic and high-resolution numeric argument data, pattern matching language to specify multiple recipients of a single message, high resolution time tags and "bundles" of messages whose effects must occur simultaneously. The protocol is also not bound by specific hardware (i.e. MIDI cables and ports) and can be transferred across any network connection, even remotely via the internet.
This makes OSC much more powerful than MIDI, but due to its open-ended specification, both the OSC client (which sends OSC data) and the OSC server (which receives data, i.e. Renoise) must be separately configured, unlike MIDI which is essentially "Plug & Play".
For more general information about OSC have a look at the OSC Wikipedia page and the official OSC homepage.
Setup
Renoise can use OSC in one of two ways:
- Using Renoise as an OSC server (OSC receiver) via a preconfigured OSC message set.
- Using the fully configurable and customisable Renoise scripting API. This allows you to send and receive any form of OSC message and define your own communication protocol, but obviously requires programming knowledge. See the Scripting API pages for more information.
To setup Renoise as an OSC server, open the OSC options panel by choosing "Edit -> Preferences -> OSC" from the main menu:
File:Vvoois renoise preferences osc.png
- Enable Server: This starts the Renoise OSC server and the network port is changed to a listening state, so you may get a firewall warning the first time this is enabled.
- Incoming Messages: This panel simply displays messages relevant to the networking process.
- Protocol: Select the protocol which the Renoise server will use:
- Udp: Provides a high transfer rate with lower reliability than Tcp.
- Tcp: Provides a lower transfer rate than Udp with higher reliability.
- Port: Select the Port number for messages to be transferred over. Generally, a number greater than 1024 is used.
- Command List: Lists the various commands that it is possible to use to communicate with Renoise.
- Explanation Panel: When clicking on a command in the Command List, an explanation of what the command does is displayed here.
The Default OSC Implementation of Renoise
- /evaluate(string)
Evaluate a custom Lua expression (e.g. renoise.song().transport.bpm = 234).
- /song/bpm(number)
Set the song's current BPM [32 - 999].
- /song/edit/mode(boolean)
Set the song's global Edit Mode on or off.
- /song/edit/octave(number)
Set the song's current octave [0 - 8].
- /song/edit/pattern_follow(boolean)
Enable or disable the global Pattern Follow mode.
- /song/edit/step(number)
Set the songs current edit_step [0 - 8]
- /song/lpb(number)
Set the songs current Lines Per Beat [1 - 255]
- /song/record/chord_mode(boolean)
Enable or disable the global chord mode
- /song/record/quantization_step(number)
Set the global record quantization step [1 - 32]
- /song/record/quantization(boolean)
Enable or disable the global record quantization
- /song/sequence/schedule_add(number)
Add a scheduled sequence playback pos
- /song/sequence/schedule_set(number)
Replace the current schedule playback pos
- /song/sequence/slot_mute(number, number)
Mute the given track, sequence slot in the matrix
- /song/sequence/slot_unmute(number, number)
Unmute the given track, sequence slot in the matrix
- /song/sequence/trigger(number)
Set playback pos to the specified sequence pos
- /song/tpl(number)
Set the songs current Ticks Per Line [1 - 16]
- /song/track/XXX/device/XXX/bypass(boolean)
Set bypass status of an device [true or false].
(XXX is the device index, -1 chooses the currently selected device)
- /song/track/XXX/device/XXX/set_parameter_by_index(number, number)
Set parameter value of an device [0 - 1].
(XXX is the device index, -1 chooses the currently selected device)
- /song/track/XXX/device/XXX/set_parameter_by_name(string, number)'
Set parameter value of an device [0 - 1] XXX is the device index, -1 the currently selected device
- /song/track/XXX/mute
Mute track XXX XXX is the track index, -1 the currently selected track
- /song/track/XXX/output_delay(number)
Set track XXX's delay in ms [-100 - 100] XXX is the track index, -1 the currently selected track
- /song/track/XXX/postfx_panning(number)
Set track XXX's post FX panning [-50 - 50] XXX is the track index, -1 the currently selected track
- /song/track/XXX/postfx_volume_db(number)
Set track XXX's post FX volume in dB [-200 - 3] XXX is the track index, -1 the currently selected track
- /song/track/XXX/postfx_volume(number)
Set track XXX's post FX volume [0 - db2lin(3)] XXX is the track index, -1 the currently selected track
- /song/track/XXX/prefx_panning(number)
Set track XXX's pre FX panning [-50 - 50] XXX is the track index, -1 the currently selected track
- /song/track/XXX/prefx_volume_db(number)
Set track XXX's pre FX volume in dB [-200 - 3] XXX is the track index, -1 the currently selected track
- /song/track/XXX/prefx_volume(number)
Set track XXX's pre FX volume [0 - db2lin(3)] XXX is the track index, -1 the currently selected track
- /song/track/XXX/prefx_width(number)
Set track XXX's pre FX width [0, 1] XXX is the track index, -1 the currently selected track
- /song/track/XXX/solo
Solo track XXX XXX is the track index, -1 the currently selected track
- /song/track/XXX/unmute
Unmute track XXX XXX is the track index, -1 the currently selected track
- /transport/continue
Continue playback
- /transport/loop/block_move_backwards
Move loop block one segment backwards
- /transport/loop/block_move_forwards
Move loop block one segment forwards
- /transport/loop/block(boolean)
Enable or disable pattern block looping
- /transport/loop/pattern(boolean)
Enable or disable looping the current pattern The thread 'Win32 Thread' (0x1120) has exited with code 0 (0x0).
- /transport/loop/sequence(number, number)
Disable or set a new sequence loop range
- /transport/panic
Stop playback and reset all playing instruments and DSPs
- /transport/start
Start playback or restart playing the current pattern
- /transport/stop
Stop playback
- /trigger/midi(number)
Trigger a raw MIDI event. arg#1: the MIDI event as number
- /trigger/note_off(number, number, number)
Trigger a Note-Off. arg#1: instrument (-1 for the currently selected one), arg#2: track (again -1 for the selected one). arg#3: note value (0-119).
- /trigger/note_on(number, number, number, number)
Trigger a Note-On. arg#1: instrument (-1 for the currently selected one), arg#2: track (again -1 for the selected one). arg#3: note value (0-119), arg#4: velocity (0-127)
Please note that also the default OSC implementation can be extended by editing the file "GlobalOscActions.lua" in the "Scripts" folder that can be found next to the Renoise executable. On OSX this is in the app bundle.
Examples
TouchOSC via Duplex
The Duplex Tool comes with a Device preset for TouchOSC, an iPhone / iPod Touch / iPad app, that allows those devices to control Renoise via OSC. To use it, select "TouchOSC" from the "Device" pulldown menu in the Duplex Browser and adjust the configuration as needed within the "Settings" dialog box. Then, using the TouchOSC app on the Apple device, you can change the values of the various knobs and sliders on the screen to control various features of Renoise.
Duplex uses Renoises Scripting API to communicate with touch OSC, so its fully configurable, and can also be used as en example on how to wrap up your own OSC implementation in Renoise.
Pure Data
PD (aka Pure Data) is a real-time graphical programming environment for audio, video, and graphical processing. Pd was created to explore ideas of how to further refine the Max paradigm with the core ideas of allowing data to be treated in a more open-ended way and opening it up to applications outside of audio and MIDI, such as graphics and video. There are different versions available to download for PC, Mac and Linux.
Using PD With Renoise Via OSC
- First install PD, then download, unzip and open the "test-renoise-osc.pd" file within PD.
- In the top left corner you can set the port number to match the OSC port number you have chosen for Renoise [connect localhost XXXX]. With Edit Mode (Ctrl + E) you can edit the numbers.
- To the right, you can start and stop playing Renoise with the [send / renoise / transport / start] and [send / renoise / transport / stop] buttons.
- The test program comes with a set of commands already loaded in. Make sure a sample is loaded into into slot 00 within Renoise and press the "chord-test" button in PD. You should hear a chord being played. You can also click on the individual commands to hear the individual notes.
- If you would like to enter new OSC messages yourself:
- Select from the menu "Put -> Message", place the box on the screen and enter your desired command (check the Command List in OSC Setup for available commands).
- Connect the new message box by hovering over the bottom left corner (the cursor will become a circle) then clicking and dragging over to the "sendOSC" box.
- Cancel edit mode with (Ctrl + E) and click the box to send the message to Renoise via OSC.