Old 04-15-2018, 12:42 PM   #1
Era
Human being with feelings
 
Era's Avatar
 
Join Date: Sep 2016
Location: Greensboro, NC USA
Posts: 50
Default Macro Recorder

Would make my life easier if you could just turn on a "macro recorder" and it would watch what you do with the mouse and keyboard. Then when you turn the recorder off, there's your custom action containing all the actions that you did. Microsoft Word has this feature, and it's particularly helpful for newbies. But everyone can benefit from it. Wish some wizard at SWS or elsewhere would create such a recorder...
Era is offline   Reply With Quote
Old 04-15-2018, 01:19 PM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,924
Default

+1, although with the existing options (custom actions, cycle actions, scripts, hacking stuff with AutoHotKey) I wouldn't get your hopes up.

In the meantime, a ReaScript could (I think) monitor the Undo history to get a list of actions and then generate a custom action from it. It would only be able to handle "basic" stuff though:

1. Mouse movements aren't consistent, since different projects will have different items in different places, the mixer view might be scrolled to a different spot or dragged to a different height, etc.

2. Scripts can't simulate keypresses or button clicks.

If you've got a task that you'd like a macro for, you'd probably have an easier time writing it out, step by step, or recording a video/gif of you performing the sequence, and then post a request in the script subforum.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is online now   Reply With Quote
Old 04-15-2018, 01:44 PM   #3
Era
Human being with feelings
 
Era's Avatar
 
Join Date: Sep 2016
Location: Greensboro, NC USA
Posts: 50
Default Thank you

I can see your points. The undo list would be a very clever solution.

I'm only hoping for a list of actions, things that were triggered, regardless of whether by mouse, keyboard shortcut, or whatever else might have triggered the actions.

Maybe I'm wrong but somewhere down deep within Reaper is a place where anything that happens should be recordable--even things scripts do are things that happen. It wouldn't matter where on screen the mouse clicked if what the click caused to happen is what's recorded (not the layout axis in the UI).

The reason I'd like this approach is that quite frequently I have trouble figuring out which particular keywords to search for in the actions list (delete, cut, remove...too many synonymous possibilities). And then when I do locate something, there can be maybe 20 versions of the behavior and I'm not able usually to decide which of them applies to my situation. So creating custom actions would be easier if I could just do what I want to do, and have it recorded.
Era is offline   Reply With Quote
Old 04-15-2018, 02:05 PM   #4
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 1,253
Default

It would be great if you could record a sequence of actions/clicks/menu selects/scripts/button pushes by recording them the way Macro utilities do, hit record, do them, hit stop, to create the full action, instead of having to assemble it by adding the parts one by one in the custom action window. Sometimes there are action parts of what you want in a new custom action that you haven't created yet, and in the current way have to create a new action for each and then load them up. An Action recorder, would include anything you do during the recording (as long as it's a valid act) and call it the custom action.
__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is offline   Reply With Quote
Old 04-15-2018, 03:07 PM   #5
Era
Human being with feelings
 
Era's Avatar
 
Join Date: Sep 2016
Location: Greensboro, NC USA
Posts: 50
Default I Agree

There must be a "deep loop" within Reaper that sees every event coming down the pipe, and executes it. It's this point down in the engine that should be tapped, recorded, and then available to the recorder as a list. My hope.
Era is offline   Reply With Quote
Old 04-15-2018, 03:15 PM   #6
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,924
Default

Quote:
Originally Posted by Era View Post
It wouldn't matter where on screen the mouse clicked if what the click caused to happen is what's recorded (not the layout axis in the UI).
My point was that the macro has no way to figure out *which* item you want to click on, or *which* track, only that an item/track was clicked and then a couple of actions were performed on it. So unless everything about project B is the same as project A - right down to where the view is scrolled, what tracks are visible in the mixer, etc - an exact recording of what you did would be less than helpful.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is online now   Reply With Quote
Old 04-15-2018, 03:35 PM   #7
vdubreeze
Human being with feelings
 
vdubreeze's Avatar
 
Join Date: Jul 2011
Location: Brooklyn
Posts: 1,253
Default

Quote:
Originally Posted by Lokasenna View Post
My point was that the macro has no way to figure out *which* item you want to click on, or *which* track, only that an item/track was clicked and then a couple of actions were performed on it. So unless everything about project B is the same as project A - right down to where the view is scrolled, what tracks are visible in the mixer, etc - an exact recording of what you did would be less than helpful.
Right, clicks on certain things won't work in such a sequence.

But a click on a button or universal part of an item (fade) can be logged, so there are things that clicks can record for a macro. And the things such as like you mention can't be done that way. And there are all the other moves that can be logged, so even if 50% of what we use clicks for don't qualify it could still be a boon for multi level actions.

Most macro utilities (only speaking with OS X knowledge) have this capability of recording a long series of tasks and calling it a macro without creating the macros for those tasks first.
__________________
The reason rain dances work is because they don't stop dancing until it rains.
vdubreeze is offline   Reply With Quote
Old 04-15-2018, 11:06 PM   #8
Era
Human being with feelings
 
Era's Avatar
 
Join Date: Sep 2016
Location: Greensboro, NC USA
Posts: 50
Default I Must Be Missing Something

