|
|
|
09-06-2016, 04:06 PM
|
#1
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
ReaScript: Song switcher for live use
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 additional actions are included for communicating to the main script: - cfillion_Song switcher - Switch to previous song.lua
- cfillion_Song switcher - Switch to next song.lua
- cfillion_Song switcher - Switch song by MIDI CC.lua
- cfillion_Song switcher - Switch to queued song.lua
- cfillion_Song switcher - Reset data.lua
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 for convenience. This means that a song spanning from 7:45 to 9:12 in the project is displayed as 00:00 to 01:26 on the web interface.
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; 05-19-2019 at 01:27 PM.
|
|
|
09-06-2016, 09:46 PM
|
#2
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Seems like a good idea !
But
Quote:
Originally Posted by cfillion
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
|
|
|
10-14-2016, 11:59 AM
|
#3
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,268
|
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.
|
|
|
10-14-2016, 03:58 PM
|
#4
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
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
|
|
|
10-15-2016, 03:33 AM
|
#5
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,268
|
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.
|
|
|
10-15-2016, 04:05 AM
|
#6
|
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,268
|
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.
|
|
|
01-18-2017, 12:58 AM
|
#7
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
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.
|
|
|
03-25-2017, 04:16 PM
|
#8
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
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.
|
|
|
03-27-2017, 04:51 AM
|
#9
|
Human being with feelings
Join Date: Dec 2016
Posts: 373
|
Yes, this is useful!
|
|
|
05-08-2017, 12:50 PM
|
#10
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
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
|
|
|
|
11-21-2017, 07:57 AM
|
#11
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
|
Thanks for sharing, looks simple and powerful. Interesting idea to code the time flow into the track counts themselves, vertically, instead of using the normal horizontal regions. Now we have two directions for coding time flow:
-horizontal regions (normal)
-vertical song switcher (by cfillion)
Using both methods together would be next step or another powerful option, even for intersong flow jumps.
Example: 90 minute film with many scenes, and every scene could be a "song" of song switcher to simplify everything.
|
|
|
01-14-2018, 11:54 AM
|
#12
|
Human being with feelings
Join Date: Nov 2017
Location: Gloucestershire, UK
Posts: 223
|
Thanks for a very useful script.
|
|
|
11-23-2018, 02:53 AM
|
#13
|
Human being with feelings
Join Date: Sep 2012
Location: Not exactly here
Posts: 44
|
Please excuse my tardiness...
Is there a way with this script to have it jump to a precise location while changing song?
I mean, something like this:
- "0. xxx" song starts at 1.1.00;
- when I switch to song "1. xxx" the Play locator jumps to, say, 24.0.00;
- again, next song (2. xxx) starts at 84.0.00, and as soon as I select it, the locator jumps there.
Thank you for any help.
__________________
"You know, Albert, your problem is that you can’t count!"
(Fritz Kreisler to Albert Einstein, while playing together in a string quartet).
|
|
|
11-23-2018, 04:25 AM
|
#14
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Yes, it can move the cursor to the start of the first item in the song by enabling the "onswitch > seek" mode in the right click context menu (or using the "onswitch" button).
|
|
|
11-23-2018, 04:33 AM
|
#15
|
Human being with feelings
Join Date: Sep 2012
Location: Not exactly here
Posts: 44
|
Quote:
Originally Posted by cfillion
Yes, it can move the cursor to the first item in the song folder by enabling the "onswitch > seek" mode in the right click context menu (or using the "onswitch" button).
|
Doh..!
Maybe I couldn't find it because I was trying this feature with empty test songs...
Thanks!
__________________
"You know, Albert, your problem is that you can’t count!"
(Fritz Kreisler to Albert Einstein, while playing together in a string quartet).
|
|
|
11-23-2018, 05:48 AM
|
#16
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
I placed a link to this thread in the "Live" subforum.
-Michael
|
|
|
11-29-2018, 11:50 PM
|
#17
|
Human being with feelings
Join Date: Dec 2006
Posts: 668
|
ALL BRILLIANT - thank you...
I'm about to have another go at LIVE CONFIGS after years of wishing I'd tried even harder back in 2012/13/14/15 :-)
And now, BACK TO ---> Forum : REAPER for Live Use - see you there everyone!
https://forum.cockos.com/forumdisplay.php?f=55
All great now with the LIVE Use forum!
... with gratitude :-)
/m
|
|
|
03-31-2019, 08:03 AM
|
#18
|
Human being with feelings
Join Date: Mar 2019
Posts: 10
|
Hi, thank you for this script, the only thing that I've been having troubles is when I make a large set list, in some songs the sound goes crackling, for example in a song that I play lot of piano. Is there any solution? I don't matter if the song switcher takes up to 10 seconds I can handle that.
|
|
|
04-12-2019, 10:55 PM
|
#19
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Is "Do not process muted tracks" enabled in Preferences > Mute/Solo? Song switcher mutes all songs except for the active one, relying on this setting to keep CPU usage in check. (I assume you have already tested the problematic songs separately to ensure no buffer underrun happens when outside of the live project.)
Last edited by cfillion; 04-12-2019 at 11:45 PM.
|
|
|
04-13-2019, 02:27 AM
|
#20
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Beware that "Do not process muted tracks"is only adhered to for unarmed tracks: you need to see a small white "M" in a red square instead to the meter max value. (I was recently hit by this.)
-Michael
|
|
|
04-22-2019, 07:46 AM
|
#21
|
Human being with feelings
Join Date: Mar 2019
Posts: 10
|
Quote:
Originally Posted by cfillion
Is "Do not process muted tracks" enabled in Preferences > Mute/Solo? Song switcher mutes all songs except for the active one, relying on this setting to keep CPU usage in check. (I assume you have already tested the problematic songs separately to ensure no buffer underrun happens when outside of the live project.)
|
It is:
https://imgur.com/a/uaXNNwB
If I play with only one song, everything is OK, but while I'm using this script and playing a fast piano part using sustain pedal the sound loses quality.
|
|
|
04-22-2019, 08:09 AM
|
#22
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Try not arming any tracks for recording within songs. Instead, create input tracks outside and use routing to send the MIDI from the keyboard to the VSTi track in the songs.
I structure my projects like this: https://i.imgur.com/ZnFMX4B.png
Last edited by cfillion; 04-22-2019 at 08:48 AM.
|
|
|
04-25-2019, 07:16 AM
|
#23
|
Human being with feelings
Join Date: Apr 2018
Posts: 211
|
Drag and Drop
Hi sir, very nice script for live band, tks.
I was wondering, is there by any chance a way to REMAKE a set list.
So some night we play those songs in that order and the other night in that order, etc...
Would be nice to be able to create SetList or at least move songs by drag and drop on the playlist script.
Do you think it's doable?
tks
Seby
|
|
|
04-25-2019, 09:12 AM
|
#24
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
That's a very nice idea! I've added drag and drop reordering in the latest update, available now.
|
|
|
04-25-2019, 09:47 AM
|
#25
|
Human being with feelings
Join Date: Apr 2018
Posts: 211
|
Quote:
Originally Posted by cfillion
That's a very nice idea! I've added drag and drop reordering in the latest update, available now.
|
WOW, what a nice services!
If you have time someday, a way to save sets would be great.
Tks sir
Merci
Seby
|
|
|
05-07-2019, 07:06 AM
|
#26
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Quote:
Originally Posted by cfillion
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
|
I am not at all knowledgeable with Scripts but I did a miniature one that takes a 7 bit parameter derived from a Midi CC message that is assigned to an action the script provides. The script acts according to this value.
Does the song switcher provide such an action that would allow to start a dedicated song selected by a Midi message ?
-Michael
|
|
|
05-07-2019, 07:41 AM
|
#27
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
I don't use/have those fancy MIDI controllers with CC-sending knobs, so I haven't implemented that. You can do it with a script:
- Obtain which MIDI message triggered it using reaper.get_action_context
- Signal song switcher to activate a song using one of the two commands below
Code:
-- activates the next song (current song + n, n can by negative to go backwards)
reaper.SetExtState('cfillion_song_switcher', 'relative_move', '1', false)
-- activates the song with a given title (partial match)
reaper.SetExtState('cfillion_song_switcher', 'filter', '17. Autumn Serenade', false)
reaper.SetExtState('cfillion_song_switcher', 'filter', '17', false)
reaper.SetExtState('cfillion_song_switcher', 'filter', 'Autumn Serenade', false)
I can add an absolute_move command to activate a specific song index (rather than trackname-based) if necessary.
Last edited by cfillion; 05-07-2019 at 08:18 AM.
|
|
|
05-08-2019, 02:47 AM
|
#28
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
To me an "absolute move" sees very appropriate for a range of applications that thrive to remote-control the playback either directly from some hardware, or by messages resulting from some kind of pre-processing. (A "stop" also seems like desirable.)
Right now, for me this was just a theoretical question, as I don't intend to add any playback feature to my live setup. But triggered by a discussion in another thread, I do thinks that if I would consider to use such a functionality, I supposedly would like to us a kind of MIDI controller to selectively start a song or sound snippet.
(See -> https://forum.cockos.com/showthread.php?t=213568#3 )
Thanks for listening,
Michael
Last edited by mschnell; 05-08-2019 at 03:03 AM.
|
|
|
05-08-2019, 05:45 AM
|
#29
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
I'll see what I can do next week, once my own show is over.
(I consider Song switcher to be more about switching between sets of VSTi tracks and MIDI/audio routing than as a playback system... though it can be used as that too)
Last edited by cfillion; 05-08-2019 at 05:58 AM.
|
|
|
05-08-2019, 08:40 AM
|
#30
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
In the "Live Usage" subforum there are multiple threads with questions how to do a live (e.g. keyboard-) setup that not only can switch sounds / patches to be played, but additionally allows to fire "Backgourd tracks" or sound snippets that are not generated by a VST but have been pre-recorded by the artist. In many cases the artists does not use a computer screen/mouse/keyboard during the show.
Obviously some kind of sampler can be used for that issue, but to me it seems more appropriate / easier doable, to use Reaper tracks to hold the content (which now even can be Midi or multiple audio tracks).
Here the "Song Switcher" seems like a perfect tool.
-Michael
|
|
|
05-08-2019, 09:19 AM
|
#31
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Quote:
Originally Posted by mschnell
In the "Live Usage" subforum there are multiple threads with questions how to do a live (e.g. keyboard-) setup that not only can switch sounds / patches to be played, but additionally allows to fire "Backgourd tracks" or sound snippets that are not generated by a VST but have been pre-recorded by the artist. In many cases the artists does not use a computer screen/mouse/keyboard during the show.
|
Oh, absolutely. I misunderstood what you meant in the previous post.
In fact most of the songs I make for shows have a backing track I've pre-rendered (and/or run to a click) and rely heavily on automation. So I made Song switcher with that usecase in mind. However, since I don't usually leave the backstage, a screen/mouse/(computer) keyboard is perfectly fine with me.
I'll have a go at adding an "Activate song by CC value" action next week. I agree that could be very useful for some and should be easy to make as explained above.
Last edited by cfillion; 05-08-2019 at 09:34 AM.
|
|
|
05-08-2019, 09:51 AM
|
#32
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Let me know when you publish an update and I'll be happy to test it.
-Michael
|
|
|
05-12-2019, 04:56 PM
|
#33
|
Human being with feelings
Join Date: May 2019
Location: England
Posts: 3
|
Pause/play feature?
Hi, this is a wonderful script thank you, the folder system is good way of organising lots of songs in one project as a set/play list. The drag and drop reordering feature is a huge plus!
I'm placing my songs along the timeline at tempo change markers with an audio and midi track in each folder. The very top Reaper track (outside all folders and common to all songs) contains empty items which I'm using for lyrics with 'Note Reader' (so it can read everything on the same track).
This means that Song Switcher continues playing at the end of each selected song (except for the last in the line). Is there any way to make the player stop playing at the end of a track/folder and go to the next song on the list, selected ready to play?
Also, say for instance while song #03 is playing, I use the up/down arrows to choose my next song, for example song #09. Song #09 flashes as if it is cued-up but I have to press 'enter' to actually select it, if I do this while song #03 is playing it will be cut off. Even at the end of song #03 I still have to press enter and then the space bar. It would fantastic if in this example when song #03 ends, song #09 is automatically selected ready to play.
I used a thing called "Sweet Midi player" for many years that does just that, it was called 'Jukebox' mode.
These extra features in your script would be a huge benefit for live performance.
Best Regards.
|
|
|
05-14-2019, 07:50 AM
|
#34
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
I might want to use the song switcher together with my (rather complex) Live Setup done in Reaper. As the Live project already features a lot of tracks, I would like to use the song switcher in a differently managed scope. I think the optimal scope would be another project tab.
Now the signals for switching the "songs" would come in via Midi and are received by a track in the main (Live) project.
Is there a way to "route" Midi messages or Reaper actions from one project tab to another and there to the song switcher to have it start and stop audio / Midi tracks that are located in that project tab ?
Thanks for any comment,
-Michael
Last edited by mschnell; 05-14-2019 at 09:51 PM.
|
|
|
05-15-2019, 09:52 PM
|
#35
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
... bump ...
-Michael
|
|
|
05-19-2019, 01:25 PM
|
#36
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
Quote:
Originally Posted by mschnell
Let me know when you publish an update and I'll be happy to test it.
|
Done! The latest update adds a "Switch song by MIDI CC" action. Let me know if this works with your MIDI controller.
Quote:
Originally Posted by Ravine
This means that Song Switcher continues playing at the end of each selected song (except for the last in the line). Is there any way to make the player stop playing at the end of a track/folder and go to the next song on the list, selected ready to play?
Also, say for instance while song #03 is playing, I use the up/down arrows to choose my next song, for example song #09. Song #09 flashes as if it is cued-up but I have to press 'enter' to actually select it, if I do this while song #03 is playing it will be cut off. Even at the end of song #03 I still have to press enter and then the space bar. It would fantastic if in this example when song #03 ends, song #09 is automatically selected ready to play.
|
I would use SWS marker actions for this ( http://sws-extension.org/). Creating a marker named !1016 would run the action "Transport: Stop" after the play cursor reaches it with up to 33 ms of jitter.
I've added a "Switch to queued song" action to help with this. You can have it run at any point in a song by adding a marker named !_RS0845295095eb2b87e149f040514acb7ebbcf61f4. Switch to next song is !_RS1f1c5f5406d0a36f4b780fd6ab7b54a8006b9e69.
|
|
|
05-19-2019, 02:19 PM
|
#37
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Sounds great !!!
Any idea about the "other Project Tab" issue ?
Thanks again,
-Michael
|
|
|
05-19-2019, 02:54 PM
|
#38
|
Human being with feelings
Join Date: Apr 2008
Location: Brasov Romania
Posts: 140
|
We use a custom script that sends wifi midi messages via rtp from Bandhelper to Reaper,
The songs are in a random order in Reaper but you can make your playlist in Bandhelper, each song has a midi cc message attached at the beginning corresponding to a midi cc preset in Bandhelper and is triggered buy double touch press in Bandhelper playlist.
|
|
|
05-19-2019, 09:40 PM
|
#39
|
Human being with feelings
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,785
|
Could you explain how the use of Bandhelper is associated with this thread ?
Thanks,
-Michael
|
|
|
08-22-2019, 01:44 PM
|
#40
|
Human being with feelings
Join Date: Aug 2019
Posts: 3
|
Installation guide ??
Hi,
I really want to try the Song Switcher but I have problems get it running.
Is there a step by step for a non-programer like me ??
I have Phyton and the script loaded, I can launch the GUI but need more help on how the songfiles and the project should be structured and named, how to get them into
the gui/menu etc.
An example project would be nice.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:39 AM.
|