How to Control CasterSoundboard with Python 3
Steps to send a one-way message
- Install python-osc from the command-line (requires python3):
-
Open up CasterSoundboard
-
Create a new tab called test *
-
Add a sound to the 1 key *
-
Open the OSC settings dialog by pressing the
button**
-
Click Start
-
Close the conformation window
-
Open a Python 3 interpreter by invoking one from the command line:
- Import
pythonosc and initialise the client:
- Play the clip we added:
* You don't need to follow these steps exactly, you'll just have to adapt some of the later steps if you pick your own names/keys.
** It doesn't really matter when you do this step, as long as you do it before trying to talk OSC to CasterSoundboard!
Example script using two-way communication
This script is from a gist, the raw text can be downloaded here.
For this to work, you'll need to set the Outbound Traffic client IP address to 127.0.0.1 in the OSC settings dialog in CasterSoundboard.
Save the script as a Python file like csb_osc_comms.py then run it with python3 csb_osc_comms.py.
When running, it will print any OSC message sent by CasterSoundoard as well as send a start/stop command to an associated player when you press a key on your keyboard. Send a . to quit the program.
Further information
You should now be up and running! Check out the following pages for more information: