Old 01-19-2019, 12:05 PM   #1
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 1,639
Default satisfying "Expand selected track" on track selection

I'm on the quest to find a satisfying solution for "Expand selected track" on track selection.

All available scripts (HeDa's enlarge selected track in the Track inspector and mpl's enlarge selected track) are defer scripts (trying to avoid that) and very slow with bigger projects. I guess this lies in the nature of LUA and the permanent calls from the script. Further more, I want to be able to turn off the function at any time.

So far, I found 2 promissing solutions:

1. the preference: Always show full track control panel on armed tracks



Advantage:
- can be toggled via SetIntConfigVar

Downside:
- the track is too small, even when expanded (hence, the size is not configurable)
- when toggling via SetIntConfigVar on the same track, only the track gets zoomed, but the items stay small. Only doing a next -> previous track solves this


2. Using Breeders "SWS/BR Project track selection action - Set" with "View: Expand selected track height, minimize others"



Advantage:
- the track expansion is great (maybe even a bit too much, but that's okay)
- works very fast, even when quickly skipping thru a project

Disadvantage:
- no toggle can be set, you can only "clear" the action. In order to re-enable the action, you have to enter the desired action ID in a dialog box (-> not scriptable)


Are there any ways (that I have overlooked) to optimize one of these 2 solutions?
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 01-23-2019, 07:42 AM   #2
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 1,639
Default

Concerning solution 1:

I found a way to solve the SetIntConfigVar not being reflected immediately in the arrangement.

The script is the following:

Code:
reaper.SNM_SetIntConfigVar('zoomshowarm', reaper.SNM_GetIntConfigVar('zoomshowarm', 0) == 1 and 0 or 1)
reaper.TrackList_AdjustWindows(false)
Now, all we need is the ability to configure the amount of track height.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 01-23-2019, 11:26 AM   #3
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 551
Default

This script looks good

Code:
newheight=350

function main()

    reaper.PreventUIRefresh(1)
    trk_count=reaper.CountSelectedTracks(0)
    for i = 0, trk_count - 1 do
    trk=reaper.GetSelectedTrack(0, i)
    height=reaper.GetMediaTrackInfo_Value(trk, "I_HEIGHTOVERRIDE")      
    reaper.SetMediaTrackInfo_Value(trk, "I_HEIGHTOVERRIDE", newheight)        
  end
end

reaper.UpdateArrange()
main()
Probably not what you need ?
__________________
I've been imitated so well I've heard people copy my mistakes. - Jimi Hendrix
J Reverb is offline   Reply With Quote
Old 01-23-2019, 04:41 PM   #4
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 1,639
Default

That script will zoom the track, yes. But not *always* when switching tracks.
Only, when you execute it.
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 01-26-2019, 02:02 AM   #5
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 338
Default

Maybe I got this wrong - but couldn't you make a custom action and
run it with mouse modifiers?

Like:
Select Track under mouse
Expand selected track height, minimize others

and connect it to mousemodifiers left click (or what ever)

Or maybe a combination with some reascript and custom action
and mouse modifier.

Sorry if I misunderstood the whole thing - its saturday morning ;-)
__________________
ToDoList MusicMath Donation Mark4celeste Frid i ditt hjärta Eve & the Fisherman on Spotify
tompad is offline   Reply With Quote
Old 01-26-2019, 06:38 AM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 1,639
Default

Ah thanks you! The mouse modifier is actually a great idea! I didn't think of that :P
Sometimes you can't see the wood for trees...
__________________
My Reascripts forum thread | My Reascripts on GitHub | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote
Old 01-27-2019, 11:36 PM   #7
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 338
Default

Quote:
Originally Posted by _Stevie_ View Post
Ah thanks you! The mouse modifier is actually a great idea! I didn't think of that :P
Sometimes you can't see the wood for trees...
Indeed - been there too! :-)
__________________
ToDoList MusicMath Donation Mark4celeste Frid i ditt hjärta Eve & the Fisherman on Spotify
tompad 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 02:56 AM.


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