There are a couple of guys here who shared how to use TouchOSC to display the setlist on an external device. Especially the ideas by @NanoMalefico and @rank13 discussed here are a good start for advanced TouchOSC templates.
My personal problem: it happens so often that we decide to skip some songs or prepone a song that was scheduled to be played later. A fast transition between songs is very important to us that’s why I had the idea to
Preselect a song and later activate it with the press of a button
While I’m playing a song, I want to preselect the desired song by tapping on its name. As soon as I press the „next song“ button (or if I tap the song for a second time) it is immediately activated.
Here’s what it looks like:
The concept behind it: The list in TouchOSC can display 100 song names. It is overlayed with 100 transparent buttons that send an index corresponding to the displayed song name.
A script checks if the received index is the same as the one already stored. In this case the song is directly activated. If not, the index is stored and the preselected song is displayed (top right).
The preselected song is then activated with the button „Song +“.
The script looks like this and is divided into three section:
- To deal with the received preselection indexes
- To deal with the received “go to next song” command
- To update the song indexes and names when songs are switched
var
PreselSongIndex : Integer // To store the song index received from TouchOSC
SongSwitch : boolean = false
// 1
On OSCMessageReceived(m : OSCMessage) Matching "/SongSelect" // When a preselection is received
If InSetlistMode() then
If OSC_GetArgAsInteger(m, 0) == PreselSongIndex then // If the same song has already been preselected
SongSwitch = SwitchToSongByIndex(PreselSongIndex,0) // Directly switch to that song
Else // If the song has not been preselected yet
PreselSongIndex = OSC_GetArgAsInteger(m, 0) // Store the index of the preselected song
OSC_SendString("/NextSngName/", GetSongName(PreselSongIndex)) // Send out the name the preselected Song
End
End
End
// 2
On OSCMessageReceived(index : Integer, m : OSCMessage) Matching "/PrevS", "/NextS", "/NextNextS"
If OSC_GetArgAsInteger(m,0) == 1 then
If InSetlistMode() then
SongSwitch = SwitchToSongByIndex(PreselSongIndex,0) // Activate the preselected Song. If no song has been preselected, the next song in the setlist is activated
End
End
End
// 3
On Song(oldSongIndex : integer, newSongIndex : integer)
PreselSongIndex = newSongIndex+1 // The next song in the setlist is automatically preselected
OSC_SendString("/NextSngName/", GetSongName(PreselSongIndex)) // Send out the name the preselected song
OSC_SendString("/CurSngName/", GetCurrentSongName()) // Send out the name the current song
End
By the way: If you are looking for easy templates (but much much funcationality) look here into this blog: The Lemur and TouchOSC Templates - Gig Performer®