Edit: About storing and restoring the script state...there is a bug/oversight in reaper: project (id) is freed from memory before script runs its atexit() function.
The script has to be closed first (from its main menu or by closing the script window)
Then the project has to be saved
Finally reaper can be closed
Here's a preview of a script I've been working on: (This is an old version - see latest posts for new versions)
Thanks!
There's an alpha version available in post#1.
Right click on script window: shows the main menu
Right click on button: remove or rename button
Quote:
Originally Posted by Klangfarben
This is really fantastic! Would there be any way to assign a key command or MIDI CC to enable/disable specific tags/groups?
I'm not sure...maybe that would be possible with reaper.get_action_context:
Code:
Lua: reaper.get_action_context()
is_new_value,filename,sectionID,cmdID,mode,resolution,val = reaper.get_action_context()
Returns contextual information about the script, typically MIDI/OSC input values.
val will be set to a relative or absolute value depending on mode (=0: absolute mode, >0: relative modes). resolution=127 for 7-bit resolution, =16383 for 14-bit resolution.
Notes: sectionID, and cmdID will be set to -1 if the script is not part of the action list. mode, resolution and val will be set to -1 if the script was not triggered via MIDI/OSC.
Omg, I won't even use reaper without this....
Bugs or not implemented yet:
1. You can add same folders again and again, maybe some check to only add new ones?
Omg, I won't even use reaper without this....
Bugs or not implemented yet:
1. You can add same folders again and again, maybe some check to only add new ones?
That's a good suggestion. Also, new tracks that are added to a tagged folder should stay visible.
(I don't know what should happen when user changes folder state from "parent" to something else )
Quote:
Originally Posted by Sexan
FR:
can it vertically align little sooner?
I'll add some layout options.
This script doesn't work correctly with non-English language packs (I assume). The buttons and REAPER's TCP/MCP are updated when the script "sees" certain words in last undo point name:
Code:
local proj_change_count = GetProjectStateChangeCount(0)
if proj_change_count > last_proj_change_count then
local last_action = reaper.Undo_CanUndo2(0)
-- try to catch changes in track list
if last_action:find("track") and not last_action:find("selection") then
on_track_list_change(last_action)
end
last_proj_change_count = proj_change_count
end
Hi, this seem really useful! Here are my thougths:
- it should remember the last docker it was attached in. Also I think the first run should be in a floating window
- somehow incorporate folder colors. Maybe BG of a button in a track color and when the tag is selected, put a yellow(confirugable) border around it
- click into the empty area should unselect/show all tracks
- tags should be remembered on a project level
- tag ordering options - like in a project / alphabetically / user order by dragging? (remembered and freely switchable to other options)
- options - show only tagged tracks, select only tagged tracks, maybe expand only tagged folders/compress others
- UI-wise - center buttons horizontally, center buttons vertically
- on creating new tag from track selection, pop up name dialog
- focus should not stay on the script window (now when unselecting all tags, it stays). Maybe also when the mouse is moved out of the boundaries of the window switch focus to tracks. I want to play/pause any time.
-switchable horizontal/vertical ordering (e.g. I want them all in a collumn all the time in a floating window)
- tags should be selectable not only by clicking, but also by draggin over them
- "clear all" action buried somewhere deeper
- two types of tags - "folder type" and "bunch of tracks type".
With the folder type, any track added to the folder is added to the tag. When the folder is disassembled, the tag type is changed to the "bunch of tracks". This tag type could be either internal or a feature. In a feature case, buttons should be changed to mirror tag type. Maybe soft-edged button (like) for a "bunch of tracks" and a rectangular for a "folder type"
- slight accenuaton of a button on a hover would be nice
- shift+click to select a range of buttons
- create new tag from selected tags - sum all tracks to the new tag
wow spk this is going to be super useful... I do have a wish even for the alpha version...
what can I edit to not have it automatically put itself into the docker at the top of the screen... I'd like to have it go into a different docker at the right side of the arrange window?
Many thanks for sharing your script which is very useful.
Like bFooz says, tags are not saved in the project, it's so sad!
That would be great to add this functionality to the script
Thanks!
Load/save script data is not implemented yet - this is an alpha version.
I don't know yet where to store the script data:
save as project ext state -> data might be too big for this
to script path -> I should put this script to ReaPack (for easier maintenance)
to project path -> ...maybe
Quote:
Originally Posted by Sexan
Omg, I won't even use reaper without this....
Bugs or not implemented yet:
1. You can add same folders again and again, maybe some check to only add new ones?
I have fixed this and will upload the new version soon.
Regarding storing I can show you the way of my people, how we do it
Thanks! I should add this to ReaPack first. Should I just run reapack-index from my local repo (my computer)? I added the script header - it should be ReaPack-ready
We create tags(=buttons) from tracks, so those tracks become "tagged" when they are assigned to a tag.
And there is an option to "show only tagged tracks". This would mean to show only tracks that are assigned to any tag. In reality this means to show only tracks which are assinged to a selected tag.
Maybe just rename the option to "Show only selected" or "Link selection and visibility".
Anyway, this is going to be so useful script. Did not Heda made something like this embedded in the track inspector?
Thanks! I should add this to ReaPack first. Should I just run reapack-index from my local repo (my computer)? I added the script header - it should be ReaPack-ready
No need to run reapack-index yourself when submitting to the ReaTeam repository: it's run automatically after uploading or sending a pull request.
1. Add header (examples, documentation) 2. Upload files to the desired category directory in a new branch 3. Create a pull request for that branch.
If everything is OK reapack-index puts the Pull Request status in green (or in red in case of errors).
Maybe for someone would be useful that when no tag is selected, no tracks are visible, kind of a hard version of "show only selected". But I cannot tell now if that would be useful enough.
spk... thanks so much for solving the docker issue... that works great now
I'm looking forward to whatever else you add\change because this lua is so useful for moving around on big projects
PS: question... is there some code tweak that would make the tags in the GUI always show in a vertical order rather than
automatically arrange themselves? In fact, could there also be a way to drag the tags into whatever order I wanted?
So that say a tag made recently can be put anywhere in the list of tags?
We create tags(=buttons) from tracks, so those tracks become "tagged" when they are assigned to a tag.
And there is an option to "show only tagged tracks". This would mean to show only tracks that are assigned to any tag. In reality this means to show only tracks which are assinged to a selected tag.
Maybe just rename the option to "Show only selected" or "Link selection and visibility".
Anyway, this is going to be so useful script. Did not Heda made something like this embedded in the track inspector?
This script is based on Tracktion 6 track tags, that's why there's "show only tagged tracks" :
Quote:
Originally Posted by cfillion
No need to run reapack-index yourself when submitting to the ReaTeam repository: it's run automatically after uploading or sending a pull request.
1. Add header (examples, documentation) 2. Upload files to the desired category directory in a new branch 3. Create a pull request for that branch.
If everything is OK reapack-index puts the Pull Request status in green (or in red in case of errors).
Very nice, thank you!
Quote:
Originally Posted by bFooz
Maybe for someone would be useful that when no tag is selected, no tracks are visible, kind of a hard version of "show only selected". But I cannot tell now if that would be useful enough.
Maybe also "inverted" behavior for tags: selecting a tag (button) would hide all tracks that are tagged to that button.
Quote:
Originally Posted by Sexan
Here you go my good sir!
I've commented all edits with "-- GORAN" (needed to convert track to guid some minor adjustments)
PS: question... is there some code tweak that would make the tags in the GUI always show in a vertical order rather than
automatically arrange themselves? In fact, could there also be a way to drag the tags into whatever order I wanted?
So that say a tag made recently can be put anywhere in the list of tags? __________________
Not sure how other user feel,but for me solo & mute would be mind blowing (shift click to solo or something so its buttonless, space saving)
Haha never been so excited regarding scripts as this one,my standard projects are 60+ tracks so this will be life savior,donation incoming!
shift + left click = solo
shift + right click = mute
(+option to swap)
and then for additional function like "exclusive solo" or "unsolo all" use the same additional modifiers as are hardbaked into reaper itself over track panel buttons (e.g. ctrl+alt on solo button = exclusive solo). Notice the usage of the shift there, so using the shift in the script is the best option.
say, we have guitar in tag1, bass in tag2, and both in tag3.
We select tag1, only the guitar is visible, but that is also a part of the tag2. So maybe in this case use 50% yellow to highlight tags where some tracks from them are already visible.
And maybe not each time 50%, but calculate how much yellow it would be from a ratio of visible/all tracks from that particular tag. But I am not too sure about usability of this, this would need to be tested.
No problem, will help as much as I can, btw probably a bug but folder tags are automatically created when creating a folder or having a folder in project
No problem, will help as much as I can, btw probably a bug but folder tags are automatically created when creating a folder or having a folder in project
Hopefully fixed now:
Code:
ReaTeam Scripts/Various/Track Tags (based on Tracktion 6 track tags)
v0.2 by spk77 – February 26 2018
- Fix: Update track list when all tags removed
- Fix: Don't auto-create buttons
- (Fix) Adding new tracks to already tagged folder automatically tags the new tracks
- Create tags from folder parents: don't create new buttons if folder(s) already tagged