Skip to content

BryanEnneking/bash-osc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Bash OSC

Bash OSC is an Open Sound Control client implemented as a Bash script. It sends OSC messages via UDP. The goal is to provide a simple, portable, and performant utility that is not necessarily full-featured (e.g. bundles are not supported). Care has been taken to minimize dependencies and external calls for both portability as well as performance reasons. Bash OSC is open-source and free to use, modify, and distribute according to the BSD 3-Clause License.

Usage

Bash OSC can be used either as a sourced library or as a stand-alone command-line utility. Either way, you will need to set the variables OSC_IP and OSC_PORT before using Bash OSC:

export OSC_IP=169.254.246.252
export OSC_PORT=10023

From the Command-Line

Be sure to set the IP and port as mentioned above. Also, make sure the script is executable.

Usage: osc address type_tags argument_1 [argument_2...]

address The OSC address string (e.g. /path/method)
type_tags   Character(s) indicating the types of argument in order
  • 's' for string
  • 'i' for integer
  • 'f' for float
argument Argument(s) corresponding to the types defined by type_tags
Note: float arguments must be specified in hexidecimal

Examples

Sends an OSC message with a single string to set the name of channel 29

osc /ch/29/config/name s "Bass Amp"

Sends an OSC message with a single float to set the DCA 4 fader level

osc /dca/4/fader f 3f400000

Sends an OSC message with two strings, an integer, and a float argument

osc /channel/75/config ssif "Cello 5" ON 13 00000000

As a Library

source path/to/osc

OSC_IP=169.254.246.252
OSC_PORT=10023

send_osc_message /ch/01/mix/on s OFF

About

Basic implementation of an Open Sound Control protocol client in Bash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages