YesNoOk
avatar

Any way to know a sound's length (Read 1200 times)

Started by Odb718, March 26, 2017, 02:40:04 pm
Share this topic:
Any way to know a sound's length
#1  March 26, 2017, 02:40:04 pm
  • *****
  • Shame on you!
    • USA
I'm basing a move around a sound effect. I'm just guessing how many tic the sound actually lasts for. I was wondering if there was a way to tell.
FF3 is telling me the sound is 6.192 seconds long. I have other sounds that FF3 list a smaller fraction of a second for so I'm thinking it's pretty accurate.
When in game, I'm pausing after I know the sound has stopped. My stop test has a medium of 330 tics. I've done it multiple multiple times. Even with the hit reaction time of 18 tics it's still not over 6 seconds.

Is there a method to find out how many tics a sound plays for exactly??
vVv Ryuko718 Updated 10/31/22 vVv
Re: Any way to know a sound's length
#2  March 26, 2017, 05:00:34 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
FF3's length appears to be pretty accurate.  I just exported a sound it says is 5.99991 seconds, and opened it in GoldWAV which shows 6.000

So you just math it out, 60 ticks per second (default mugen game speed)

6.192 x 60 = 371.5

This will only change if the game speed is turned up in mugen's config... because I don't think audio playback is sped up... I think the consensus is not to worry about this because no one should really be playing other game speeds.

Re: Any way to know a sound's length
#3  March 27, 2017, 06:00:56 am
  • *****
  • Shame on you!
    • USA
yeah the confusion is happening because it's nearly 40 tics fast.
I was hoping for a trick in game to record a var or something where I get a set answer while playing. My speed is normal so idk. It sucks mugen only has 2 things for sound, start and stop.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Any way to know a sound's length
#4  March 27, 2017, 01:33:45 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
If you use a VarAdd with ignorehitpause, it can serve as a countdown to when your sound will end

Re: Any way to know a sound's length
#5  March 27, 2017, 01:51:39 pm
  • *****
  • Shame on you!
    • USA
Say what with the who'zits?
How does the varadd stop adding once the sound has stopped?
vVv Ryuko718 Updated 10/31/22 vVv
Re: Any way to know a sound's length
#6  March 27, 2017, 02:14:31 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
I'm struggling to figure out the problem heh
I thought you were maybe trying to trigger when the sound ends regardless lf any pauses that occur.
So in this case, if var(X) >= 372 then the sound ended (you still have to convert ticks to secs)

If the sounds are playing back faster on your system than 60 ticks / second, then that is unusual.  I split it up a bit, but Jailbot's ice cream win pose sound effects were all on one long audio track.  I was able to calculate the keyframes without guessing and checking - everything sync'd up pretty well on the first try.  If you are that much out of sync from 60 ticks/sec, in 6 seconds, somethings wrong