Old 11-07-2015, 04:03 PM   #1
Dutchy
Human being with feelings
 
Join Date: Sep 2012
Posts: 8
Default Reversed Macro (elaborated shortcut)

Hey all,

I recently started making extensive use of Markers to be able to navigate my projects a lot quicker and easier. However, the default shortcuts only allow for 9 or 10 markers to be accessed quickly, for a marker with an ID of 11 or higher one has to use Shift+J and then write "m" plus the marker ID to which they'd like to go and hit enter.
In ProTools the same thing can be done using locations. To go to a certain location you hit numpad decimal, then the location number to which you'd like to go (on the numpad, this can be either a single number or a combination of numbers) and then numpad decimal again. This is a much faster way of navigating markers/locations and it's the same for any marker/location ID. It actually is quite a lot like a reversed macro; you hit a specific combination of several keys to perform one single action. Is this possible in Reaper? I tried the shortcut editing function, but that doesn't work.


Dutchy
Dutchy is offline   Reply With Quote
Old 11-08-2015, 04:24 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I like NumPad too. Here is a simple eel script which handles the number aspect. It pops up a window where you enter text. It could be elaborated on to handle names as well I suppose. 0 at the beginning is for "region," follow it with a period to use "use_timeline_order."

For example:
05{NumEnter} = go to region #5
0.5{NumEnter} = go to fifth region from start of project
25{NumEnter} = go to marker #25
.25{NumEnter} = go to twenty fifth marker from start of project

If you never used a script, you can just hit "new" in your action list, name it with .eel at the end, then copy paste this stuff in to the IDE window. Save it and use like a regular action.

The second line from the bottom is a new thing, for me at least, that I saw some guys talking about in the script forum. It appears to stop unnecessary undo points for actions that don't generally need them, which was formerly a drawback of ReaScript.

Code:
// EEL: Go to marker/region - get user input

function Fn_A()
(
  gui = GetUserInputs("Go to marker/region", 1, "Value:", #retvals_csv);
  strcmp("0", #retvals_csv) == 0 ? (gui = 0);
  gui ? (
    #rvc0 = strcpy_substr(#str, #retvals_csv, 0, 1);
    region = 0;
    strcmp("0", #rvc0) == 0 ? (
      region = 1;
      #retvals_csv = strcpy_from(#str, #retvals_csv, 1);
    );
    use_timeline_order = 0;
    #rvc0 = strcpy_substr(#str, #retvals_csv, 0, 1);
    strcmp(".", #rvc0) == 0 ? (
      use_timeline_order = 1;
      #retvals_csv = strcpy_from(#str, #retvals_csv, 1);
    );
    region ? (
      match("%i", #retvals_csv, marker_index);
      GoToRegion(0, marker_index, use_timeline_order);
    ):(
      match("%i", #retvals_csv, marker_index);
      GoToMarker(0, marker_index, use_timeline_order);
    );
  );
);

function NoUndo()(abs(0)); defer("NoUndo()");

Fn_A();
FnA is offline   Reply With Quote
Old 11-09-2015, 07:06 AM   #3
Dutchy
Human being with feelings
 
Join Date: Sep 2012
Posts: 8
Default

Wow! This is really cool, I'll definitely try this one

Edit: This is really nice. It would have been even better if the window wouldn't have to open, but this works much better already!


Thanks! Dutchy

Last edited by Dutchy; 11-09-2015 at 07:31 AM.
Dutchy is offline   Reply With Quote
Old 11-10-2015, 05:01 PM   #4
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

No prob. Sorry, I don't know of a trick like that. An oddball AutoHotKey/ReaScript hybrid maybe.
FnA is offline   Reply With Quote
Old 09-19-2018, 06:32 AM   #5
Dizzee
Human being with feelings
 
Join Date: Aug 2018
Posts: 12
Default

Quote:
Originally Posted by FnA View Post
For example:
05{NumEnter} = go to region #5
0.5{NumEnter} = go to fifth region from start of project
25{NumEnter} = go to marker #25
.25{NumEnter} = go to twenty fifth marker from start of project
I don't really know EEL very well but i would like to swap the region with the marker. SO, in my case, 05 would go to marker 5 and 5 would go to region 5. Can anyone help me please? I assume it is a quick change but i don't understand eel to make it.
Dizzee is offline   Reply With Quote
Old 09-19-2018, 09:15 AM   #6
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

maybe a diff solution for you....

in my action there are a possible 30 diff actions for goto marker, 1 thru 30

so clearly we can't easily use the num pad for them all...

however you can add them to a floating toolbar and then use a text label like, "Marker 1" or "Marker 29"....

that would give you a one clk way to go to 30 markers...

there likely is a way to increase the 30 actions to more... but I don't what that is at the moment... maybe someone will tell us what ini file to edit for that???
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 09-19-2018, 09:29 AM   #7
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Code:
// EEL: Go to marker/region - get user input

function Fn_A()
(
  gui = GetUserInputs("Go to marker/region", 1, "Value:", #retvals_csv);
  strcmp("0", #retvals_csv) == 0 ? (gui = 0);
  gui ? (
    #rvc0 = strcpy_substr(#str, #retvals_csv, 0, 1);
    region = 1;
    strcmp("0", #rvc0) == 0 ? (
      region = 0;
      #retvals_csv = strcpy_from(#str, #retvals_csv, 1);
    );
    use_timeline_order = 0;
    #rvc0 = strcpy_substr(#str, #retvals_csv, 0, 1);
    strcmp(".", #rvc0) == 0 ? (
      use_timeline_order = 1;
      #retvals_csv = strcpy_from(#str, #retvals_csv, 1);
    );
    region ? (
      match("%i", #retvals_csv, marker_index);
      GoToRegion(0, marker_index, use_timeline_order);
    ):(
      match("%i", #retvals_csv, marker_index);
      GoToMarker(0, marker_index, use_timeline_order);
    );
  );
);

function NoUndo()(abs(0)); defer("NoUndo()");

Fn_A();
Modified it with a phone. Let me know if it don’t work...

Last edited by FnA; 09-19-2018 at 09:36 AM. Reason: Autocorrect changed some code
FnA is offline   Reply With Quote
Old 09-19-2018, 09:54 AM   #8
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

another thought

Lokasenna has a way to create a lua script that will generate and save as new lua actions, versions of itself.

Perhaps he could be asked to make one like that for go to markers...

then you could save out as many versions of it as desired, like
go to marker 157, or whatever... and then those could also be put into a floating toolbar...

the point I'm trying to make is while the eel script is lovely, it requires user input each time... which as I understand the OP would like to avoid.
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 09-19-2018, 10:09 AM   #9
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

There was at least one more thread about such things.

https://forum.cockos.com/showthread.php?t=204861

Something might have happened in script forum. Dunno.
FnA is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.