If you right-click, then choose from the pop-up menu, whatever you select within that menu happens in Reaper. So, I still can't see why your choice and the resulting behavior are "unknowable"...can't be noticed and recorded. I'm thinking of something deep down inside Reaper that senses a right-click (or whatever else the user does) and responds by triggering the appropriate action.

Clearly there exist two lists of data: a list of possible user-inputs (Shift+F, for example) and a set of corresponding functions indexed to that user-input list. Even if the user has redefined the default keyboard shortcuts, appropriate actions are triggered. And because an Undo History exists, this list exists.
Era is offline   Reply With Quote
Old 04-16-2018, 07:33 AM   #9
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,924
Default

Think of it this way:

As far as I know, MS Word has no way to know where you want a macro performed. You hit record, type some stuff, bold some stuff, format it, save the macro, but it can only ever DO that macro at wherever the text cursor happens to be - unless you only ever work on the same piece of text, with it scrolled to the same view, so that mouse position (452, 742) always lands on the same word.

A macro recorder in Reaper would suffer the same limitation - it can record the sequence of actions that were performed, but unless it was all i.e. performed on an item that was already selected, it has no way of knowing what item to perform the macro on.

As you say, deep in the bowels of Reaper something knows that the user right-clicked the mouse. It even knows whether you clicked an item or a track or the ruler, and even which track number, item number on the track, etc it was. But it 100%, never, ever ever, knows WHY you picked that particular item. It doesn't know what you WANT to do.

That's how Cycle Actions/Custom Actions work too, of course. Scripts can use far more intelligence, or ask for user input, but there's no way a macro recorder could possibly do that. The only way it could is if you were to, erm... write a script telling it to.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is online now   Reply With Quote
Old 04-16-2018, 11:43 AM   #10
Era
Human being with feelings
 
Era's Avatar
 
Join Date: Sep 2016
Location: Greensboro, NC USA
Posts: 50
Default

I know you're far more familiar with Reaper than I am, but I'm still unsure why if Reaper can do something, you can't tell it where to do it and then run a recorded macro. In Word, you're right that a macro can only, say, bold text that you've selected first. It can't know what you want the macro performed on until you direct it to the location within the document.

But actions within Reaper also often require that you specify an item, track, time selection and so on. It's not a real limitation that you have to specify the target of a macro's behavior...

You mention "It doesn't know what you WANT to do." I think it does. You want it to do whatever you recorded previously. Take steps x, y, z, then stop. And these steps are taken on the selection you provide. In other words, a recorded macro doesn't differ at all from a what Reaper calls a "custom action" (a series of actions). I'm just hoping that somehow you could do various things, and have an action list created that would contain all the things you did (except the first thing--such as selecting a track). Then later, you select a different track in a different song, and run the macro. The macro doesn't need to know what track was selected when it was recorded; only needs to know the actions it should follow on the currently selected track. So macros don't need to ask for user input. Any more than custom actions do.

In effect, I just want to make it easier to craft custom actions. As I mentioned, my understanding of Reaper isn't deep like yours, so I have trouble building custom actions using the action list with its many synonyms (cut, delete, remove) and its often multiple variations on the same action...some variations are to me unclear.

Sorry to make such an issue of this. But your original mention of the undo list made me realize that's pretty close to what I'm hoping for...
Era is offline   Reply With Quote
Old 04-16-2018, 07:32 PM   #11
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,924
Default

Quote:
Originally Posted by Era View Post
You mention "It doesn't know what you WANT to do." I think it does. You want it to do whatever you recorded previously.
Not unless you're doing the exact same thing to the exact same item in the exact same project, etc. You want it to apply that sequence of events to a different item, and it has no way of knowing what item that is. Just like Word.

Quote:
Take steps x, y, z, then stop. And these steps are taken on the selection you provide. In other words, a recorded macro doesn't differ at all from a what Reaper calls a "custom action" (a series of actions).
This is what I was trying to get across - that it wouldn't be able to do anything outside the scope of what custom actions can do now. Any "intelligence" is always going to involve scripts because scripts can ask the user for input - "what do you want this item named? which track do you want this file I'm messing with to go on?"

Quote:
your original mention of the undo list made me realize that's pretty close to what I'm hoping for...
I looked into my original suggestion earlier today, but the undo history appears to live entirely in RAM until you save the project, at which point the .rpp-undo is updated - assuming you have "store undo history with project files" turned on. There doesn't seem to be any real-time way for a script to look at it.

Like I said earlier, scripts can automate a hell of a lot in Reaper - if you can figure out what sequence you want, there are a number of us who'd be happy to give it a go.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is online now   Reply With Quote
Old 04-16-2018, 08:04 PM   #12
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: The vast, frozen wasteland of western Canadia.
Posts: 4,924
Default

Alright, I took a quick stab at it. My idea works at a very basic level, but it does run into one big limitation - because it's only getting the name of the action, it can't tell if the same action is being performed more than once.
__________________
Currently working away from home; don't expect timely responses from me.
Default 5.0 Nitpicky Edition / GUI tutorial for Lua / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate / ReaPack
Lokasenna is online now   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 05:04 PM.


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