Trigger Button for Audio PC to Sync via OSC

A manual trigger button can be used for trigger several instances of components that can be accessed through the audio PC as long as those components can support OSC messages.

Setting up signal reception

The trigger button is a physical object that you can press manually to start in sync several components. It is shown below.

Trigger buttonThis is used for Delsys and QTM interactions. In this case, it will be connected with the Delsys system and an Arduino platform that allows to send the trigger to the audio PC so that it can spread that signal to other instances that require to start at the same time when the button is pressed. You can check information about the Delsys trigger module in the Delsys to QTM document. The difference in this application is the connection with the Arduino device as the image below suggests. An important consideration is that, for now, even if the Delsys system is not used in your experiment, it must be connected to the trigger button so that the Arduino device works, otherwise the signal is not detected. It will be fixed in the future to avoid this dependency.

Delsys, trigger, and Arduino

The Arduino platform is connected through a SDI cable that is composed of two small cables in one end to connect directly into the Arduino device as shown in the picture below.

SDI cable and Arduino

The green cable goes to GND and the red one to the A0 input as depicted in the next figure. The USB cable is connected to the audio PC.

Arduino connection

In the audio PC the signal from the Arduino is taken from a python script that can be found in "Desktop\TEMPLATES" called 'timestamps.py' or downloaded from here. To execute this script in the audio PC, we will use the Python Anaconda terminal that is already installed. Press the Windows button and write 'anaconda' to find this command prompt as shown below.

Anaconda terminalOnce the command is open we can execute and test whether the trigger signals are being received or not. You need to go to the path where the timestamps.py lies and execute via 'pyhton timestamps.py' as it is illustrated in the image below. If the Arduino is detected you will see the message 'Found arduino' then if you press the trigger button you will see an 'OK - #' message where # is a counter that increases every time the button is pressed, also it will show the time in seconds between every press action.

anaconda terminal with script execution

Receiving the trigger signal via OSC

Once we ensure that that signal is being received in the Python script, we can catch it locally on any software that supports OSC messages. The component that receives the message must connect to port 1111 (unless you change this parameter in the timestamps.py script) and the sent message is t/record  Usually it is used on patches in MAX/Msp or for starting a recording in Reaper. 

Trigger on Max/Msp

For any patch you are using and need to trigger an action with the button, you can add the small fragment of objects shown in the image below.

Max Trigger Button

It basically takes the OSC message and, as you can see, it receives the message  t/record from the outlet in the [udpreceive 1111] object, which can be used as a bang signal to perform some activation or text if your application requires it, also it can be redirected to Reaper if you want to use both platforms.

Trigger on Reaper

In the audio PC, Reaper is already configured to receive the signal from the trigger button through OSC messages. Ensure that this configuration is still there or if you are using a fresh installation of the software you can set the right parameters as it is shown below. Go to Options->Preferences->Control/OSC/Web, you should be able to see "OSC:Delsys" as one of the OSC profiles, otherwise you can create it. When you press 'Edit' you can see the parameters for that profile, which must have 1111 as the 'Local listen port'.

Reaper configuration for trigger button

Once it is set, you can use the trigger button to start or stop a recording since the message t/record allows that. Moreover, you can use a template or assemble your own session and just start to use the trigger button to synchronize the recording.

 

Published Aug. 19, 2022 11:52 AM - Last modified Sep. 1, 2022 10:11 AM