StageCaller OSC Monitor and Cueing Patch

Updated 10/2/15 – Has MIDI trigger to broadcast status; Now accepts OSC commands, e.g. from QLab 3, to configure settings for ease and reliability.

I recently found this great app, StageCaller, to make your iPhone or Android ring when triggered by MIDI or OSC commands. It also has a heartbeat function for monitoring.

I made a monitor to listen for the heartbeat using Max 6.1.9. I added a simple cue start/stop firing option and an arm/disarm option. I also added to ability to receive via the heartbeat OSC string the time interval for the heartbeat, a name for the device (so you know you’re listening to the correct phone) and the last octet of the phone’s IP address. The first 3 of the IP are derived from the computer on which the monitor’s running (assuming you are on a subnet with 24-bit mask, i.e. – probably safe in many cases…). It can be run on Max Runtime

There’s also an option to hide the cue firing functions so it’s just a monitor.

StageCaller Heartbeat Monitor

This patch requires the external object, OSC-route from Berkeley University, which I’ve included, but please see the link for the most recent version, documentation and lots of other great objects.


Configuring heartbeat string in StageCaller:
OSC:/heartbeat is the default, which will work, but the monitor needs to know the time interval to expect.
OSC:/heartbeat/INTERVAL/PHONE_NAME/LAST_IP_OCTET can be used to pass the time interval, arbitrary device name, and last octet of phone’s IP address (assumes the first 3 are the same as the monitoring computer, i.e. a subnet mask of
Example: OSC Message: /heartbeat/10/Andrew/102

If you have multiple devices with the augmented heartbeat string configured, you can simply change the heartbeat monitoring port number (in the purple box) and the monitor will be configured to listen and send basic messages after receiving a heartbeat.

MIDI Trigger

This sends the specified MIDI note with either velocity 100 or 0 depending on the status of the connection. Example: note 20, velocity 100 is sent every time the heartbeat is received. Note 20, velocity 0 (noteoff) is sent every time the heartbeat is missed.

This can be used to enable/disable alternate cues for the phone ring/vibrate, e.g. if the heartbeat is missed, the StageCaller ring cue can be disarmed, while the audio clip of the ring or vibrate is armed making the fail-over seamless.

The MIDI trigger can be enabled or disabled with the check box.

Firing Cues

Use the “fire cue number” selector to set a cue number. Click the green or red buttons beneath to start or stop a cue of the chosen number (stop cues have to be explicitly activated in the StageCaller Action setup). This can be used to test the connection, or to fire the cues in the event you have don’t have QLab or don’t have version 3 yet.

“Arm/Disarm” uses the StageCaller default OSC message number 99 start and stop to arm and disarm StageCaller.

The bottom, lefthand, yellow box displays the computer’s IP address (allows you to choose the correct network interface if needed) and based on that constructs the first 3 octets of the StageCaller device’s IP address. If the checkbox is ticked, the 4th will be updated automatically by a heartbeat string that includes the device’s 4th IP octet.

An error counter is provided to help troubleshoot connection problems.

Configuration via OSC

The monitor’s parameters can be configured via OSC messages sent on the same port as the heartbeat listening port, i.e. if you are monitoring the phone’s heartbeat on port 3333, then setup an OSC destination in QLab 3, localhost:3333 (or other IP if external). QLab 3 can send these by using the ‘Custom OSC Message’ message type.

OSC commands

              /setip nnn.nnn.nnn.nnn
              /setport nnnn
              /autoupdate yes|no|true|false
              /send yes|no|true|false
              /note nn
              /devicename {midi device name} (no quotes, spaces allowed)
              /port nnnn
              /interval nn

/phoneip is for the IP and port of the phone being monitored. This can be configured in the heartbeat string as mentioned above, but it can also be done here in case a change is needed, e.g. different allowance for error in heartbeat timing, or a 16-bit subnet where the last two octets of the IP address may be different from the computer’s.

/miditrigger configures the MIDI trigger feature (on/off), MIDI note and the MIDI port to use. The MIDI port is specified in the OSC message with spaces – do not use quotes. Example for specifying “from Max Runtime 2”:

/SCM/miditrigger/devicename from Max Runtime 2

/heartconfig configures the heartbeat port to listen on and the time interval to expect the next heartbeat. This can already to be done in the heartbeat string on the phone, but if a last-minute swap happened or if it’s more convenient, the option is here as well.

OSC message examples:

/SCM/phoneip/setport 3421
/SCM/phoneip/autoupdate no
/SCM/phoneip/autoupdate true

/SCM/miditrigger/send false
/SCM/miditrigger/send yes
/SCM/miditrigger/note 45
/SCM/miditrigger/devicename from Max Runtime 2
/SCM/miditrigger/devicename IAC Driver Bus 1

/SCM/heartconfig/port 3334 (have to direct at current port, and then use this new port for subsequent calls. Can be used to load multiple instances of the monitor and configure them for different ports.)
/SCM/heartconfig/interval 12

Download Monitor patch here:

Next to consider: A monitor for multiple phones in a single production. Would be nice to make a clean simple status light and MIDI trigger for each and maybe one firing section, but with multiple phones, one’d probably be using QLab for firing.

I’ve requested that StageCaller add an option to optionally automatically include these things in the heartbeat string to reduce configuration mistakes. I’d also like to see the Arm/Disarm status to be sent via OSC in the event of a change or with the heartbeat. I would think it would be relatively easy since the heartbeat function is already there.

I am sharing this patch in accordance with the GNU General Public License