Custom MIDI foot controller using an ESP32

I’ve built a custom MIDI foot controller using an ESP32. It displays the song name and changes the screens for each footswitch to represent the song part. Is it possible to send a MIDI command from GP indicating which song number is selected when I select a song in Gig Performer? This would allow me to jump from 1 song to another quickly. My current solution is to have “next” and “prev” song buttons on my controller, but sometimes I want to jump quickly 10 songs ahead. Rather than pressing “next” 10 times it would be awesome if I could just select the song in gig performer and it could send out a midi command indicating which song number I selected. I see there’s a way to send a MIDI command when a song is selected, but does that need to be programmed for every set list created? Is there a generic way to setup Gig Performer so it always sends the same midi command for “Song 1” and “Song 2”, etc?

You may need to use Gig Script for this. There is callback for when a song changes (which provides the selected song index). You can then send out a midi message and use the song index as the PC number or a CC value.

1 Like

Thanks, I’ll look into that!

Actually I’m not seeing a callback for when a song changes, only for rackspace change. Or is this not the correct place to be looking? List of callbacks — GP Script 3.6.0 documentation

That’s a GP 3 manual :slight_smile:
Try this (GP5 manual)

2 Likes

Oh whoops! First result when googling “gig performer gig script” didn’t notice I was looking at old docs. Thanks!

This worked, thanks for your help @rank13 and @edm11.

In case anyone else is trying to do this here’s how:

  1. Create a MIDI out block in Global Rackspace. Right Click to give it an OSC/GPScript Handle. Mine is “ToPedalBoard”
  2. Create a script: Window → Global Rackspace Script Editor
    Here’s the script that sends a MIDI note on channel 3 velocity 55. The note is the song index
> var ToPedalBoard : MidiOutBlock
> 
> On Song(oldSongIndex : integer, newSongIndex : integer)
>     var note : NoteMessage
>     note = MakeNoteMessageEx(newSongIndex,55,3)
>     SendNowExternal(ToPedalBoard,note)
> 
> End
2 Likes