From 3ca27a903ab3a90426a4081c86ba377a3f79bd8f Mon Sep 17 00:00:00 2001 From: mostlysimlar Date: Thu, 28 May 2020 00:55:12 -0700 Subject: [PATCH] feat: better folder selection --- definitions/actions.lua | 28 ++++++++++++++++------------ definitions/global.lua | 13 ++++++++----- definitions/main.lua | 7 ++++--- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/definitions/actions.lua b/definitions/actions.lua index 1150964d..2a3d347d 100644 --- a/definitions/actions.lua +++ b/definitions/actions.lua @@ -66,18 +66,20 @@ return { EventSelectionStart = {40440, midiCommand=true}, FirstItemStart = util.moveToFirstItemStart, FirstTrack = {util.firstTrack, "ScrollToSelectedTracks"}, - FitItemsByLooping = 41320, - FitItemsByLoopingNoShift = 41386, - FitItemsByPadding = 41385, - FitItemsByStretching = 41206, - FitByLooping = {"OnlySelectItemsCrossingTimeAndTrackSelection", "FitItemsByLooping"}, FitByLoopingNoShift = {"OnlySelectItemsCrossingTimeAndTrackSelection", "FitItemsByLoopingNoShift"}, + FitByLooping = {"OnlySelectItemsCrossingTimeAndTrackSelection", "FitItemsByLooping"}, FitByPadding = {"OnlySelectItemsCrossingTimeAndTrackSelection", "FitItemsByPadding"}, FitByStretching = {"OnlySelectItemsCrossingTimeAndTrackSelection", "FitItemsByStretching"}, FitEnvelopePoints = "_BR_FIT_ENV_POINTS_TO_TIMESEL", + FitItemsByLooping = 41320, + FitItemsByLoopingNoShift = 41386, + FitItemsByPadding = 41385, + FitItemsByStretching = 41206, FitNotes = {40754, midiCommand=true}, FocusMain = "_S&M_WNMAIN", + FolderChildren = {"SelectFolderChildren", "ScrollToSelectedTracks"}, FolderParent = {"SelectFolderParent", "ScrollToSelectedTracks"}, + Folder = {"SelectFolder", "ScrollToSelectedTracks"}, FreezeTrack = 41223, FxAdd = "_S&M_CONSOLE_ADDFX", FxChainToggleShow = "_S&M_TOGLFXCHAIN", @@ -128,7 +130,7 @@ return { GrowNoteRight = {"SelectNotes","TrimSelectedNoteRightEdgeToEditCursor"}, HealSelectedItemsSplits = 40548, HealSplits = {"SaveItemSelection", "OnlySelectItemsCrossingTimeAndTrackSelection", "HealSelectedItemsSplits", "RestoreItemSelection"}, - InnerFolderAndParent = {"FolderParent", "SelectFoldersChildren"}, + InnerFolderAndParent = {"FolderParent", "SelectFolder"}, InnerFolder = {"FolderParent", "SelectOnlyFoldersChildren"}, InsertAutomationItem = 42082, InsertDefaultSizeNote = {40051, midiCommand=true}, @@ -144,7 +146,6 @@ return { InvertVoicingUpwards = {40909, midiCommand=true}, ItemApplyFX = 40209, ItemNormalize = 40108, - Region = util.selectInnerRegion, ItemSplitSelRight = "_SWS_AWSPLITXFADELEFT", Item = util.selectInnerItem, JoinNotes = {"SelectNotes", "JoinSelectedNotes"}, @@ -238,6 +239,7 @@ return { PitchUpOctave = {40187, midiCommand=true}, PlayAndLoop = {"SetLoopSelectionToTimeSelection", "SaveEditCursorPosition", "LoopStart", "TransportPlay", "RestoreEditCursorPosition", setTimeSelection=true}, PlayFromMouse = "_BR_PLAY_MOUSECURSOR", + PlayFromTimeSelectionStart = {"SaveEditCursorPosition", "TimeSelectionStart", "TransportPlay", "RestoreEditCursorPosition"}, PlayMacro = "PlayMacro", PlayPosition = 40434, Preferences = 40016, @@ -261,7 +263,6 @@ return { PrevTab = 40862, PrevTake = 40126, PrevTrack = 40286, - UnselectAllButCurrentTrack = util.unselectAllButCurrentTrack, PrevTransientInItem = {"SaveItemSelection", "SelectItemsUnderEditCursor", "MoveEditCursorToPrevTransientInSelectedItems", "RestoreItemSelection"}, ProjectEnd = util.moveToProjectEnd, ProjectStart = util.moveToProjectStart, @@ -273,6 +274,7 @@ return { Record = {"SaveEditCursorPosition", "TimeSelectionStart", "RecordConditional", "RestoreEditCursorPosition", setTimeSelection=true}, Redo = 40030, RegionSelectItems = 40717, + Region = util.selectInnerRegion, RemoveMarker = 40613, RemoveRegion = 40615, RemoveTimeSelection = 40635, @@ -287,6 +289,7 @@ return { ResetAllControlSurfaceDevices = 42348, ResetAllMidiDevices = 41175, ResetControlDevices = {"ResetAllMidiDevices", "ResetAllControlSurfaceDevices"}, + ResetSelection = {"UnselectAllButCurrentTrack", "UnselectItems", "UnselectEnvelopePoints", "UnselectAllEvents"}, Reset = {"Stop", "SetModeNormal", "SetRecordModeNormal", "ResetSelection"}, ResetTrackToNormal = {"UnarmSelectedTracks", "UnarmAllEnvelopes", "SetAutomationModeTrimRead"}, RestoreEditCursorPosition = "_BR_RESTORE_CURSOR_POS_SLOT_16", @@ -318,8 +321,9 @@ return { SelectEnvelopePoints = 40330, SelectEventsInTimeSelection = {40876, midiCommand=true}, SelectFirstOfSelectedTracks = "_XENAKIOS_SELFIRSTOFSELTRAX", + SelectFolderChildren = "_SWS_SELCHILDREN", SelectFolderParent = "_SWS_SELPARENTS", - SelectFoldersChildren = "_SWS_SELCHILDREN2", + SelectFolder = "_SWS_SELCHILDREN2", Selection = "NoOp", SelectItemsAndSplit = {"OnlySelectItemsCrossingTimeAndTrackSelection", "SplitAtTimeSelection"}, SelectItemsCrossingTimeAndTrackSelection = 40718, @@ -329,7 +333,6 @@ return { SelectItemsUnderEditCursor = "_XENAKIOS_SELITEMSUNDEDCURSELTX", SelectLastOfSelectedTracks = "_XENAKIOS_SELLASTOFSELTRAX", SelectLastTouchedTrack = 40505, - SetFirstSelectedTrackAsLastTouchedTrack = 40914, SelectNextNote = {40413, midiCommand=true}, SelectNextNoteSamePitch = {40428, midiCommand=true}, SelectNoteClosestToEditCursor = {40426, midiCommand=true}, @@ -354,6 +357,7 @@ return { SetEnvelopeShapeLinear = 40189, SetEnvelopeShapeSlowStart = 40424, SetEnvelopeShapeSquare = 40190, + SetFirstSelectedTrackAsLastTouchedTrack = 40914, SetGlobalAutomationModeLatch = 40881, SetGlobalAutomationModeLatchPreview = 42022, SetGlobalAutomationModeOff = 40876, @@ -425,8 +429,8 @@ return { ToggleMidiSnap = {1014, midiCommand=true}, ToggleMute = 6, TogglePanEnvelope = 40407, - TogglePlaybackPreroll = 41818, TogglePlaybackAutoScroll = 40036, + TogglePlaybackPreroll = 41818, ToggleRecord = 1013, ToggleRecordConditional = "_SWS_AWRECORDCOND", ToggleRecordingAutoScroll = 40262, @@ -457,8 +461,8 @@ return { UndoMove = "_SWS_EDITCURUNDO", UnfreezeTrack = 41644, UnmuteAllTracks = 40339, + UnselectAllButCurrentTrack = util.unselectAllButCurrentTrack, UnselectAllEvents = {40214, midiCommand=true}, - ResetSelection = {"UnselectAllButCurrentTrack", "UnselectItems", "UnselectEnvelopePoints", "UnselectAllEvents"}, UnselectEnvelopePoints = 40331, UnselectItems = 40289, UnselectTracks = 40297, diff --git a/definitions/global.lua b/definitions/global.lua index 530ebd20..06a12538 100644 --- a/definitions/global.lua +++ b/definitions/global.lua @@ -59,6 +59,7 @@ return { ["u"] = "Undo", ["R"] = "RecordOrStop", ["T"] = "TransportPlay", + ["tt"] = "PlayFromTimeSelectionStart", ["F"] = "TransportPause", ["zt"] = "ScrollToPlayPosition", [""] = "ZoomRedo", @@ -81,12 +82,14 @@ return { [""] = "FxShowNextSel", [""] = "FxShowPrevSel", ["dr"] = "RemoveRegion", - ["mi"] = "MarkerInsert", - ["dm"] = "RemoveMarker", ["!"] = "ToggleLoop", [""] = { "+leader commands", { [""] = "ShowActionList", ["h"] = "ShowReaperKeysHelp", + ["M"] = { "+markers", { + ["i"] = "InsertMarker", + ["d"] = "RemoveMarker", + }}, ["m"] = { "+midi", { ["x"] = "CloseWindow", [","] = {"+options", { @@ -216,10 +219,10 @@ return { ["x"] = "FxCloseAll", ["c"] = "ViewFxChainMaster", }}, - ["t"] = { "+track", { - ["e"] = { "+envelope", { + ["e"] = { "+envelope", { ["s"] = "ToggleShowAllEnvelopeGlobal", - }}, + }}, + ["t"] = { "+track", { ["s"] = "UnsoloAllTracks", ["m"] = "UnmuteAllTracks", }}, diff --git a/definitions/main.lua b/definitions/main.lua index f0ee7178..c93384dd 100644 --- a/definitions/main.lua +++ b/definitions/main.lua @@ -27,13 +27,14 @@ return { ["F"] = "InnerFolderAndParent", ["g"] = "AllTracks", }}, - ["c"] = "SelectFoldersChildren", - ["F"] = "SelectFolderParent", + ["F"] = "FolderParent", + ["c"] = "FolderChildren", + ["f"] = "Folder", }, track_operator = { ["z"] = "ZoomTrackSelection", [""] = "ToggleShowTracksInMixer", - ["f"] = "MakeFolder", + [""] = "MakeFolder", ["d"] = "CutTrack", ["a"] = "ArmTracks", ["s"] = "SelectTracks",