-- make MIDI Program Change cue in Group
set ProgNum to text returned of (display dialog "Enter Program Change num" default answer "" with title "Generate MIDI PC cue")
-- see https://qlab.app/docs/v5/scripting/applescript-dictionary-v5/#midi-cue
set MIDIchannel to 16 -- the channell the receiving MIDI device is listening on
set MIDIpatchNum to 2 -- the Qlab MIDI patch setting
tell application id "com.figure53.QLab.5" to tell front workspace
make type "Group"
set groupCue to last item of (selected as list)
make type "MIDI"
set midiCue to last item of (selected as list)
-- MIDI cue parameters
set midi patch number of midiCue to MIDIpatchNum
set channel of midiCue to 1
-- MIDI types can be Voice (note, CC, Prog Change etc), MSC (MIDI Show Control) or SysEx (System Exclusive)
set message type of midiCue to voice
-- MIDI command can be note on/off, control_change, program_change,
set command of midiCue to program_change
set byte one of midiCue to ProgNum
-- set the cue number to something relevant
set q number of midiCue to "MPC" & ProgNum
-- move the MIDI cue into the Group cue
move cue id (uniqueID of midiCue) of parent of midiCue to end of groupCue
set q name of groupCue to "MIDI Program Change " & ProgNum
end tell
--
Contact support anytime: sup...@figure53.com
User Group Code of Conduct: https://qlab.app/code-of-conduct/
Instagram: https://www.instagram.com/Figure53
Bluesky: https://bsky.app/profile/qlab.app
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qlab/3225b2c0-ed61-4cdd-9175-09872adb172dn%40googlegroups.com.