Hi there
Is there a way to change default double left click on midi region behavior? For example to: zoom to selection (Z) and switch to draw mode (D). Some kind of lua script maybe?
And having that, it would be also great to have a shortcut that combines visual undo (shift Z) with switch to grab mode (G). Is there a way to achieve that?
So the silence means that it cannot be done on the âuserâ level, right?
I donât know the full capabilities of the Lua scripting, but I do not believe this can be done without modifying the code of Ardour no. Though someone may know a way differently.
Sorry about the silence. Yes, unfortunately mouse event handling has few to no âhooksâ where the user can intervene. The ones we do offer are really only connected to the effect of various modifiers in combination with mouse events. It probably would have been better if Ardourâs internal mouse event handling dispatched to some user-modifiable set of actions, just like keyboard event handling does. But it doesnât, and changing the current design, while not impossible, is a substantial task.
Ok. Thank you for clarification.
And what about combining 2 actions under 1 keyboard shortcut like: âvisual undoâ + âswitch to grab modeâ, or something similar? Is this possible?
Possible, yes, convenient, no. Particularly in Ardour 5 scripts are only per session.
You can call Editor:access_action()
from a Lua script and also bind up to 8 scripts to keyboard shortcuts (up to 12 in recent git). Menu > Edit > Lua Scripts > Script Manager ⌠; Menu > Window > Keyboard Shortcuts > Editor > Script-Name
see http://manual.ardour.org/appendix/menu-actions-list/ for a list of actions.
Save this example to e.g. ~/config/ardour5/scripts/vizundo_and_grab.lua
then âadd/setâ it as Action script in the script manager:
ardour { ["type"] = "EditorAction", name = "Visual Undo and grab", author = "me", description = [[....]] }
function factory () return function ()
Editor:access_action ("Editor", "toggle-zoom")
Editor:access_action ("MouseMode", "set-mouse-mode-object")
end end
Ha! Itâs working! Thank you Robin! I donât know if it is convenient or not but certainly itâs just cool. Can I assign keyboard shortcut to execute this script (I canât see anything obvious in keybindings editor)? I only managed to add this little gui button under DSP load meter to execute it (which is nice feature on its own btw).
Yes, you can.
Use the Keyboard Shortcut editor (Menu > Window > Keyboard Shorcuts).
Editor-Actions are under âEditorâ. Search for the scriptâs name (by default theyâre named e.g. âUnset #1â until you load a script â under the hood in the *.keys
bindings file in the config folder theyâre called script-action-<num>
).
Perfect! Thank you!
Good Lord, by some sort of foolâs luck I even managed to convert this script to âzoom to selection and switch to draw modeâ (Z+D) kind of thing. Here it is if anyone would be interested:
ardour { ["type"] = "EditorAction", name = "Zoom to region and draw", author = "me", description = [[....]] }
function factory () return function ()
Editor:access_action ("Editor", "zoom-to-selection")
Editor:access_action ("MouseMode", "set-mouse-mode-draw")
end end
But I just guessed those âzoom-to-selectionâ and âset-mouse-mode-drawâ parts from your example and Ardourâs menu names. Is there some kind âmanualâ where those and other things like that can be found?
Yes, please see the post with the original script, above.
Great! So Iâm the lua hacker now! (nah just kidding - I wish)
BTW Iâm no expert, but double click is like one of those most âintuitiveâ actions out there right? So the fact that itâs assign to âshow region propertiesâ feels kind of like a waste of potential (to me at least). Maybe you guys consider to change it to something more useful in future release (like âzoom to selectionâ and âswitch to drawâ) Yeah, yeah, this belongs to feature request, I know
Anyways, thanks again!
There are many creation-centric applications in which dbl-click means âedit this objectâ. It is so common that we had lots of people asking for this back in the day when the only way to get to the same dialog was shift-right-click.
Iâm confused, am I missing something? Iâm not sure if I understood you correctly.
Let me ask this another way:
There is this zoomed-out session with lots of midi tracks and regions. Mouse is in grab mode. Now, I want to add some notes to one particular region using mouse. From what I understand I have to:
- Select the region
- Hit Z (zoom to selection)
- Hit D (switch to draw)
Is there a quicker and more efficient way to do this?
Thatâs a very specific scenario. In many cases, you just hit D (switch to draw) and start drawing (because youâre already zoomed in, and thereâs no need to select the region - just draw in it).
But yes, in the scenario youâve described where youâre zoomed out and there are a lot of regions, those 3 steps are typically going to be necessary.
Having said that, I can see that what youâre describing is also a different semantic interpretation of what âedit this object meansâ, and I think this is worthy of consideration (for MIDI regions, not audio). Iâll give it some thought. It is true that âedit this objectâ in this context is more likely to mean âalter its contentsâ rather than âalter its bounds etc.â
Hi!
@ roithamer
Thereâs some little trick⌠So you can zoom to selection during âDâ&âEâ-mode, if you activate the option Edit>References>Appearance>Editor>Use name highlight bars in region displays (requires restart)
But to select any region you have to pick right in to the strip at the bottom of region, otherwise you are risking to draw accidental notes in âDâ-mode. Also the name strip switches off when your track zooms to vertical minimum. Not so comfortable, but Iâve found this thing somehow//
If you have an account in BugTrakcer, may be youâll find something interesting about âzoomâ topic here:
https://tracker.ardour.org/view.php?id=7112
Some faked video about the proposal to zoom the navigated region:
@ cooltehno
Thatâs a nice little trick, thank you, definitely Iâll be using it. I also find your zoom and midi region highlight proposals really useful, it would be really nice to have it.
@ Paul
Yes this is exactly what I meant - for regular Joe Shmoe like me, edit midi region means adding notes etc. Just like with a text file - double click it and Joe Shmoe expects to be able to write, no additional keyboard commands needed.
Correct me if Iâm wrong, I donât know much about DAWâs, but from what I can tell in most of them double click (or even single click) on midi âregionâ or âclipâ presents you magnified view of it with some sort of a pen tool ready to draw a note.
Iâm not saying that this is the best solution but itâs probably strongly imprinted in newcomerâs mind. Maybe it would be a good idea to at least have it as an option somewhere in the preferences.
Ok, so there is a way to change double click action from âshow propertiesâ to âzoom to selectionâ.
Preferences -> Editor -> Double click zooms to selection