Cantabile Development Blog

Follow the development of music software Cantabile

Articles | Full Index | RSS Feed


New Song and Sub-Session Format Variables

I've just put up a new experimental build that has some new format string variables:

SubSessionSongFormatVariables.png

Mostly I think these are self explanatory, but just in case:

  • SubSessionName - the name of the currently loaded sub-session
  • SubSessionProgramNumber - the assigned program number for the currently loaded sub-session
  • SubSessionIndex - the zero based index of the position of the loaded sub-session in the sub-session list
  • SongName - the name of the loaded entry in the song list
  • SongIndex - the zero based index of the position of the loaded song in the song list
  • SongIndexXD - the zero based index of the position of the loaded song in the song list, eXcluding Disabled items.
  • SongProgramNumber - the assigned program number of the selected song in the song list.

In the case where there is no loaded song or sub-session:

  • The name will be an empty string
  • The index will be -1
  • The program number will be 0

The main purpose I see for these variable is with triggers launching external scripts. For example, a trigger that launches an external program whenever a sub-session is loaded, passing the name of the sub-session or song as a command line argument.

One more tip: if you prefix the command line of a execute script trigger with alert: the trigger will display the resolved string as a message box... which I think will be mainly useful for debugging triggers that launch scripts. eg: if a script doesn't seem to be running correctly and you want to see the command line it's being invoked with, just edit the trigger, insert the alert: prefix and invoke the trigger again to see the resolved command line.

This will be in the next official build, or available now in the experimental build (along with a few other miscellaneous fixes).

Posted on February 27, 2010

Share This

Leave A Comment

All comments will be reviewed for spam before being displayed.