Get MA2 Speed Master BPM value
In some cases, it might be useful to get the BPM value of a Speed Master from an MA2 desk. One common use-case is to use the MA2 Speed Master as the global master for the remaining systems.
While there is no dedicated way to retrieve a BPM value from a Speed Master, you can retrieve the running "cue" name of an executor, which, for a Speed Master, is essentially the current BPM value.
Here's an example ShowCockpit LUA script:
1
-- Get 'GrandMA2' element
2
GrandMA2 = GetElement('GrandMA2')
3
4
-- Returns the name of the current cue
5
-- (in fact for speedmasters it shows the BPM value)
6
-- For example: "60.0 BPM"
7
v = GrandMA2.GetExecutorCurrentCue(1)
8
9
-- Remove the " BPM" part of the name
10
v = string.gsub(v, " BPM", "")
11
12
-- Convert to Number
13
v = tonumber(v)
14
15
-- Variable v contains the speedmaster BPM value as a number
16
print(v)
Copied!
Because the GetExecutorCurrentCue function returns a string containing the units (for example, "60.0 BPM"), we need to remove that text part and then convert the string to a number.
Last modified 7mo ago
Copy link