watch_var doesn't work from a Multi Script

Motorist
Motorist Member Posts: 1 Newcomer

The watch_var command does nothing when embedded in a Multi Script. Creator Tools enumerates all instrument scripts in a multi-rack, but the Multi Script is never enumerated since it is not in an instrument.

These variables from my Multi Script remain unavailable to evaluate from Creator Tools:

on init

declare $xpose_keys1 := 0

declare $xpose_keys2 := 0

watch_var($xpose_keys1)

watch_var($xpose_keys2)

make_persistent($xpose_keys1)

make_persistent($xpose_keys2)

  set_script_title("malletKAT")

end on

on midi_in

if ($MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 22 and $MIDI_BYTE_2 = 126)

$xpose_keys1 := 1

else

if ($MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 22 and $MIDI_BYTE_2 = 0)

$xpose_keys1 := 0

end if

end if


if ($MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 21 and $MIDI_BYTE_2 = 126)

$xpose_keys2 := 1

else

if ($MIDI_COMMAND = $MIDI_COMMAND_CC and $MIDI_BYTE_1 = 21 and $MIDI_BYTE_2 = 0)

$xpose_keys2 := 0

end if

end if

Back To Top