Old 09-06-2016, 04:06 PM   #1
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,273
Default ReaScript: Song Switcher

The purpose of this script is to quickly switch between songs in a single project during live shows. It is a replacement for the slow SWS Snapshots (visibility + mute).

Usage

Each song must be in a top-level folder track named "#. Song Name" ("#" being any number).

After selecting a song, Song Switcher mutes and hides all songs in the project except for the current one. Other tracks/folders that are not part of a song's top-level folder are left untouched.
Song Switcher can also optionally stop playback and/or seek to the first item in the song when switching.

This script works best with REAPER settings "Do not process muted tracks" and "Track mute fade" enabled.

The following actions are included:
  • cfillion_Song Switcher.lua: This is the main script. It must be open to use the others.
  • cfillion_Song Switcher (previous).lua: Goes to the previous song
  • cfillion_Song Switcher (next).lua: Goes to the next song
  • cfillion_Song Switcher (reset).lua: Rebuilds the song list
A web browser interface is also installed as song_switcher.html for remote use (this feature requires REAPER v5.30+ and ReaPack v1.1+). Note that the timecode displayed in the web interface always starts at 00:00. This means that even if a song starts at 7:45 in the project and ends at 9:12, it's displayed as 00:00 to 01:26 on the web interface for convenience.

Download

This script is shared through the ReaTeam Scripts community repository, available from ReaPack.

Screenshots

Demo in docked mode:



Windowed mode:



Web browser interface:


Last edited by cfillion; 03-25-2017 at 04:33 PM.
cfillion is online now   Reply With Quote
Old 09-06-2016, 09:46 PM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 3,206
Default

Seems like a good idea !

But
Quote:
Originally Posted by cfillion View Post
Each song must be in a top-level folder ...
I either do pre-planned song productions. Here each song is a reaper project anyway. Maybe consisting of multiple "Takes" that reside in a Project one after the other (the machine "just runs" while the musicians play.

Or I do live recordings. Here the machine "just runs" as well, the songs reside in the project one after the other.

A script jumping to take or song positions might be helpful (i.e. using a named list of markers or similar).

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 10-14-2016, 11:59 AM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,157
Default

thanks cfillion
This is great

I've added
Code:
  reaper.Main_OnCommand(40042,0) -- go to start of project
  reaper.Main_OnCommand(1016,0) -- stop
in setCurrentIndex function, to go to start and stop each time you switch. But it could be optional. Or maybe just the stop optional.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 10-14-2016, 03:58 PM   #4
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,273
Default

Nice idea heda! I've added a "onswitch" option.

Code:
v1.1
+ add onswitch setting (no action, seek, seek+stop) [p=1742908]
+ exit filter mode if empty when pressing backspace
+ reduce scrolling when there is enough space
cfillion is online now   Reply With Quote
Old 10-15-2016, 03:33 AM   #5
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,157
Default

thanks for the update

I've discovered a bug in REAPER. If I put a video in a child track, along with the backing track. The video is still displayed even if I switch to another song and the parent is muted. But maybe as a workaround, the script could also mute all children tracks, and not only the parent track, or at least mute tracks that have videos on it.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 10-15-2016, 04:05 AM   #6
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 4,157
Default

I was thinking, another solution would be to put all tracks in sequential spacing, not all from the beginning of the project. This way there would be no problem with the video tracks. But then the seek feature should seek the first item in the children tracks. And maybe it is better performance if it mutes all video tracks.
Another advantage of putting songs in sequential order, is that you can also insert tempo in the tempo tracks to match the tempo of each song. It's not a big issue since I also render click tracks as you have in your gif. But it can help if you have delay effects in sync with the backing track.
__________________
HeDaScripts for REAPER | VIP Donations
heda is offline   Reply With Quote
Old 01-18-2017, 12:58 AM   #7
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,273
Default

Song Switcher v1.2

Code:
create a new web browser interface (requires REAPER v5.30+)
improve how the previous docking state is saved
remember window size and position
seek to the first item in the song's children tracks [p=1727151,1743149]
(Screenshot of the bundled web interface is in the first post.)

Last edited by cfillion; 01-18-2017 at 01:05 AM.
cfillion is online now   Reply With Quote
Old 03-25-2017, 04:16 PM   #8
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,273
Default

Song Switcher v1.3

Quote:
* fix detection of start/end time when there are no items in the first few tracks

Web Interface:
* add midi panic and data reset buttons
* disable spell check on the input box
* implement timeline view with seek support and markers
* make spacebar trigger play/stop on desktop
* rewrite with cleaner code
Note that the timecode displayed in the web interface always starts at 00:00. This means that even if a song starts at 7:45 in the project and ends at 9:12, it's displayed as 00:00 to 01:26 on the web interface for convenience.


Last edited by cfillion; 03-25-2017 at 04:33 PM.
cfillion is online now   Reply With Quote
Old 03-27-2017, 04:51 AM   #9
Flaneurette
Human being with feelings
 
Join Date: Dec 2016
Posts: 190
Default

Yes, this is useful!
__________________
I don't know it all, but I know enough.
Flaneurette is offline   Reply With Quote
Old 05-08-2017, 12:50 PM   #10
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 1,273
Default

Song Switcher v1.4
Quote:
* only show mousedown button effect for the left button
* show a context menu on right click
* stop transport before switching songs rather than after
* toggle filter box with single click rather than double click

Web Interface:
* add Lock button to enable read-only mode
* change the color of the play button on pause/record
* confirm tab close in locked mode
* disable pixel interpolation when scaling the timeline
* enhance noscript and fix loading flickering
* implement precise seek on mouse drag in timeline
cfillion is online now   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 08:18 PM.


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