#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #InstallMouseHook #SingleInstance force ; Replaces script (Reloads). #Persistent ; to make it run indefinitely #IfWinActive ahk_exe S:\MuseScore 3.6.2 portable\MuseScorePortable\App\MuseScore\bin\MuseScore3.exe ; Enables Hotkeys when MuseScore3 Window is Active #Include Coordinates.ahk ; All coordinates are managed in this external file ; The Include directive causes the script to behave as though ; the specified file's contents are present at this exact position ; Replace the path S:\etc. with your location of MuseScore3.exe ; ============================== MIXER MACROS - INITIALISATION ==================================== OnlyOneStaffMode := 1 ; default value is 'off' - three staves - (after switching in Control + F10) MxrMode := "StripSelectMode" MxrModeOld := "StripSelectMode" StripElement := 1 ControlElement := "StripSlider" ControlElementOld := "StripSlider" MaxStripAmount := 22 ; (*change*?) ShowStrip := 10 ; (*change*) '10' number of visible strips - default StripSelect := 10 ; (*change*) '10' selects the last strip - default StripSelectOld := 10 MxrHeightDiff := MidiHeight - StripsOnlyHeight ; for readibility ScrollHeightStripsOnly_Y := ScrollHeightMidi_Y - MxrHeightDiff ; for readibility ClickStrip_X := MidFirstStrip_X + (StripSelect - 1) * StripWidth ; for readibility. Notice that 'StripSelect := 10 must precede this line ; ============================== MIXER COORDINATES ================================================ ; for explanations see the documentation Extra__Mixer_and_Play_Panel.pdf Mixer_Off_X := 250 ; in Z + U only - Master - initialisation Mixer - IMXR Mixer_Off_Y := 10 ; in Z + U only - idem ; ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png ; put the png in your Working Directory the search surface coordinates are: Sound_X1 := 8 ; this image is only present in the Details Area of the mixer Sound_Y1 := 143 ; enables piano and organ detection by finding the height of the image which will be stored in 'Instr_Status' Sound_X2 := 57 ; use the hotkey Z + 6 to establish Normal height, Piano height and Organ height Sound_Y2 := 178 ; the there found values are assigned to the next three variables Instr_Status_Normal := 143 ; Y-coordinate of upper-left corner of MXR_Sound.png in 1 staff instr. Instr_Status_Piano := 151 ; idem at 2 staves resp. 3 stavesinstrument Instr_Status_Organ := 159 ; these values are found by the utility Z + 6 ; NB: Mixer_X is superfluous because it is derived from Mixer_Width Mixer_Y := 160 ; position on the screen MidiMixer_Y := 160 ; must be the same as default Mixer_Y StripsOnlyMixer_Y := 427 ; with these numbers the strips occupy the same surface in both views (the height difference is MxrHeightDiff) Mixer_Width := 924 ; width Mixer - master gain + 10 strips Mixer_Height := 774 ; coordinates of upper left corner MidiHeight := 774 ; set separately so that the value of Mixer_Height can change ; to accomodate Piano and Organ expansion in MIDI View StripsOnlyHeight := 507 ; in macro initialisation is set: MxrHeightDiff := MidiHeight - StripsOnlyHeight for readibility MxrExpandCollapse_X := 60 ; MxrExpand_Y := 80 ; MxrCollapse_Y := 291 ; in instrument status normal. in piano 1 x MuteVoiceOff_Y, in organ 2 x MuteVoiceOff_Y is added PlayPartOnly_X := 23 PlayPartOnly_Y := 49 PartName_X := 195 PartName_Y := 80 MxrSoundSel_X := 194 ; rectangle select sound in combination with MxrSoundSelOff_Y := 7 ; Y-offset relative to upper-left corner of MXR_Sound.png Drumset_4_X := 198 ; the same coordinates also for Track color Drumset_5_X := 220 Drumset_6_22_X := 290 Drumset_Y := 113 TrackColor_Y := 268 ; in instrument status normal Reverb_Chorus_4_X := 396 Reverb_Y := 140 Chorus_Y := 170 MidiMuteVoice_1_4_X := 242 MidiMuteVoice_5_X := 265 MidiMuteVoice_6_22_X := 334 MidiMuteVoice_Y := 252 MuteVoiceDist_X := 31 ; distance between centre of rectangles: Mvoice 1↔2↔3↔4 MuteVoiceOff_Y := 33 ; Mvoice 5,6,7,8 lower than Mvoice 1,2,3,4 ; idem Mvoice 9,10,11,12 lower than Mvoice 5,6,7,8 MidiPort_4_X := 278 MidiPort_5_X := 300 MidiPort_6_22_X := 370 MidiChannel_4_X := 376 MidiChannel_5_X := 436 MidiChannel_6_22_X := 510 MidiPortChannel_Y := 110 MasterGainAndStripOne_X := 204 ; mixer width if only one strip is visible in StripOnlyView MidFirstStrip_X := 145 ; if only one strip is visible in StripsOnlyView (thus e.g. X-coord of fader) StripWidth := 80 ; in F10 + = also in set strips F10 + 1,2,3 etc, and in F10 + F9 MidiViewShow_Hide_Ch_Y := 322 Show_Hide_Off_X := 21 ; offset of arrow (expand/collapse) sub tracks relative to middle of strip MidiViewSolo_Y := 350 MidiViewMute_Y := 382 MidiViewPan_Y := 440 MidiViewSlider_Y := 688 ; slider point just above strip name field below Ctrl_Element_Diff_Y := 211 ; for arrow/solo/mute/pan: height difference between MidiView ; and StripOnlyView in instrument status Normal (if only one row of Mute Voices) MasterGain_X := 53 ; Y-coordinate derived from MidiViewShow_Hide_Ch_Y LeftScrollTriangle_X := 110 ; scrolling strip pages and scrolling to first/last strip of all strips ScrollHeightMidi_Y := 749 ; ♣=================================== MIXER UTILITY ============================================== ; ^!r::reload ; outcommented - Control + Alt + R - useful for editing this file ~z & 6:: ; find mixer status: normal, piano, organ CoordMode, Pixel, Window ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png If (ErrorLevel = 0) ; found MsgBox, 4160, Instrument Status, The Y-coordinate of`nthe Instrument Status is %Instr_Status%. If (ErrorLevel = 1) ; only too long Sliders visible MsgBox, 4160, Search 'Track Color', This image is in`nthe Details Area`nof the Mixer.`n`nImage not found. Return ; ♣===================================== MIXER INFO =============================================== ; F10 key liberated. The mixer toggle is replaced by the combination F10 + F11 ; NB: when after start MuseScore the Mixer is docked in the Inspector' and includes the MIDI part ; the Inspector is made too wide. See in Z + U utilities -> IMXR initialise mixer ; the toggle function of F10 + F1 needs an ImageSearch instead of the '#MaxThreadsPerHotkey 2' toggle method ; sometimes the Mixer windows has the height of MIDI + strips but shows only the strips ; then MXR_Sound.png is not present and the Mixer is switched to MIDI + strips ; when MIDI is present the Mixer window shows at least three or four strips ; even when the width is set for 1,2 or 3 ; a tooltip reminds you which strips are active ; timed MsgBoxes inform you when you have selected a strip which is outside the selected view ; MIDI View: Mixer_Height := 712 STRIPS Only View: Mixer_Height := 501 ~f10 & h:: ; info mixer MsgBox, 4096, Mixer F10 + H, ( Mixer status 1 ↔ 3 staves Control + F10 Show ↔ hide mixer F10 + F11 View MIDI ↔ strips only F10 + X Set # strips F10 + F9 → amount 1,2,3 ↔ 10,11,12 ↔ 20,21,22 1,2,3 ↔ 0,Q,W ↔ P,A,S Set one strip less F10 + , (<) Set one strip more F10 + . (>) Select strip F10 + 1,2,3 ↔ 0,Q,W ↔ P,A,S Strip cycle up F10 + Insert F10 + Up Strip cycle down F10 + Delete F10 + Down Select same element in left strip F10 + ; F10 + Left Select same element in right strip F10 + ' F10 + Right MIDI Select sound F10 + F1 MIDI Reverb # F10 + F2 MIDI Chorus # F10 + F3 Show/hide part tracks F10 + F4 Solo F10 + F5 Mute F10 + F6 Pan # F10 + F7 Slider # F10 + F8 Master gain # F10 + F12 # Decrease value F10 + - Down # Increase value F10 + = Up MIDI Drumset F10 + / MIDI Channel # F10 + L MIDI Partname F10 + N MIDI Port # F10 + B MIDI Play Part Only F10 + V MIDI Track color F10 + C MIDI Mute Voice F10 + M → Normal Staff 1 ↔ 4 Piano Staff extra 5 ↔ 8 Organ Staff extra 9 ↔ = or F1 ↔ F12 Scroll one strip left F10 + [ Scroll one strip right F10 + ] Scroll strip page left F10 + PgUp Scroll strip page right F10 + PgDn Scroll to left edge F10 + Home Scroll to right edge F10 + End Focus on mixer F10 + - F10 + = Click screen centre ; + . Focus on Canvas # M + S # Independent Hotkey! Show play panel master slider F11 + F12 Show play paneltempo percentage F11 + F10 Start-stop-continue play F11 + Pause Rewind F11 + Home Set start position play loop F11 + [ Set end position play loop F11 + ] Toggle 'loop playback' F11 + L ) Return ; ♣==================================== SHOW/HIDE MIXER =========================================== ; after launching MuseScore: the first time pressing F10 + F11 will display the mixer ; in default 10 channel view as per Coordinates.ahk ; setting: MXR Status 'Three Staves', Sliders, MIDI View, strip 10 selected ; thereafter the mixer will be displayed in the view set by F10 + X ~f10 & f11:: ; display mixer - toggle CoordMode, ToolTip, Window ToolTip, , , , 10 ; close Tooltip (10) If WinActive("Mixer") { WinClose, Mixer Sleep, 200 Goto, StopMixer ; close tooltip mixer status one/three staves } else Send !v Send {down 3} Sleep, 50 Send {down 3} Send {Enter} Sleep, 200 if WinExist("Mixer") { WinActivate, Mixer Sleep, 100 } If !WinActive("Mixer") { MsgBox, 4112, Display Mixer, The mixer could not be displayed!`nPossible cause:`nOne or more items in the View menu are not present.`nFor instance the Master Palette is greyed out.`nRestore the situation in which all items are black. Return } Mixer_X := (A_ScreenWidth - Mixer_Width) / 2 ; middle of mixer is middle of screen If WinActive("Mixer") { ToolTip, , , , 10 If (Mixer_Height = MidiHeight) Mixer_Y := MidiMixer_Y If (Mixer_Height = StripsOnlyHeight) Mixer_Y := StripsOnlyMixer_Y WinMove, Mixer, , Mixer_X, Mixer_Y, Mixer_Width, Mixer_Height ; x/y position, width, height of play panel Sleep, 300 If (Mixer_Height = MidiHeight) ; this is the default after launching MuseScore { ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png If (ErrorLevel = 0) ; found { ; MsgBox, 4160, Instrumentstatus, The Instrument Status is %Instr_Status%. If (Instr_Status = "Instr_Status_Normal") { ; instr has 1 staff MxrCollapse_Y := MxrCollapse_Y MxrSoundSel_Y := Instr_Status_Normal + MxrSoundSelOff_Y ; needed for immediate selection of sound } If (Instr_Status = "Instr_Status_Normal") && (OnlyOneStaffMode = 1) Goto, SkipOrganPiano1 If (Instr_Status = "Instr_Status_Piano") { ; instr has 2 staves MxrCollapse_Y := MxrCollapse_Y + MuteVoiceOff_Y MxrSoundSel_Y := Instr_Status_Piano + MxrSoundSelOff_Y } If (Instr_Status = "Instr_Status_Organ") { ; instr has 3 staves MxrCollapse_Y := MxrCollapse_Y + 2 * MuteVoiceOff_Y MxrSoundSel_Y := Instr_Status_Organ + MxrSoundSelOff_Y } SkipOrganPiano1: } If (ErrorLevel = 1) ; only too long Sliders visible { ; Click, %MxrExpandCollapse_X%, %MxrExpandStripsOnly_Y% ; expand mixer to include MIDI Click, %MxrExpandCollapse_X%, %MxrExpand_Y% ; expand mixer to include MIDI Sleep, 100 } Strip_Y := MidiViewSlider_Y ; Slider CoordMode, ToolTip, Window If (ShowStrip = 1) ToolTip, Only strip 1 is active!, 127, 0, 10 ; (*change*?) '127' If (ShowStrip = 2) ToolTip, Only strips 1 and 2 are active!, 112, 0, 10 ; (*change*?) '112' If (ShowStrip = 3) ToolTip, Only strips 1`, 2 and 3 are active!, 108, 0, 10 ; (*change*?) '108' } If (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewSlider_Y - MxrHeightDiff ; Slider } If (Mixer_Width > MasterGainAndStripOne_X + (StripSelect - 2) * StripWidth) ClickStrip_X := MidFirstStrip_X + (StripSelect - 1) * StripWidth Click, %ClickStrip_X%, %Strip_Y% StripSelectOld := StripSelect Goto, StartMixer ; set 1 or max 3 staves ; ♣================================ CONTROL INSTRUMENTSTATUS ====================================== ; OnlyOneStaffMode: after launching MuseScore default is 3 staves: OnlyOneStaffMode := 1 is switched to :=0 ; tooltips appear on position of F11 macro group 'Wheel Input' ~^F10:: ; toggle instrumentstatus only one staff Keywait, f10, d StartMixer: ; continuation from F10 + F11 If WinActive("Mixer") { CoordMode, ToolTip, Screen If (OnlyOneStaffMode = 0) { ToolTip, , , , 16 OnlyOneStaffMode := 1 ; ToolTip, MXR Status: One Staff, ToolT_F11_X, 0, 16 ; activate this line if you have implemented the AHK kit ToolTip, MXR Status: One Staff, 1354, 0, 16 ; (*change*?) '1354' Return } If (OnlyOneStaffMode = 1) ; default after reload master { ToolTip, , , , 16 OnlyOneStaffMode := 0 ; ToolTip, MXR Status: Three Staves, ToolT_F11_X, 0, 16 ; activate this line if you have implemented the AHK kit ToolTip, MXR Status: Three Staves, 1354, 0, 16 ; (*change*?) '1354' Return } } StopMixer: ; continuation from F10 + F11 If !WinActive("Mixer") { ToolTip, , , , 16 ; close tooltip (16) Return } Return ; ♣=========================== SET MIXER WIDTH and STRIPS ================================== ~f10 & f9:: ; set #strips - mixer width NumberStrips := "undetermined" Goto, StartSettingStrip ~f10 & ,:: ; , is < key - make mixer one strip smaller NumberStrips := "Decrease_OneStrip" Goto, StartSettingStrip ~f10 & .:: ; . is > key - make mixer one strip bigger NumberStrips := "Increase_OneStrip" Goto, StartSettingStrip StartSettingStrip: If !WinExist("Mixer") { MsgBox, 4144, Set Mixer Width, Mixer not present!`nPress F10 + F11 to display the mixer. Return } If !WinActive("Mixer") WinActivate, Mixer If (NumberStrips = "undetermined") Goto, EnterInputSetStrips If (NumberStrips = "Decrease_OneStrip") && (ShowStrip >= 1) ShowStrip := --ShowStrip If (NumberStrips = "Decrease_OneStrip") && (ShowStrip = 0) { MsgBox, 4144, Decrease Mixer Width, Mixer has minimum width!, 0.6 ShowStrip := 1 Return } If (NumberStrips = "Increase_OneStrip") && (ShowStrip <= MaxStripAmount) ShowStrip := ++ShowStrip If (NumberStrips = "Increase_OneStrip") && (ShowStrip > MaxStripAmount) { ShowStrip := MaxStripAmount MsgBox, 4144, Increase Mixer Width, Mixer has maximum width!, 0.6 Return } Goto, SetMixer EnterInputSetStrips: CoordMode, Mouse, Window Input, SetStrip, L1, {Escape}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}, 1,2,3,4,5,6,7,8,9,0,z,q,w,e,r,t,y,u,i,o,p,a,s,d,f,g If (ErrorLevel = "Max") { MsgBox, 4144, Mixer Control, No valid command!, 0.6 ; timed MsgBox 600 ms Return } If (ErrorLevel = "EndKey:Escape") Return If (SetStrip = "z") Return If (SetStrip = 1) ShowStrip := 1 ; set width to 1 strip If (SetStrip = 2) ShowStrip := 2 ; set width to 2 strips If (SetStrip = 3) ShowStrip := 3 ; set width to 3 strips If (SetStrip = 4) ShowStrip := 4 ; set width to 4 strips If (SetStrip = 5) ShowStrip := 5 ; set width to 5 strips If (SetStrip = 6) ShowStrip := 6 ; set width to 6 strips If (SetStrip = 7) ShowStrip := 7 ; set width to 7 strips If (SetStrip = 8) ShowStrip := 8 ; set width to 8 strips If (SetStrip = 9) ShowStrip := 9 ; set width to 9 strips If (SetStrip = 0) ShowStrip := 10 ; set width to 10 strips If (SetStrip = "q") ShowStrip := 11 ; set width to 11 strips If (SetStrip = "w") ShowStrip := 12 ; set width to 12 strips If (SetStrip = "e") ShowStrip := 13 ; set width to 13 strips If (SetStrip = "r") ShowStrip := 14 ; set width to 14 strips If (SetStrip = "t") ShowStrip := 15 ; set width to 15 strips If (SetStrip = "y") ShowStrip := 16 ; set width to 16 strips If (SetStrip = "u") ShowStrip := 17 ; set width to 17 strips If (SetStrip = "i") ShowStrip := 18 ; set width to 18 strips If (SetStrip = "o") ShowStrip := 19 ; set width to 19 strips If (SetStrip = "p") ShowStrip := 20 ; set width to 20 strips If (SetStrip = "a") ShowStrip := 21 ; set width to 21 strips If (SetStrip = "s") ShowStrip := 22 ; set width to 22 strips ; If (SetStrip = "d") ; ShowStrip := 23 ; set width to 23 strips ; If (SetStrip = "f") ; ShowStrip := 24 ; set width to 24 strips ; If (SetStrip = "g") ; ShowStrip := 25 ; set width to 25 strips If (ShowStrip > MaxStripAmount) { MsgBox, 4144, Set Mixer Width, The chosen width of %ShowStrip% strips`nexceeds the maximum allowed`nwidth of %MaxStripAmount% strips! Return } SetMixer: CoordMode, ToolTip, Window ; MsgBox, 4160, Test Mixer Width, ShowStrip is %ShowStrip%., 0.6 ; for testing If (Showstrip = 1) || (Showstrip = 2) || (Showstrip = 3) && (Mixer_Height = MidiHeight) Mixer_Width := MasterGainAndStripOne_X + 3 * StripWidth If (Showstrip > 3) && (Mixer_Height = MidiHeight) Mixer_Width := MasterGainAndStripOne_X + (ShowStrip - 1) * StripWidth If (Mixer_Height = StripsOnlyHeight) Mixer_Width := MasterGainAndStripOne_X + (ShowStrip - 1) * StripWidth Mixer_X := (A_ScreenWidth - Mixer_Width) / 2 WinMove, Mixer, , Mixer_X, Mixer_Y, Mixer_Width, Mixer_Height ; x/y position, width, height of play panel Sleep, 100 If (Mixer_Height = MidiHeight) && (ShowStrip = 1) ToolTip, Only strip 1 is active!, 127, 0, 10 ; (*change*?) '127' If (Mixer_Height = MidiHeight) && (ShowStrip = 2) ToolTip, Only strips 1 and 2 are active!, 112, 0, 10 ; (*change*?) '112' If (Mixer_Height = MidiHeight) && (ShowStrip = 3) ToolTip, Only strips 1`, 2 and 3 are active!, 108, 0, 10 ; (*change*?) '108' If (ShowStrip > 3) or (Mixer_Height = StripsOnlyHeight) ; at least four strips ToolTip, , , , 10 ; close Tooltip (10) StripSelect := Showstrip ; select last strip (and keep mode) If (Mixer_Height = MidiHeight) Strip_Y := MidiViewSlider_Y ; but click strip slider If (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewSlider_Y - MxrHeightDiff ; but click strip slider ClickStrip_X := MidFirstStrip_X + (StripSelect - 1) * StripWidth Click, %ClickStrip_X%, %Strip_Y% Return ; end of F10 + F9 Set Width ; ♣======== MIXER CONTROL ============== HOTKEYS SECTION ========================================== ~f10 & Del:: ~f10 & Down:: ; cycle down to activate control in same strip StripElement := --StripElement If (StripElement = 0) StripElement := 5 Goto, SkipSetStripHigher ~f10 & Ins:: ~f10 & Up:: ; cycle up to activate control in same strip StripElement := ++StripElement If (StripElement = 6) StripElement := 1 SkipSetStripHigher: If (StripElement = 1) ControlElement := "StripSlider" If (StripElement = 2) ControlElement := "Pan" If (StripElement = 3) ControlElement := "Mute" If (StripElement = 4) ControlElement := "Solo" If (StripElement = 5) ControlElement := "TrackChannel" Goto, MixerSelect ~f10 & f12:: ; select master gain ControlElement := "MasterGain" Goto, MixerSelect ~f10 & f1:: ; select sound ControlElement := "SoundSelect" Goto, MixerSelect ~f10 & f2:: ; select reverb ControlElement := "Reverb" Goto, MixerSelect ~f10 & /:: ; select drumset ControlElement := "Drumset" Goto, MixerSelect ~f10 & c:: ; set track color ControlElement := "TrackColor" Goto, MixerSelect ~f10 & f4:: ; select show/hide sub channels ControlElement := "TrackChannel" Goto, MixerSelect ~f10 & f5:: ; select solo ControlElement := "Solo" Goto, MixerSelect ~f10 & f6:: ; select mute ControlElement := "Mute" Goto, MixerSelect ~f10 & f7:: ; select pan dial ControlElement := "Pan" Goto, MixerSelect ~f10 & f8:: ; select volume slider ControlElement := "StripSlider" Goto, MixerSelect ~f10 & v:: ; toggle play part only - https://musescore.org/en/node/314507 ControlElement := "PlayPartOnly" ; unselect if in part (only part is visible) Goto, MixerSelect ; after unselect the score will play ~f10 & m:: ; select mute voice ControlElement := "MuteVoice" Goto, MixerSelect ~f10 & l:: ; select midi channel ControlElement := "MidiChannel" Goto, MixerSelect ~f10 & b:: ; select midi port ControlElement := "MidiPort" Goto, MixerSelect ~f10 & f3:: ; select chorus ControlElement := "Chorus" Goto, MixerSelect ~f10 & n:: ; select part name ControlElement := "PartName" Goto, MixerSelect ~f10 & ':: ~f10 & Right:: ; select strip right neighbor If (StripSelect <= MaxStripAmount) ; dependent on setting in auto-execute section StripSelect := ++StripSelect If (StripSelect > ShowStrip) { MsgBox, 4144, Select Next Strip, Last strip already selected!, 0.6 StripSelect := --StripSelect ; Return } Goto, MixerStripSelect ~f10 & `;:: ~f10 & Left:: ; select strip left neighbor If (StripSelect >= 1) StripSelect := --StripSelect If (StripSelect = 0) { MsgBox, 4144, Select Previous Strip, First strip already selected!, 0.6 StripSelect := 1 ; Return } Goto, MixerStripSelect ~f10 & 1:: ; select strip 1 StripSelect := 1 Goto, MixerStripSelect ~f10 & 2:: ; select strip 2 StripSelect := 2 Goto, MixerStripSelect ~f10 & 3:: ; select strip 3 StripSelect := 3 Goto, MixerStripSelect ~f10 & 4:: ; select strip 4 StripSelect := 4 Goto, MixerStripSelect ~f10 & 5:: ; select strip 5 StripSelect := 5 Goto, MixerStripSelect ~f10 & 6:: ; select strip 6 StripSelect := 6 Goto, MixerStripSelect ~f10 & 7:: ; select strip 7 StripSelect := 7 Goto, MixerStripSelect ~f10 & 8:: ; select strip 8 StripSelect := 8 Goto, MixerStripSelect ~f10 & 9:: ; select strip 9 StripSelect := 9 Goto, MixerStripSelect ~f10 & 0:: ; select strip 10 StripSelect := 10 Goto, MixerStripSelect f10 & q:: ; select strip 11 StripSelect := 11 Goto, MixerStripSelect f10 & w:: ; select strip 12 StripSelect := 12 Goto, MixerStripSelect f10 & e:: ; select strip 13 StripSelect := 13 Goto, MixerStripSelect f10 & r:: ; select strip 14 StripSelect := 14 Goto, MixerStripSelect f10 & t:: ; select strip 15 StripSelect := 15 Goto, MixerStripSelect f10 & y:: ; select strip 16 StripSelect := 16 Goto, MixerStripSelect f10 & u:: ; select strip 17 StripSelect := 17 Goto, MixerStripSelect f10 & i:: ; select strip 18 StripSelect := 18 Goto, MixerStripSelect f10 & o:: ; select strip 19 StripSelect := 19 Goto, MixerStripSelect f10 & p:: ; select strip 20 StripSelect := 20 Goto, MixerStripSelect f10 & a:: ; select strip 21 StripSelect := 21 Goto, MixerStripSelect f10 & s:: ; select strip 22 StripSelect := 22 Goto, MixerStripSelect ; f10 & d:: ; select strip 23, outcommented, doesn't fit on test screen ; StripSelect := 23 ; Goto, MixerStripSelect ; f10 & f:: ; select strip 24, outcommented, doesn't fit on test screen ; StripSelect := 24 ; Goto, MixerStripSelect ; f10 & g:: ; select strip 25, outcommented, doesn't fit on test screen ; StripSelect := 25 ; Goto, MixerStripSelect ; f10 & h:: ; reserved for infoscreen! MixerStripSelect: MxrMode := "StripSelectMode" If (StripSelect > MaxStripAmount) { MsgBox, 4144, Select Strip, The selected strip # %StripSelect% exceeds`nthe maximum allowed width`nof %MaxStripAmount% strips! Return } Goto, SkipCtrlElementMode MixerSelect: MxrMode := "CtrlElementMode" SkipCtrlElementMode: ; MsgBox, MxrMode is %MxrMode%. If !WinExist("Mixer") { MsgBox, 4144, Display Mixer, Mixer not present!`nPress F10 + F11 to display the mixer. Return } If !WinActive("Mixer") WinActivate, Mixer CoordMode, Mouse, Window CoordMode, ToolTip, Window If (StripSelect > ShowStrip) { MsgBox, 4144, Select Strip, The selected strip # %StripSelect% is`n outside the current view., 0.6 ; timed MsgBox 600 ms Return } ; =========== MIXER CONTROL ============= SELECT A NEW STRIP ====================================== ; switch van ->,S,M,P,Vol naar MIDI Ctrl El. If (OnlyOneStaffMode = 1) Goto, SkipOrganPiano2 If (ControlElementOld = "StripSlider") || (ControlElement = "StripSlider") ; staffStatus already known Goto, SkipSwitchToMidiElement ; selecting the slider selects the strip If (Mixer_Height = MidiHeight) { If ControlElementOld in Solo,Mute,Pan,TrackChannel { If ControlElement in Solo,Mute,Pan,TrackChannel { If !(StripSelectOld = StripSelect) { ; MsgBox, Previous Control Element is %ControlElementOld%.`nCurrent Control Element is %ControlElement%.`n.Select strip first. ClickStrip_X := MidFirstStrip_X + (StripSelect - 1) * StripWidth Strip_Y := MidiViewSlider_Y Click, %ClickStrip_X%, %Strip_Y% Sleep, 250 ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png } } } } SkipOrganPiano2: SkipSwitchToMidiElement: ; ========= MIXER CONTROL ============ CONTROL ELEMENTS SECTION =================================== ; ==========================================DETAILS AREA ========================================== If (ControlElement = "PartName") && (Mixer_Height = MidiHeight) { ToolTip, Enter the name. Press Escape when ready., Mixer_Width /2, 0, 11 Click, %PartName_X%, %PartName_Y% ; part name Send ^a ; select name KeyWait, Esc, d ControlElement := "StripSlider" ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "PartName") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Change Part Name, This command`nworks only`nin MIDI View! Return } If (ControlElement = "PlayPartOnly") && (Mixer_Height = MidiHeight) { Click, %PlayPartOnly_X%, %PlayPartOnly_Y% ; play part only ControlElement := "StripSlider" } If (ControlElement = "PlayPartOnly") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Play Part Only, This command`nworks only`nin MIDI View! Return } If (ControlElement = "Drumset") && (Mixer_Height = MidiHeight) { If ShowStrip in 1,2,3,4 DrumSet_X := Drumset_4_X If ShowStrip in 5 DrumSet_X := Drumset_5_X If (ShowStrip > 5) DrumSet_X := Drumset_6_22_X + (ShowStrip - 6) * (StripWidth / 2) Click, %DrumSet_X%, %DrumSet_Y% ControlElement := "StripSlider" } If (ControlElement = "Drumset") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Drumset, This command`nworks only`nin MIDI View! Return } If (ControlElement = "TrackColor") && (Mixer_Height = MidiHeight) { ToolTip, Choose Color. Press Z when ready., Mixer_Width /2, 0, 11 If ShowStrip in 1,2,3,4 DrumSet_X := Drumset_4_X ; X-coordinate the same as X-DrumSet If ShowStrip in 5 DrumSet_X := Drumset_5_X If (ShowStrip > 5) DrumSet_X := Drumset_6_22_X + (ShowStrip - 6) * (StripWidth / 2) If (Instr_Status = Instr_Status_Normal) Y_TrackColor_Y := TrackColor_Y If (OnlyOneStaffMode = 1) Goto, SkipOrganPiano3 If (Instr_Status = Instr_Status_Piano) Y_TrackColor_Y := TrackColor_Y + MuteVoiceOff_Y If (Instr_Status = Instr_Status_Organ) Y_TrackColor_Y := TrackColor_Y + 2 * MuteVoiceOff_Y SkipOrganPiano3: Click, %DrumSet_X%, %Y_TrackColor_Y% KeyWait, z, d Send {Enter} ControlElement := "StripSlider" ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "TrackColor") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Track Color, This command`nworks only`nin MIDI View! Return } If (ControlElement = "SoundSelect") &&(Mixer_Height = MidiHeight) { ToolTip, Select Instrument. Press Escape when ready., Mixer_Width /2, 0, 11 If (Instr_Status = Instr_Status_Normal) MxrSoundSel_Y := Instr_Status_Normal + MxrSoundSelOff_Y If (OnlyOneStaffMode = 1) Goto, SkipOrganPiano4 If (Instr_Status = Instr_Status_Piano) MxrSoundSel_Y := Instr_Status_Piano + MxrSoundSelOff_Y If (Instr_Status = Instr_Status_Organ) MxrSoundSel_Y := Instr_Status_Organ + MxrSoundSelOff_Y SkipOrganPiano4: Click, %MxrSoundSel_X%, %MxrSoundSel_Y% ; choose sound KeyWait, Esc, d Send {Escape} Sleep, 50 ControlElement := "StripSlider" ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "SoundSelect") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Select Sound, This command`nworks only`nin MIDI View! Return } If (ControlElement = "Reverb") && (Mixer_Height = MidiHeight) { If ShowStrip in 1,2,3,4 { ToolTip, Reverb. Enter Value.`nPress Z when ready., Reverb_Chorus_4_X, Reverb_Y - 60, 11 ; (*change*?) '60' MouseMove, Reverb_Chorus_4_X, Reverb_Y } If (ShowStrip > 4) { ToolTip, Reverb. Enter Value.`nPress Z when ready., Reverb_Chorus_4_X + (ShowStrip - 4) * StripWidth, Reverb_Y - 60, 11 ; (*change*?) '60' MouseMove, Reverb_Chorus_4_X + (ShowStrip - 4) * StripWidth, Reverb_Y } Click KeyWait, z, d ControlElement := "StripSlider" ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "Reverb") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Reverb Control, This command`nworks only`nin MIDI View! Return } If (ControlElement = "Chorus") && (Mixer_Height = MidiHeight) { If ShowStrip in 1,2,3,4 { ToolTip, Chorus. Enter Value.`nPress Z when ready., Reverb_Chorus_4_X, Chorus_Y - 60, 11 ; (*change*?) '60' MouseMove, Reverb_Chorus_4_X, Chorus_Y } If (ShowStrip > 4) { ToolTip, Chorus. Enter Value.`nPress Z when ready., Reverb_Chorus_4_X + (ShowStrip - 4) * StripWidth, Chorus_Y - 60, 11 ; (*change*?) '60' MouseMove, Reverb_Chorus_4_X + (ShowStrip - 4) * StripWidth, Chorus_Y } Click KeyWait, z, d ControlElement := "StripSlider" ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "Chorus") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Chorus Control, This command`nworks only`nin MIDI View! Return } If (ControlElement = "MuteVoice") && (Mixer_Height = MidiHeight) { ToolTip, Mute Voice. Enter Voice Number(s). Press Z when ready., Mixer_Width / 2 - 130, 0, 11 ; (*change*?) '130' Loop { If (A_Index = 1) ShowStripOrig := Showstrip Input, MxrMuteVoice, L1, {Escape}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}, z,1,2,3,4,5,6,7,8,9,0,-,= If (ShowStrip != ShowStripOrig) { MsgBox, 4112, Mute Voice, The width was changed!`nSelect a visible strip. Break } If (ErrorLevel = "Max") { MsgBox, 4144, Mixer Control, No valid command!, 0.6 ; timed MsgBox 600 ms Continue } If (ErrorLevel = "EndKey:Escape") || (MxrMuteVoice = "z") Break If (ErrorLevel = "EndKey:F1") MxrMuteVoice := 1 If (ErrorLevel = "EndKey:F2") MxrMuteVoice := 2 If (ErrorLevel = "EndKey:F3") MxrMuteVoice := 3 If (ErrorLevel = "EndKey:F4") MxrMuteVoice := 4 If (ErrorLevel = "EndKey:F5") MxrMuteVoice := 5 If (ErrorLevel = "EndKey:F6") MxrMuteVoice := 6 If (ErrorLevel = "EndKey:F7") MxrMuteVoice := 7 If (ErrorLevel = "EndKey:F8") MxrMuteVoice := 8 If (ErrorLevel = "EndKey:F9") MxrMuteVoice := 9 If (ErrorLevel = "EndKey:F10") MxrMuteVoice := 0 If (ErrorLevel = "EndKey:F11") MxrMuteVoice := "-" If (ErrorLevel = "EndKey:F12") MxrMuteVoice := "=" If (Instr_Status = Instr_Status_Normal) { If MxrMuteVoice in 5,6,7,8 { MsgBox, 4144, Mute Voice, The selected voice can`nonly` exist for instruments`nwith two or three staves. Continue } If MxrMuteVoice in 9,0,-,= { MsgBox, 4144, Mute Voice, The selected voice can`nonly exist for instruments`nwith three staves. Continue } } If (Instr_Status = Instr_Status_Piano) { If (OnlyOneStaffMode = 1) Goto, SkipOrganPiano5 If MxrMuteVoice in 9,0,-,= { MsgBox, 4144, Mute Voice, The selected voice can`nonly exist for instruments`nwith three staves! Continue } SkipOrganPiano5: } If MxrMuteVoice in 1,2,3,4 Y_MidiMuteVoice_Y := MidiMuteVoice_Y If MxrMuteVoice in 5,6,7,8 Y_MidiMuteVoice_Y := MidiMuteVoice_Y + MuteVoiceOff_Y If MxrMuteVoice in 9,0,-,= Y_MidiMuteVoice_Y := MidiMuteVoice_Y + 2 * MuteVoiceOff_Y If MxrMuteVoice in 1,5,9 MVMultiplier := 1 If MxrMuteVoice in 2,6,0 MVMultiplier := 2 If MxrMuteVoice in 3,7,- MVMultiplier := 3 If MxrMuteVoice in 4,8,= MVMultiplier := 4 If ShowStrip in 1,2,3,4 MidiMuteVoice_X := MidiMuteVoice_1_4_X + (MVMultiplier - 1) * MuteVoiceDist_X If ShowStrip in 5 MidiMuteVoice_X := MidiMuteVoice_5_X + (MVMultiplier - 1) * MuteVoiceDist_X If (ShowStrip > 5) MidiMuteVoice_X := MidiMuteVoice_6_22_X + (ShowStrip - 6) * (StripWidth / 2) + (MVMultiplier - 1) * MuteVoiceDist_X Click, %MidiMuteVoice_X%, %Y_MidiMuteVoice_Y% } ControlElement := "StripSlider" ; reset control element ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "MuteVoice") and !(Mixer_Height = MidiHeight) { MsgBox, 4144, Mute Voice, This command`nworks only`nin MIDI View! Return } If (ControlElement = "MidiPort") && (Mixer_Height = MidiHeight) { ToolTip, Set Midi Port. Enter Port Number. Press Z when ready., Mixer_Width / 2 - 130, 0, 11 ; (*change*?) '130' If ShowStrip in 1,2,3,4 Port_X := MidiPort_4_X If ShowStrip in 5 Port_X := MidiPort_5_X If (ShowStrip > 5) Port_X := MidiPort_6_22_X + (ShowStrip - 6) * (1/2 * StripWidth) ; (*change*?) Click, %Port_X%, %MidiPortChannel_Y% Sleep, 100 KeyWait, z, d ControlElement := "StripSlider" ; reset control element ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "MidiPort") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Set Midi Port, This command`nworks only`nin MIDI View! Return } If (ControlElement = "MidiChannel") && (Mixer_Height = MidiHeight) { ToolTip, Set Midi Channel. Enter Channel Number. Press Z when ready., Mixer_Width / 2 - 130, 0, 11 If ShowStrip in 1,2,3,4 Channel_X := MidiChannel_4_X If ShowStrip in 5 Channel_X := MidiChannel_5_X If (ShowStrip > 5) Channel_X := MidiChannel_6_22_X + (ShowStrip - 6) * (3/4 * StripWidth) ; (*change*?) Click, %Channel_X%, %MidiPortChannel_Y% Sleep, 100 KeyWait, z, d ControlElement := "StripSlider" ; reset control element ToolTip, , , , 11 ; close tooltip (11) } If (ControlElement = "MidiChannel") && (Mixer_Height = StripsOnlyHeight) { MsgBox, 4144, Set Midi Channel, This command`nworks only`nin MIDI View! Return } ; ========= MIXER CONTROL ============CONTROL ELEMENTS TRACK AREA ================================= If (ControlElement = "Solo") && (Mixer_Height = MidiHeight) Strip_Y := MidiViewSolo_Y If (ControlElement = "Solo") && (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewSolo_Y - Ctrl_Element_Diff_Y If (ControlElement = "Mute") && (Mixer_Height = MidiHeight) Strip_Y := MidiViewMute_Y If (ControlElement = "Mute") && (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewMute_Y - Ctrl_Element_Diff_Y If (ControlElement = "Pan") && (Mixer_Height = MidiHeight) Strip_Y := MidiViewPan_Y If (ControlElement = "Pan") && (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewPan_Y - Ctrl_Element_Diff_Y If (ControlElement = "TrackChannel") || (ControlElement = "MasterGain") ; only TrackChannel { ; remains selected If (Mixer_Height = MidiHeight) ; after strip switch Strip_Y := MidiViewShow_Hide_Ch_Y If (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewShow_Hide_Ch_Y - Ctrl_Element_Diff_Y } If (Mixer_Width > MasterGainAndStripOne_X + (StripSelect - 2) * StripWidth) ClickStrip_X := MidFirstStrip_X + (StripSelect - 1) * StripWidth SkipSliderSelect: If ControlElement in MasterGain,TrackChannel,Solo,Mute,Pan ; setting Strip_Y offsets { If (OnlyOneStaffMode = 1) Goto, SkipOrganPiano6 ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png If (ErrorLevel = 0) ; found { If (Instr_Status = Instr_Status_Piano) Strip_Y := Strip_Y + MuteVoiceOff_Y If (Instr_Status = Instr_Status_Organ) Strip_Y := Strip_Y + 2 * MuteVoiceOff_Y } SkipOrganPiano6: } If (ControlElement = "MasterGain") { ; ToolTip, Master Gain. Enter Value.`nPress Z when ready., Mixer_Width /2, 0, 11 ToolTip, Master Gain. Enter Value.`nPress Z when ready., MasterGain_X - 40, Strip_Y - 50, 11 ; (*change*?) '40' and/or '50' Click, %MasterGain_X%, %Strip_Y% ; Y-coordinate derived from MidiViewShow_Hide_Ch_Y KeyWait, z, d ControlElement := "StripSlider" ; back to default control element } If (ControlElement = "StripSlider") && (Mixer_Height = MidiHeight) Strip_Y := MidiViewSlider_Y If (ControlElement = "StripSlider") && (Mixer_Height = StripsOnlyHeight) Strip_Y := MidiViewSlider_Y - MxrHeightDiff If (ControlElement = "Solo") || (ControlElement = "Mute") || (ControlElement = "Pan") || (ControlElement = "StripSlider") Click, %ClickStrip_X%, %Strip_Y% If (ControlElement = "TrackChannel") { TrackChannel_X := ClickStrip_X - Show_Hide_Off_X Click, %TrackChannel_X%, %Strip_Y% } If (Mixer_Height = MidiHeight) ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png ToolTip, , , , 11 ; close tooltip (11) as extra MxrModeOld := MxrMode ; strip select or control element ControlElementOld := ControlElement ; which control element StripSelectOld := StripSelect ; which strip Return ; end of mixer control ; ♣==================== MIXER HEIGHT - MIDI VIEW and STRIPS ONLY VIEW ============================= ~f10 & x:: ; and select Slider of previously selected strip If !WinExist("Mixer") { MsgBox, 4144, Toggle Mixer View, Mixer not present!`nPress F10 + F11 to display the mixer. Return } If !WinActive("Mixer") { WinActivate, Mixer Sleep, 100 } If !WinActive("Mixer") { MsgBox, 4144, Toggle Mixer View, Mixer not active!`nPress F10 + =`nor F10 + -`nto activate the mixer. Return } CoordMode, ToolTip, Window CoordMode, Pixel, Window CoordMode, Mouse, Window Mixer_X := (A_ScreenWidth - Mixer_Width) / 2 ; middle of mixer is middle of screen if WinActive("Mixer") { ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png If (ErrorLevel = 0) ; found { ; MsgBox, 4160, Instrumentstatus, The Instrument Status is %Instr_Status%. If (Instr_Status = Instr_Status_Normal) Y_MxrCollapse_Y := MxrCollapse_Y If (Instr_Status = Instr_Status_Piano) Y_MxrCollapse_Y := MxrCollapse_Y + MuteVoiceOff_Y If (Instr_Status = Instr_Status_Organ) Y_MxrCollapse_Y := MxrCollapse_Y + 2 * MuteVoiceOff_Y ToolTip, , , , 10 ; close Tooltip (10) - Only strips (123) active ; MsgBox, 4160, Instrumentstatus, The Instrument Status is %Instr_Status%. Click, %MxrExpandCollapse_X%, %Y_MxrCollapse_Y% ; collapse mixer to strips only; (*change*?) Sleep, 100 Mixer_Height := StripsOnlyHeight Mixer_Y := StripsOnlyMixer_Y ; reset of minimum width of 4 strips in MIDI View when width is for 1,2 or 3 strips If (Showstrip = 1) || (Showstrip = 2) || (Showstrip = 3) Mixer_Width := MasterGainAndStripOne_X + (ShowStrip - 1) * StripWidth Strip_Y := MidiViewSlider_Y - MxrHeightDiff ; always select strip slider WinMove, Mixer, , Mixer_X, Mixer_Y, Mixer_Width, Mixer_Height ; x/y position, width, height of play panel } If (ErrorLevel = 1) { ; MsgBox, Instrument Status not recognized. ; for testing Click, %MxrExpandCollapse_X%, %MxrExpand_Y% ; expand mixer to include MIDI Sleep, 100 Mixer_Height := MidiHeight Mixer_Y := MidiMixer_Y Strip_Y := MidiViewSlider_Y ; always select strip slider If (ShowStrip = 1) || (ShowStrip = 2) || (ShowStrip = 3) ; at least 4 strips in MIDI View Mixer_Width := MasterGainAndStripOne_X + 3 * StripWidth WinMove, Mixer, , Mixer_X, Mixer_Y, Mixer_Width, Mixer_Height ; x/y position, width, height of play panel CoordMode, ToolTip, Window ToolTip, , , , 10 If (ShowStrip = 1) ToolTip, Only strip 1 is active!, 127, 0, 10 ; (*change*?) '127' If (ShowStrip = 2) ToolTip, Only strips 1 and 2 are active!, 112, 0, 10 ; (*change*?) '112' If (ShowStrip = 3) ToolTip, Only strips 1`, 2 and 3 are active!, 108, 0, 10 ; (*change*?) '108' ImageSearch, , Instr_Status, Sound_X1, Sound_Y1, Sound_X2, Sound_Y2, MXR_Sound.png } } If ShowStrip not in 1,2,3 ToolTip, , , , 10 ; close Tooltip (10) If (Mixer_Width > MasterGainAndStripOne_X + (StripSelect - 2) * StripWidth) ClickStrip_X := MidFirstStrip_X + (StripSelect - 1) * StripWidth Click, %ClickStrip_X%, %Strip_Y% Return ; ♣==================================== MIXER SET VALUE =========================================== ~f10 & -:: ; decrease value MxrIncreaseValue := 0 Goto, MxrNumValue ~f10 & =:: ; indecrease value MxrIncreaseValue := 1 MxrNumValue: If !WinExist("Mixer") { MsgBox, 4144, Mixer Control, Mixer not present!`nPress F10 + F11`nto display the mixer. Return } If !WinActive("Mixer") WinActivate, Mixer CoordMode, Mouse, Window MouseGetPos, Start_X, Start_Y If (Start_Y = ScrollHeightMidi_Y) || (Start_Y = ScrollHeightStripsOnly_Y) Goto, ValueChangeNotApplicable ; when scrolling If ControlElement in Pan,StripSlider,Chorus,Reverb,MasterGain,MidiPort,MidiChannel { If (MxrIncreaseValue = 0) Send {down} If (MxrIncreaseValue = 1) Send {up} Return } If ControlElement in TrackChannel,Solo,Mute,SoundSelect,PartName,MuteVoice,PlayPartOnly Goto, ValueChangeNotApplicable ValueChangeNotApplicable: { If (MxrIncreaseValue = 0) MsgBox, 4144, Mixer Control, Decrease value`ndoes not apply`nto this state., 0.6 If (MxrIncreaseValue = 1) MsgBox, 4144, Mixer Control, Increase value`ndoes not apply`nto this state., 0.6 } Return ; ♣==================================== MIXER SCROLL ============================================== ~f10 & [:: ; scroll one strip left MxrMove := "OneStripLeft" Goto, StripShift ~f10 & ]:: ; scroll one strip right MxrMove := "OneStripRight" Goto, StripShift ~f10 & PgUp:: ; scroll to previous strip page MxrMove := "Mxr_PgUp" Goto, StripShift ~f10 & PgDn:: ; scroll to next strip page MxrMove := "Mxr_PgDn" Goto, StripShift ~f10 & Home:: ; scroll to first strip of all strips MxrMove := "Mxr_Left_Edge" Goto, StripShift ~f10 & End:: ; scroll to last strip of all strips MxrMove := "Mxr_Right_Edge" Goto, StripShift StripShift: If !WinExist("Mixer") { MsgBox, 4144, Display Mixer, Mixer not present!`nPress F10 + F11 to display the mixer. Return } If !WinActive("Mixer") WinActivate, Mixer CoordMode, Mouse, Window If (Mixer_Height = MidiHeight) MouseMove, LeftScrollTriangle_X, ScrollHeightMidi_Y If (Mixer_Height = StripsOnlyHeight) MouseMove, LeftScrollTriangle_X, ScrollHeightStripsOnly_Y Sleep, 200 Click, right Sleep, 50 ; scrolling by contextual menu If (MxrMove = "OneStripLeft") || (MxrMove = "OneStripRight") { If (MxrMove = "OneStripLeft") { Send {up 2} ; to 'scroll left' = first click L Send {Enter} Sleep, 100 Send {left} ; 4 units is one strip Sleep, 50 Send {left 2} } If (MxrMove = "OneStripRight") { Send {up} ; to 'scroll right' = first click R Send {Enter} Sleep, 100 Send {right} ; 4 units is one strip Sleep, 50 Send {right 2} } Return } If (MxrMove = "Mxr_PgUp") Send {down 4} If (MxrMove = "Mxr_PgDn") Send {up 3} If (MxrMove = "Mxr_Left_Edge") Send {down 2} If (MxrMove = "Mxr_Right_Edge") Send {down 3} Send {Enter} Return ; ♣================================== INITIALISE MIXER ============================================ /* ; Outcommented section! Enable it by removing /* and */ ; this is an addition to the Master utility Z + U : enter IMXR in InputBox ; copy this section to Master.ahk. Place it after 'Initialise Play Panel' and before 'Reset Width Palettes and Inspector' ; take care to copy it exactly. The final Return is one line higher than the closing brace ; to refer in master.ahk to this utility in the info screen [ + U ; search ~[ & u:: ; under the line Initialise Master Palette IMP ; add the line Initialise Mixer IMXR ; NB: when after launching MuseScore the Mixer is docked in the Inspector' and in MIDI View ; the Inspector is made too wide: in Z + U utilities -> IMXR initialise mixer ; undock from inspector, and move Mixer ; the command also resets the Inspector to the chosen width of the Defined State If util in imxr { CoordMode, Mouse, Screen MouseGetPos, StartX, StartY ImageSearch, X, Y, A_ScreenWidth / 2, IM_31_Y1, A_ScreenWidth, IM_31_Y2, IM_31_Mixer_Inactive_Tab.png ; search ribbon y1=22, y2=46 If (ErrorLevel = 0) ; if inactive tab present { Click, %X%, %Y% Sleep, 200 } ImageSearch, X, Y, A_ScreenWidth / 2, 0, A_ScreenWidth, A_ScreenHeight, IM_30_Mixer.png If (ErrorLevel = 0) { MsgBox, 4096, Search Mixer, Mixer Recognized, 0.8 Goto, MoveMixer } If (ErrorLevel = 1) { MsgBox, 4096, Search Mixer, Mixer Not Recognized, 0.8 Send !v Send {down 6} Send {Enter} Sleep, 300 } ImageSearch, X, Y, A_ScreenWidth / 2, 0, A_ScreenWidth, A_ScreenHeight, IM_30_Mixer.png Sleep, 300 MoveMixer: MouseMove, X + Mixer_Off_X, Y + Mixer_Off_Y Sleep, 100 Click, 2 Sleep, 150 WinActivate, Mixer Sleep, 100 Mixer_X := (A_ScreenWidth - Mixer_Width) / 2 WinMove, Mixer, , Mixer_X, Mixer_Y, Mixer_Width, Mixer_Height ; x/y position, width, height of play panel Sleep, 100 WinActivate, Mixer WinClose, Mixer Sleep, 200 ; now reset width inspector ImageSearch, X, Y, IM_01_2_X1, IM_01_2_Y1, IM_01_2_X2, IM_01_2_Y2, *40 IM_01_2_Inspector_Displaced_Insp.png If (ErrorLevel =1) ; Inspector not present or undocked { MsgBox, 4144, Find Inspector Width, The Inspector is not present or undocked`nor there are unwanted toolbars active. Click, %StartX%, %StartY% Return } If (Errorlevel = 0) { MouseMove, (X-=Insp_Loc_Dist_X), A_ScreenHeight / 2 ; Click, down ; drag enable Sleep, 50 MouseMove, % Def_Insp_Width, % A_ScreenHeight / 2 ; to my defined Inspector width Sleep, 50 Click, U ; drag disable Send {Escape} Sleep, 50 } Click, %StartX%, %StartY% Return ; end of 'If util in imxr' } */ ; ♣======= UPDATED VERSION =========== INITIALISE PLAY PANEL ====================================== /* ; Outcommented section! Enable it by removing /* and */ ; added: ImageSearch IM_32_Play_Panel_Inactive_Tab.png ; and MsgBoxes to facilitate determining the coordinates and extra checks ; If (PP_Y = 24) and If (PP_Y < 40) and PP_Off_Y := 29 instead of PP_Off_Y := 4 in Coordinates.ahk ; when the macro works correctly you can switch the MsgBoxes off ; by outcommenting them - putting a semicolon as first character of their lines ; see the documentation Extra__Mixer_and_Play_Panel.pdf ; NB: after launching MuseScore the PlayPanel usually will be docked in the Inspector ; initialisation play panel means undocking it from the Inspector and moving the panel ; notice that now 'Play Panel' is added to the right-click menu of Timeline ; - Score Comparison Tool - Palettes - Inspector etc. as lowest item in this list. ; the presence of 'Play Panel' in the right-click menu is necessary for the correct functioning of the Toolbar commands. ; position the Play Panel outside the Inspector: use PixelMousing to determine the coordinates. ; take care to copy all lines exactly. The final Return is one line higher than the closing brace If util in ipp { CoordMode, Mouse, Screen MouseGetPos, StartX, StartY ImageSearch, PP_X, PP_Y, IM_19_X1, IM_19_Y1, IM_19_X2, IM_19_Y2, *40 IM_19_Inspector_Play_Panel_Header.png Sleep, 240 If (ErrorLevel = 0) ; { MsgBox, 4160, Play Panel, (1) Play Panel found on Y = %PP_Y%. ; for finding PP_Y in this situation If (PP_Y = 24) ; if found above (without) inspector tab (*change*?) Goto, MovePlayPanel If (PP_Y < 40) ; if found as active black tab title PP_Off_Y := 29 ; found PP_Y = 29 on test screen, 25 more than default 4 (*change*?) Goto, MovePlayPanel ; to prevent clicking tab inspector } If (ErrorLevel = 1) ; possibly play panel is an inactive tab { ImageSearch, PP_X, PP_Y, 1627, 15, 1919, 47, IM_32_Play_Panel_Inactive_Tab.png If (ErrorLevel = 0) { MsgBox, 4160, Play Panel, (2) Play Panel found as inactive tab`non X = %PP_X% and Y = %PP_Y%. ; for testing Click, %PP_X%, %PP_Y% ; activate tab Sleep, 250 PP_Off_Y := 29 ; 25 more than default 4 (*change*?) Goto, MovePlayPanel ; to prevent clicking tab inspector } If (ErrorLevel = 1) ; panel not present { Send !v Send {down 3} Send {Enter} ; play panel active tab in inspector Sleep, 200 ; in the next search Panel can be found as active tab, above (without) inspector tab or somewhere in Inspector ImageSearch, PP_X, PP_Y, IM_19_X1, IM_19_Y1, IM_19_X2, IM_19_Y2, *40 IM_19_Inspector_Play_Panel_Header.png If (ErrorLevel = 0) { MsgBox, 4160, Y-Offset, (3) The Y-Offset is %PP_Off_Y%. ; for testing If (PP_Y = 24) ; if found above (without) inspector tab (*change*?) Goto, MovePlayPanel If (PP_Y < 40) ; if found as active black tab title PP_Off_Y := 29 ; found PP_Y = 27 on test screen (25 more than default 4 (*change*?)) } } } MovePlayPanel: MsgBox, 4160, Play Panel, (4) PlayPanel Y before drag is %PP_Y% ; for testing MouseMove, PP_X + PP_Off_X, PP_Y + PP_Off_Y Sleep, 200 MsgBox, 4160, (5) Check distance, On clickpoint?, ; for testing Click, 2 ; undock Sleep, 100 WinActivate, Play Panel WinMove, Play Panel, , Play_Panel_X, Play_Panel_Y, PlayP_Wide, PlayP_High ; x/y position, width, height of play panel Sleep, 100 ; end of 'If util in ipp' WinClose, Play Panel Return } */ ; ♣==== UPDATED VERSION ============ PLAY PANEL HOTKEYS =========================================== ; F11 key liberated. The playpanel toggle is replaced by the combination F11 + F12 cq F11 + F10 ; NB: often after start MuseScore the PlayPanel is docked in the Inspector' making it wider than needed ; Therefore: in Z + U utilities: initialisation play panel, undock from inspector, and move panel ; It resets also the Inspector to the chosen minimum width of the Defined State ; Now 'Play Panel' is added to the right-click menu of Timeline - Score Comparison Tool ; - Palettes - Inspector etc. as lowest item in this list ; Position the Play Panel: use PixelMousing to determine the coordinates. ~f11 & f12:: ; playpanel toggle - change volume (NB: Default = -40 dB, click on Vol.slider) PlayVar := "volume" Goto, ExecPlayPanel ; name of label ~F11 & F10:: ; playpanel toggle - change speed as percentage PlayVar := "speedpercentage" Goto, ExecPlayPanel ; name of label ExecPlayPanel: ; label CoordMode, Mouse, Screen MouseGetPos, StartX, StartY Send !v ; close panel with Escape or Alt + F4 Sleep, 50 ; no action when panel is docked Send {down 3} Sleep, 50 Send {Enter} Sleep, 100 WinMove, Play Panel, , Play_Panel_X, Play_Panel_Y, PlayP_Wide, PlayP_High ; x/y position, width, height of play panel Sleep, 50 CoordMode, Mouse, Window If (PlayVar = "volume") Click, %PlayPanelVolume_X%, %PlayPanelVolume_Y% ; rectangle master volume (*change*?) If (PlayVar = "speedpercentage") Click, %TempoPerc_X%, %TempoPerc_Y% ; rectangle playback speed as percentage Tooltip, Arrow up/down`nPress Z when ready, Play_Panel_X + 90, Play_Panel_Y - 10, 3 ; position relative to Play Panel (*change*?) Keywait, z, d Tooltip, , , , 3 ; end of tooltip (3) Send {Escape} ; focus on numeric input field off Sleep, 50 Send {Escape} CoordMode, Mouse, Screen MouseMove, StartX, StartY Sleep, 100 if WinExist("Mixer") WinActivate, Mixer Return ~f11 & [::Send !+i ; set start position playloop MuseScore custom shortcut ~f11 & ]::Send !+o ; set end position playloop MuseScore custom shortcut ~f11 & l::Send !+l ; toggle 'loop playback' MuseScore custom shortcut ~F11 & Home:: ; rewind If WinExist("Play Panel") WinActivate, Play Panel If WinActive("Play Panel") Click, %Rewind_X%, %Rewind_Y% else MsgBox, 4144, Rewind, Play Panel not active! Return ~F11 & Pause:: ; start/stop/continue play If WinExist("Play Panel") WinActivate, Play Panel If WinActive("Play Panel") Click, %PP_Play_X%, %PP_Play_Y% else MsgBox, 4144, Toggle Play, Play Panel not active! Return ; ♣======= UPDATED VERSION =========== INFO SCREEN rel. to PLAY PANEL ============================= ~[ & m:: MsgBox, 4096, Master More - [ + M, ( TOOLBAR toggle - CAPSLOCK + Note Input + Workspaces 1 File Operations 2 Playback Controls 3 Concert Pitch 4 Image Capture 5 Feedback 6 All except 1 7 All toolbars invisible 8 MIXER Show/hide F10 + F11 Info Mixer F10 + H PLAYPANEL Show play panel master Slider F11 + F12 Show play paneltempo percentage F11 + F10 Start-stop-continue play F11 + Pause Rewind F11 + Home Set start position playloop F11 + [ Set end position playloop F11 + ] Toggle 'loop playback' F11 + L WIN-OS - VOLUME CONTROL Mute/unmute + popup # F11 + F9 Volume change in popup Wheel/click Volume down in steps F11 + - Volume up in steps F11 + = # Splash image reminder - Exit Z Master Help [ + H Ergonomy [ + E Utilities [ + U WorkFlow [ + W Zoom & View [ + Z ) Return