Code:
MACRO PlaySong arg0
;;arg0 = song index
LDA arg0
STA songToPlay
LDA fireSoundByte
ORA #%00000100
STA fireSoundByte
ENDM
please use the script viewer located in scripts -> defined scripts in the project hierarchy, it displays practically all the variables and macros you ever need to access unless you're doing something advanced enough to mess with the static engine data which you're not really supposed to mess with anyway unless you're making fundamental engine changes.
at any rate, the macro PlaySong displays the labels holding this data, PlaySong can be used to load a song index, which is then stored into songToPlay, so im assuming that checking "songToPlay" in a room would return the index of the currently selected song for that room.