How to detect the end of a song?

thebitmasterthebitmaster PRO Posts: 75
Is there any programmatic or interrupt-driving way to detect the end of a song? For instance, if I have several songs, and want to start the second one as soon as the first is over. I realize I could externally gather the information about how long each song is, etc, and maybe put it into a table or something, but I'd prefer GameSalad be smart enough to tell me "the song is over now." Is there a way to do this already in the software?

Thanks!

Comments

  • POMPOM Member Posts: 2,599
    You can't detect it unfortunately , However , what you can is see how long it is in term of seconds (use quick time to check it) and use a timer in game salad to start a new event (or play a new song) after a that time has passed.

    Roy.
  • MotherHooseMotherHoose Member Posts: 2,456
    if you have in your finder window the Show View Options > Show item info √ed you can see the duration of the sound/music (though it is rounded-up to nearest second)

    unless you have a good fade-out/fade-in there will be a slight gap
    if the game selects the song … then you can combine all in one huge soundFile
    if the player selects the song … gameAttributes will be needed
    (thought @Tynan had posted something great about music tracks ???)

    I think this might be doable with a table
    rowLabel: song | col: duration
    then a gameAttribute text to put the songName in label

    and have a Timer: After: tableCellValue(table,"game.label", 2)
    but, still lots of work as we have to select the sound to play and can't just get the cellValue to do so

    at least the duration is easily accessed and the sounds start fast …

    @};- MH
  • thebitmasterthebitmaster PRO Posts: 75
    Ok, thanks for the ideas!
  • CloudsClouds Member Posts: 1,599
    @thebitmaster

    "Is there any programmatic or interrupt-driving way to detect the end of a song"

    If it's a soft rock ballad listen for crying.
  • thebitmasterthebitmaster PRO Posts: 75
    Ha!
Sign In or Register to comment.