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)
Not sure if I'm missing something obvious here, but, how do I add tracks to an existing tag (button)? If I select a track\s that I want to add to a tag, I only seem to have the option of creating a new tag. If this is not possible then surely it must be on the TODO list.
Really love this script. I also think being able to modify tracks in an existing tag, especially tracks that are added after the fact would be very useful.
I would also suggest a couple more additions although these aren't deal breakers by any means.
1) Being able to change the order of the tags in the list. You have to get a bit creative with the naming right now to have tags show up in the order you want. I think hopi and bFooz suggested this as well.
2) Right now, when you click on a new tag, the previous selected tags are still selected. It would be useful to have an option to de-select previous tags when clicking on a new tag. For example, if I click on a tag, it would automatically de-select all other tags, and when I did a shift click it would add the newly clicked tag to the previously selected tags. Similar to bFooz's suggestion re: solo/mute but without the soloing/muting.
3) Right now all the deselected tags are grey. It would be great to be able to set the default unselected tag to a different color. That way I could match the track colors in my template. So for example, all the strings tags blue, all the brass red, etc. bFooz made a similar suggestion matching folder colors.
4) In terms of the layout selections, it would be extremely useful to be able to change the size of the tags. So if I take the track tags and put it on a docker or its own window I can set it to fill the entire space. Right now, the tags are pretty small so using it on a touchscreen is difficult. If I could change the size of the track tags, I could put it on a touchscreen and Bob's your uncle.
Still trying to get my head around linking a tag to a midi cc to turn on/off. No luck so far but I'll keep trying.
Thank you so much again for this amazing script. It really is brilliant.
Last edited by Klangfarben; 05-15-2018 at 09:44 PM.
ReaTeam Scripts/Various/Track Tags (based on Tracktion 6 track tags) [v0.3.0 -> v0.3.1]
v0.3.1 by spk77 – November 26 2019
- A complete overhaul of the mouse/GUI code (still WIP)
- Space bar: run action "Transport: Play/stop"
- Left click (on the GUI) and drag to move the script window
- Drag and drop to dock (Positions: left, top left, top right and right)
- Double click on the GUI to (temporarily) show all tracks
- Restore focus back to REAPER on mouse button release (TCP, arrange view or selected envelope)
(This new quick docking system probably won't be working for everyone, but I wanted to include it anyway...)
ReaTeam Scripts/Various/Track Tags (based on Tracktion 6 track tags) [v0.3.0 -> v0.3.1]
v0.3.1 by spk77 – November 26 2019
- A complete overhaul of the mouse/GUI code (still WIP)
- Space bar: run action "Transport: Play/stop"
- Left click (on the GUI) and drag to move the script window
- Drag and drop to dock (Positions: left, top left, top right and right)
- Double click on the GUI to (temporarily) show all tracks
- Restore focus back to REAPER on mouse button release (TCP, arrange view or selected envelope)
(This new quick docking system probably won't be working for everyone, but I wanted to include it anyway...)
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)