View Single Post
Old 04-19-2013, 11:09 PM   #98
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,488
Default

Quote:
Originally Posted by Tony Ostinato View Post
i'm doing this unusual live setup with reaper:


http://youtu.be/l5ar_3nGx2w

i mention i like to be able to use actions to quickly select tracks but i can't go beyond track 99 without climbing up track by track after selecting 99.

would it be possible to do a reacript that mutes all tracks then selects the track number and unmutes it, even if you want to select tracks above 99?

thanks!!!!
Select/unmute track 100 and mute other tracks:

Code:
from reaper_python import *
from contextlib import contextmanager

@contextmanager
def undoable(message):
    RPR_Undo_BeginBlock2(0)
    try:
        yield
    finally:
        RPR_Undo_EndBlock2(0, message, -1)

with undoable("Select track / mute others"):

    muteAllTracks = 40341
    unSelectAllTracks = 40297
    selectTrack = 100
    unMuteTracks = 40731
    verticalScrollToSelTrack = 40913

    if selectTrack <= RPR_CountTracks(0):
        RPR_Main_OnCommandEx(muteAllTracks, 0, 0)
        RPR_Main_OnCommandEx(unSelectAllTracks, 0, 0)
        RPR_SetTrackSelected(RPR_GetTrack(0, selectTrack - 1), 1)
        RPR_SetMixerScroll(RPR_GetTrack(0, selectTrack - 1))
        RPR_Main_OnCommandEx(unMuteTracks, 0, 0)
        RPR_Main_OnCommandEx(verticalScrollToSelTrack, 0, 0)

Last edited by spk77; 04-20-2013 at 04:22 AM. Reason: added "vertical scroll to selected tracks"
spk77 is offline   Reply With Quote