Displaying a message when changing to songpart "strophe 1"

Hi there,

I want to display a message (for example “play the brass on C3”), when I change to the songpart “strophe 1” in a song.

How can I do that with GPScript?

I´m searching, but I can´t find the solution.

Thx

The only thing I know ist DisplayTemporaryMessage() in an Activation Callback in a rackspace, e.g.

HTH - BBB

Edit: to be a bit more precise: you can add the DisplayTemporaryMessage() also in Variation or Songpart callbacks within the Rackspace or Song script…

Why do you want to use GPScript?

You can just add an action in a song part to display such a message

2 Likes

Nice!

Is there a way to control the duration of this message. It disappears after a few seconds.

Try this:

  • Put a Text Label widget in the rackspace that is associated with that song part
  • Give the widget a handle under Widget Properties > Advanced tab > OSC/GPScript handle
  • In that song part add an Action to Set Widget Caption , choose the handle you gave the label widget and add your message.
  • Now when you switch to that song part, the message will be displayed in that text label widget.

message

If you want a permanent message, then use a label widget and use the action that sets the widget caption.

1 Like

Thx, but this is not the right solution for me. It needs to much space in the Rackfile. I thought about a Text-Message, which is displayed free.

Where do you want such a text message to be displayed?

The best solution would be somewhere over the rackspace, there is plenty room to display something up in the middle or so.

You can use the HUD extension.

Link: Head-Up Display (HUD) Extension

1 Like

Great…!

Only one last question: What would be the scriptline to activate this extension on sonpart change. Is that possible to do that?

Each song has its own script (Window > Song Script Editor).

This example code works via the song part index, where you can specify unique text to be displayed for each song part. It could be altered to check for the song part name if you commonly re-order the parts.

You could also store some of the settings for the HUD window in a script file on your hard drive, and have each song script reference it. That way you can globally change things like the font size or window size without needing to open and edit every individual script.

Var
   FontSize : Integer = 64 // Default font size
   Width : Integer = 750 // Width of the message window
   Height : Integer = 150 // Height of the message window
   Duration : Integer = 3000 // Time in milliseconds the window is displayed
   
// Called automatically after script is loaded
Initialization
    GPHUD_SetFontSize(FontSize)
    GPHUD_SetNamedPositionAndSize("Center",Width,Height)
    GPHUD_SetDuration(Duration)
End

// Called when you switch to a song part
On Songpart(oldSongpartIndex : integer, songpartIndex : integer)
    Select
        songpartIndex == 0 do
            GPHUD_DisplayText("Play Horns on C3")
        songpartIndex == 1 do
            GPHUD_DisplayText("Split Change: Bass from C1")   
        songpartIndex == 2 do
            GPHUD_DisplayText("Chorus: Go For It!")  
    End
End
1 Like

Hi rank13,

THANK YOU SO MUCH! You made my day :wink:

Great!

1 Like