Old 07-27-2017, 11:59 AM   #1
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default Track-Item Name Manipulation v2

Hi,
this scripts comes from a collaboration with amagalma. I took the great amalgama track_item_manipulation lua script based on spk77's one and adjusted it to be NON destructive. He then further improved it.




General Instructions
- just apply any modificator: it will affect the scroll list inside the Window and NOT directly the tracks items
- hit RESET to reset all modifiers and start from scratch
- hit COMMIT to write to Reaper selected TRACKS or ITEMS the modified list

-------------------------
VERSION WITH UNDO
- You can UNDO-REDO the last modifier up to the initial state
- You can apply multiple times the same modifier before committing

-----------
VERSION WITHOUT UNDO
- every applied modifier will lit red
- you can UNDO each modifier by opening it and clearing the fields. Its effect will be undone. For case modifiers to UNDO them just click again on the active modifier (red text on button)
- the order in which the modifiers are applied is from top of window to bottom: so TRIM get applied before PREFIX for example
- if you want to change the order just select any modifier, COMMIT, and then select the second

Find the details in the latest posts of the thread

Final scripts are always in Reapack.


g

Last edited by Gianfini; 09-04-2017 at 08:54 AM.
Gianfini is offline   Reply With Quote
Old 07-27-2017, 06:26 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Very nice gui, well done !
X-Raym is offline   Reply With Quote
Old 07-28-2017, 02:14 AM   #3
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 743
Default

Thank you Gianfini very nice.
But one problem : it's seem impossible to continue when alert show : "please select at least one item".
OK reload the alert
Sumalc is offline   Reply With Quote
Old 07-28-2017, 08:20 AM   #4
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Quote:
Originally Posted by Sumalc View Post
Thank you Gianfini very nice.
But one problem : it's seem impossible to continue when alert show : "please select at least one item".
OK reload the alert
Yes I confirm. It's a bug.

I'll fix it soon and post the fix here

G
Gianfini is offline   Reply With Quote
Old 07-28-2017, 12:58 PM   #5
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Very nice Gianfini! You took my script to a higher level! Great GUI too!

Another bug: When having a track selection and you change mode to Items, the script crashes.

