Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 08-11-2020, 07:32 PM   #1
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default Save and recall track record arm states

Well, we can save all kinds of states in Reaper (track selection, solo/mute etc).

But another really useful one would be Record-arm states (armed/unarmed) for the tracks.

Probably the most useful of all for anyone who is composing and recording jumping around numerous instruments/sound sources.

Simplified real-life Example: I'm recording synth into track 1. Now I want to record vocals into track 2. I could have a dedicated action/button for 'Synth' record state, and another one for 'Vocal' record state, and easily jump between them.

(In reality, my projects are more complex, if it was just the above scenario I could live with changing the arm states of two different tracks, but it's more).


Please can we see this happen?

Or, any script legends know how this can be achieved through lua?
talustalus is offline   Reply With Quote
Old 08-12-2020, 06:58 AM   #2
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

How do you want the actions to work ? Disable all arming and arm track with name Synth ? Then the other action disable all arming and arm track with name vocal ?

These two attached save/restore all armed states.

Last edited by Coachz; 08-15-2023 at 07:04 AM.
Coachz is offline   Reply With Quote
Old 08-12-2020, 04:43 PM   #3
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Thanks.

I think I went off on a tangent with my examples.

The original intention was just to have slots where you could save the current arm states for all tracks in the project, not for specific track names. ie. Save/Recall state 1, state 2, state 3...

I'll try this files out, because I think they're what I was seeking


thank you!
talustalus is offline   Reply With Quote
Old 08-12-2020, 04:48 PM   #4
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Here's an example of saving state.

https://forum.cockos.com/showpost.ph...4&postcount=12
Coachz is offline   Reply With Quote
Old 08-12-2020, 05:17 PM   #5
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
How do you want the actions to work ? Disable all arming and arm track with name Synth ? Then the other action disable all arming and arm track with name vocal ?

These two attached save/restore all armed states.
Man it works, thanks so much.

But when I use the 'restore arm state' script in a Cycle action I get this message.

'number expected, got nil'

My guess is because part of that cycle action creates a new track for me, and the script gets confused because the no. of tracks during the 'save arm state' process is different from the no. of tracks in the 'restore arm state' process.

EDIT: Yes - that's what it was. Nothing wrong with your script. I adjusted my cycle action order. Thanks a bunch dude!
Attached Images
File Type: png Reaper restore arm script error.png (8.7 KB, 126 views)

Last edited by talustalus; 08-12-2020 at 05:23 PM.
talustalus is offline   Reply With Quote
Old 08-12-2020, 05:22 PM   #6
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Quote:
Originally Posted by talustalus View Post
Man it works, thanks so much.

But when I use the 'restore arm state' script in a Cycle action I get this message.

'number expected, got nil'

My guess is because part of that cycle action creates a new track for me, and the script gets confused because the no. of tracks during the 'save arm state' process is different from the no. of tracks in the 'restore arm state' process.
That would be correct. What you can do is change the restore script to count the number of Records being returned and only iterate through that many track numbers. To do that you'll want to copy the restore section above the track loop to get a count of Records that are ready to be restored
Coachz is offline   Reply With Quote
Old 08-12-2020, 06:32 PM   #7
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Thanks I'm grateful to ya
talustalus is offline   Reply With Quote
Old 08-13-2020, 11:13 PM   #8
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
That would be correct. What you can do is change the restore script to count the number of Records being returned and only iterate through that many track numbers. To do that you'll want to copy the restore section above the track loop to get a count of Records that are ready to be restored
I tried and failed... this is the error I get. I'm almost entirely sure it's because I've done something wrong in the coding, not being a coder and all that.
Attached Images
File Type: png count tracks error.png (8.2 KB, 116 views)
talustalus is offline   Reply With Quote
Old 08-14-2020, 03:39 AM   #9
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Paste your code here in between

[CODE1]

[/CODE1]

Without the 1 and tell me what you want it to do. For example, do you want it to saved the armed state of all the current tracks by track number and then allow you to add as many tracks as you want and still restore the same state by the same track numbers ignoring the new tracks?
Coachz is offline   Reply With Quote
Old 08-14-2020, 05:16 AM   #10
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
Paste your code here in between

[CODE1]

[/CODE1]

Without the 1 and tell me what you want it to do. For example, do you want it to saved the armed state of all the current tracks by track number and then allow you to add as many tracks as you want and still restore the same state by the same track numbers ignoring the new tracks?
Appreciate it man but I take zero credit for 'my' code. This is 100% you. It works great.

Yes, I want it restore the same state per the pre-existing track states before the new tracks were created (so ignoring the new tracks as you said).

Sorry ://
talustalus is offline   Reply With Quote
Old 08-14-2020, 05:21 AM   #11
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Quote:
Originally Posted by talustalus View Post
Appreciate it man but I take zero credit for 'my' code. This is 100% you. It works great.

Yes, I want it restore the same state per the pre-existing track states before the new tracks were created (so ignoring the new tracks as you said).

Sorry ://
Right so paste what you tried in code so we can see the problem. Did you try to modify my code at all?
Coachz is offline   Reply With Quote
Old 08-14-2020, 05:39 AM   #12
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
Right so paste what you tried in code so we can see the problem. Did you try to modify my code at all?
All I did was move your script around, trying to interpret "To do that you'll want to copy the restore section above the track loop to get a count of Records that are ready to be restored"

I just made a mess of it by moving things around really. (saved to a new script file then deleted it).

I have no understanding of the commands.
talustalus is offline   Reply With Quote
Old 08-14-2020, 06:51 AM   #13
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

try this

Last edited by Coachz; 08-15-2023 at 07:04 AM.
Coachz is offline   Reply With Quote
Old 08-14-2020, 04:06 PM   #14
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Seems to work, except that I get this pop up after executing the action:
Attached Images
File Type: png restore arm states popup.png (18.1 KB, 107 views)
talustalus is offline   Reply With Quote
Old 08-14-2020, 04:14 PM   #15
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
try this
Actually, I tried it a few times. It re-arms based on the track *numbers* that were armed rather than the actual tracks. So if they moved as a result of adding new tracks, they won't be re-armed because they will have moved to what was a previously non-armed track number.

But, I think you've helped me enough, I'll just let this one go because I don't want you to put in any more time for me unless you see it useful for yourself as well.


Thanks for all your help.

Last edited by talustalus; 08-14-2020 at 04:23 PM.
talustalus is offline   Reply With Quote
Old 08-14-2020, 04:41 PM   #16
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Quote:
Originally Posted by talustalus View Post
Actually, I tried it a few times. It re-arms based on the track *numbers* that were armed rather than the actual tracks. So if they moved as a result of adding new tracks, they won't be re-armed because they will have moved to what was a previously non-armed track number.

But, I think you've helped me enough, I'll just let this one go because I don't want you to put in any more time for me unless you see it useful for yourself as well.


Thanks for all your help.
I have no problem helping but how can you identify a track? Will they all be guaranteed unique names ? Not 2 tracks both named guitar ? Currently it stores the track number so it will only arm correctly if the new tracks are at the end of the current tracks. If you want to do it by name though you have to not change their names between saving and restoring and you can't have duplicates. See what I mean ?
Coachz is offline   Reply With Quote
Old 08-14-2020, 05:02 PM   #17
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
I have no problem helping but how can you identify a track? Will they all be guaranteed unique names ? Not 2 tracks both named guitar ? Currently it stores the track number so it will only arm correctly if the new tracks are at the end of the current tracks. If you want to do it by name though you have to not change their names between saving and restoring and you can't have duplicates. See what I mean ?
Totally understand. And yes the names will be unique and zero duplicates. I'm very stringent on my track naming which is why I thought up something like this being able to work for my work.

The only thing that changes between save and restore of arm states will be newly added tracks (but these new tracks will again always have unique names -- their names won't even be blank because I bring up the track rename immediately as a custom macro, so they shouldn't get in the way)

... and, the previously armed track names will not change from save to restore state.

Last edited by talustalus; 08-14-2020 at 05:11 PM.
talustalus is offline   Reply With Quote
Old 08-14-2020, 07:41 PM   #18
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

So it sound like storing and restoring them by name will work for you. I'll give it a go.
Coachz is offline   Reply With Quote
Old 08-15-2020, 01:46 AM   #19
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Try this.

Last edited by Coachz; 08-15-2023 at 07:04 AM.
Coachz is offline   Reply With Quote
Old 08-15-2020, 06:17 AM   #20
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
Try this.
absolute perfection!

I'm really really grateful, thank you so much for taking the time. This is pure gold!!
talustalus is offline   Reply With Quote
Old 08-15-2020, 06:23 AM   #21
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Quote:
Originally Posted by talustalus View Post
absolute perfection!

I'm really really grateful, thank you so much for taking the time. This is pure gold!!
excellent, glad to be of help for a change instead of a burden !
Coachz is offline   Reply With Quote
Old 08-15-2020, 06:41 AM   #22
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

Quote:
Originally Posted by Coachz View Post
excellent, glad to be of help for a change instead of a burden !
U kidding? Huge help
talustalus is offline   Reply With Quote
Old 08-31-2020, 04:41 AM   #23
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

It's extremely useful . I can't recommend enough that you put it in Reapack, I feel lucky to have found your scripts, I suspect many others will want to use something like this and right now they could think it's not possible because it doesn't pop up in their action window.

Thank you for this. It saved my day !!
Loulou92 is offline   Reply With Quote
Old 08-31-2020, 04:54 AM   #24
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Hopefully, clear reapack instructions are coming so it will be possible to have a reapack repo without needing git. One of the users is working on scripts to do it. Yay
Coachz is offline   Reply With Quote
Old 08-31-2020, 05:06 AM   #25
Loulou92
Human being with feelings
 
Loulou92's Avatar
 
Join Date: Sep 2015
Location: Paris
Posts: 544
Default

I have no idea what you are talking about hahaha but it's a good thing I guess !! double yay then
Loulou92 is offline   Reply With Quote
Old 08-31-2020, 05:39 AM   #26
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

The idea is to be able to have a folder with scripts locally that are my reapack and not have to set up a full development environment to keep them up to date in the github repo.
Coachz is offline   Reply With Quote
Old 08-31-2020, 10:21 PM   #27
talustalus
Human being with feelings
 
Join Date: Dec 2018
Posts: 1,025
Default

I reiterate again -- This has been a godsend, thanks Coachz!!
talustalus is offline   Reply With Quote
Old 09-01-2020, 02:59 AM   #28
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,791
Default

Glad to help

It's the little things.....

https://genius.com/Alice-cooper-its-...-things-lyrics
Coachz 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:58 PM.


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