There is an additional bug, that is present in my script too: script crashes when confronted with empty items (I am going to fix that in my script, so don't bother with that, take it from mine)

A request: instead of having a Reset button (which is not so useful, since the user can always exit the script without committing), could you make an Undo last action and a Redo last action button?

Finally, just an idea: why should there be a modifier order? I think it would be better just to apply whatever action one wants, when one presses a button, to the preview list of the tracks/items. With the undo button, you can undo the last change if you didn't like it. When the preview list is as you like, then you simply commit.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-28-2017, 02:40 PM   #6
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Hi I uploaded 2.1

Fixed the track - item changes

Fixed the continous "Please select at least on item" window, that didn't stop.

Let me know if the fixes work.

About empty item issue I'll wait your fix, I think is enough to check if acttake is nil and use the item index instead.

About Amagalma UNDO request you can already UNDO any modifiers. Just open it again and delete all text inside and it will be undone. For CASE modifier just click the active CASE MODIFIER and it will deactivate.
Example: say you replaced DRUM with TAMBURINE. If you change your mind (even after having inserted other modifiers) just open REPLACE and delete text from the two field (leave them empty) and the substituion will be undone, while the other modifiers will still be in place. try it.

But yes... if you add the undo request with the NO FIXED ORDER request then it make sense! It would be a much different code based on a sequence of commands... so yes I know how to make it but I need more time. I'll use the spare time in my August vacation for a version with user defined sequence + undo.

g

Last edited by Gianfini; 07-28-2017 at 02:50 PM.
Gianfini is offline   Reply With Quote
Old 07-28-2017, 02:51 PM   #7
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

@Amagalma I have no time to open a Reapack database.. so if you want I'll be glad if you can upload it among your Reapack scripts

g
Gianfini is offline   Reply With Quote
Old 07-28-2017, 02:55 PM   #8
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Oh, nice! I didn't know about the undo!

I uploaded my new version (v1.1) to ReaPack, which fixes the empty item bug, and I added two more actions (Keep and Clear).

In order to fix the empty item bug you have to go to each onClick function and add after local acttake = reaper.GetActiveTake( itemId ), this:
Code:
if acttake then
...(the code)
end
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-29-2017, 10:41 AM   #9
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

ver 2.2: fixed the empty item crash

In next version I will borrow the KEEP functionality from amagalma, while the clear is achievable simply by using replace with ".*" in the first field and nothing in the second.

I already started coding the request of Amagalma of having multi-level UNDO instead of single modifier UNDO as current version. Will see if it's more usable

g
Gianfini is offline   Reply With Quote
Old 07-30-2017, 04:31 AM   #10
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

ver 2.3 and 2.3U

Added the KEEP functionality (amagalma borrowed script)

Made a version of the script with multilevel UNDO (it was easier than expected), choose the one you like the most. With the new script you can UNDO each single modification before committing and apply each modifier as many times as you want, in the order you choose

@amagalma: is that answering your request?

le me know
g
Gianfini is offline   Reply With Quote
Old 07-30-2017, 01:20 PM   #11
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thanks Gianfini! I'll try it now and tell you.

I am uploading them to ReaPack too.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-30-2017, 01:54 PM   #12
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Gianfini, after a very quick test the UNDO version works! Thanks!It would be better though, if it saved an undo state every time the names in the preview list change, and not every time a button is pressed regardless if names change.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 07-30-2017, 03:56 PM   #13
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Quote:
Originally Posted by amagalma View Post
Gianfini, after a very quick test the UNDO version works! Thanks!It would be better though, if it saved an undo state every time the names in the preview list change, and not every time a button is pressed regardless if names change.
Ok, I can adjust this. Next version.

G
Gianfini is offline   Reply With Quote
Old 07-31-2017, 10:16 AM   #14
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default New ver

Ver 2.4U: UNDO point not added if no modification occourred to track/items (as per Amagalma request), better button behavior when inactive, corrected some cornerstone case issue

Updated in the original post

g
Gianfini is offline   Reply With Quote
Old 08-01-2017, 03:37 AM   #15
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 743
Default

Thank you, work fine now.
May be not the target of this script or redundant, but why not add possibility to edit item(s) or track(s) name?
Sumalc is offline   Reply With Quote
Old 08-01-2017, 05:36 AM   #16
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Quote:
Originally Posted by Sumalc View Post
Thank you, work fine now.
May be not the target of this script or redundant, but why not add possibility to edit item(s) or track(s) name?
Wow! Non destructive editing.. yes it's feasible but I'll think about it during next weeks

Now I need someone to upload it on Reapack (I don't have my own repository)

G
Gianfini is offline   Reply With Quote
Old 08-01-2017, 01:46 PM   #17
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

VERSION UPDATE 2.5U: I added single line editing as per SUMALC request and extensive help on replace pattern magic characters

please test!

should be final

EDIT 2.6U: some issue fixed, now should be final

g

Last edited by Gianfini; 08-03-2017 at 06:00 AM.
Gianfini is offline   Reply With Quote
Old 08-05-2017, 12:57 PM   #18
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I uploaded them to ReaPack. Thanks for the updates!

P.S. Gianfini, if you are to change anything, please change the scripts that are uploaded to ReaPack, so I don't have to edit each time manually the headers so that they conform to ReaPack rules. Thanks!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-05-2017, 02:27 PM   #19
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 743
Default

Thank you very much Gianfini, everything for me is ok.
Sumalc is offline   Reply With Quote
Old 08-20-2017, 05:22 AM   #20
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

For my use, I have added the Clear button and the ability to keep scrolling the name list when keeping pressed the mouse button.
I uploaded this version as v2.62 to ReaPack. If you don't like the additions you can always revert to v2.6
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-21-2017, 01:51 PM   #21
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Super, very good

G
Gianfini is offline   Reply With Quote
Old 08-21-2017, 07:45 PM   #22
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

* v2.65 (2017-08-22)
+ Code tidying-up and optimization
+ Edited the Replace Help. Help opens in the Console so that one can continue using the script when Help is displayed
+ Pressing the Commit button creates an undo point in Reaper's Undo History

For a next version:
- fix bug: I seem I broke the Undo... oops!.. :S
- add Redo ability
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 08-22-2017 at 03:49 AM.
amagalma is offline   Reply With Quote
Old 08-22-2017, 03:49 AM   #23
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

v2.66 (2017-08-22)
+ Fixed Undo which was broken in v2.65
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 08-22-2017, 04:27 PM   #24
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

* v2.71 (2017-08-23)
+ Reapack header correction
+ amagalma additions:
+ Script remembers last window position
+ Replace Help now opens in a new window. You can resize the font and window with the mousewheel. Font/window sizes are remembered
+ Accompanied by unindexed script "amagalma_Track-Item Name Manipulation Replace Help"
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 08-22-2017 at 04:51 PM.
amagalma is offline   Reply With Quote
Old 08-23-2017, 01:00 AM   #25
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

I adjusted the original post.

I'll update the images when I have little more time

g
Gianfini is offline   Reply With Quote
Old 08-23-2017, 10:04 AM   #26
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

* v2.8 (2017-08-23)
+ amagalma additions:
+ Added Redo functionality
+ a lot of code tidying-up & optimization

Hopefully, this is the last version






P.S. Gianfini, I removed all the unnecessary code and references to our names in the script (who did what, who modified what etc) and set both of us as co-authors.
Code:
@author amagalma & gianfini
P.S.2 I suggest you change the thread's title to "Track-Item Name Manipulation v2"
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 08-23-2017 at 11:59 AM.
amagalma is offline   Reply With Quote
Old 08-25-2017, 03:02 AM   #27
Luster
Human being with feelings
 
Luster's Avatar
 
Join Date: Nov 2015
Posts: 642
Default

Thanks for that great handy script! Reminds me of the multiple rename tool of TotalCommander - everything you need in one package. Wonderful.
Luster is offline   Reply With Quote
Old 08-25-2017, 04:40 AM   #28
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Thread name changed

I'll bring the new screenshot on the first post as soon as I reach a computer (now working on mobile)

I'd say this is the final renaming tool!

G
Gianfini is offline   Reply With Quote
Old 08-28-2017, 12:19 AM   #29
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default Ver 2.83 just fixes

Few little fixes.

Fixes
1. there was wrong HELP TEXT for the REDO button when inactive in many cases
2. RESET button did not lit red when REDO was possible (in case UNDO was not possible). But hitting reset actually did reset the REDO states. Now when RESET does something it is always lit red
3. REDO no more possible when branching new actions ...
4. Fixed single line editing, as it was crashing when clicking on an empty line in the list, and help was not showing up

the third topic means for example

1. act1
2. act2
3. act3
4. undo
5. undo (now 2 redo are possible)
6. act4 (now no redo should be possible as new action is branched, in 2.81 redo act3 was possible)

g

Last edited by Gianfini; 09-04-2017 at 08:55 AM.
Gianfini is offline   Reply With Quote
Old 09-03-2017, 02:13 PM   #30
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

New version is uploaded to ReaPack
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 09-05-2017, 11:56 AM   #31
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

I'm VERY grateful for this tool thanks.
It doesn't seem to recognize Empty items.

I would glady welcome that feature.
lexaproductions is offline   Reply With Quote
Old 09-05-2017, 01:02 PM   #32
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

It also seems that I can't replace with "Nothing". Then what's the best way to erase a specific word from a name?
lexaproductions is offline   Reply With Quote
Old 09-06-2017, 01:37 AM   #33
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Quote:
Originally Posted by lexaproductions View Post
It also seems that I can't replace with "Nothing". Then what's the best way to erase a specific word from a name?
Hi, yes you can. Just put the word in the Pattern field (of Replace button) and nothing in the Replacement

See animation here where I replace PM with nothing



g
Gianfini is offline   Reply With Quote
Old 09-06-2017, 01:40 AM   #34
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Quote:
Originally Posted by lexaproductions View Post
I'm VERY grateful for this tool thanks.
It doesn't seem to recognize Empty items.

I would glady welcome that feature.
Thank you!!

Empty Items have no name... only takes have names. Thus cannot be renamed.

Empty items (can) have notes (this is what you see when you double click and key in a word) and show notes in the item, unlike normal items.

g
Gianfini is offline   Reply With Quote
Old 09-06-2017, 05:37 AM   #35
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

Quote:
Originally Posted by Gianfini View Post
Hi, yes you can. Just put the word in the Pattern field (of Replace button) and nothing in the Replacement...
Thanks for taking the time to look into this.

It seems that there's something funny that happens if there is a "hyphen" in the name

Can you try to erase a track name that's:
"abc-abc" ???

For me it does not appear to be working.
lexaproductions is offline   Reply With Quote
Old 09-06-2017, 05:38 AM   #36
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

Quote:
Originally Posted by Gianfini View Post
...Empty items (can) have notes (this is what you see when you double click and key in a word) and show notes in the item, unlike normal items.

Any plans in including Items notes in the script?
lexaproductions is offline   Reply With Quote
Old 09-06-2017, 05:51 AM   #37
Gianfini
Human being with feelings
 
Join Date: Jan 2015
Posts: 794
Default

Quote:
Originally Posted by lexaproductions View Post
Thanks for taking the time to look into this.

It seems that there's something funny that happens if there is a "hyphen" in the name

Can you try to erase a track name that's:
"abc-abc" ???

For me it does not appear to be working.
Ah ok, easy one. The "hyphen" as well as * \ [] ? and other characters are special characters used for complex selection. To escape their functionality just preceed them with a %.

So to erase abc-abc Pattern must be abc%-abc and leave Replace empty

PS. To see all special characters and what you can do with them right-click on Replace button. For example you can replace all numbers with a space, or all vocals with an X.

g
Gianfini is offline   Reply With Quote
Old 09-06-2017, 03:32 PM   #38
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

* v2.84 (2017-09-07)
+ amagalma addition:
+ The script now supports empty items' notes too
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 09-06-2017, 03:54 PM   #39
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

Wow, you guys rule!!!
lexaproductions is offline   Reply With Quote
Old 09-07-2017, 06:15 AM   #40
zakb
Human being with feelings
 
Join Date: Jul 2009
Posts: 9
Default

Fantastic work- this is super useful in game audio pipelines. Speaking of which... this would be killer if it worked on the Region/Marker list. It would make region management and rendering super powerful
zakb 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 12:55 PM.


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