YesNoOk
avatar

How to fix looping sound problem ? (Read 6422 times)

Started by JeanBureau, May 04, 2015, 01:14:01 pm
Share this topic:
How to fix looping sound problem ?
#1  May 04, 2015, 01:14:01 pm
  • ****
Jotaro has a sound problem,

When star platinum does his famous attack throwing hundreds of punches, and yells "ora ora ora ora..." if the opponent hits him before he finishes (thus throws the last punch) then the sound of "ora ora ora" will keep on playing forever which is obviously very annoying.

The only time it would stop would be when he does that attack again, and is successful at finishing this attack wihtout being interrupted

How can I fix it ?
My stages exhibition
https://www.youtube.com/watch?v=FO2YZO7ut5I

Find them at: http://www.trinitymugen.net/forum/index.php?action=tpmod;dl=cat294

You are free to use the materials in the stages I released before 2014. Credits are always appreciated.
Re: How to fix looping sound problem ?
#2  May 04, 2015, 01:37:46 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
First, give that sound a channel; something unique and greater than 0, like 5 or 4.

In the State -2, you could add something like this:

Code:
[State -2]
type = StopSnd
trigger1 = stateno != xxxx ; the stateno of your move
channel = # ; the channel you set earlier
ignorehitpause = 1

-[Все слова это только слова.]-
Re: How to fix looping sound problem ?
#3  May 04, 2015, 10:57:01 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
If it is a quick sound effect, I try to avoid the "loop" altogether.  I have yet to encounter any negative side effects of this method, there shouldn't be any issue with doing it this way.

Just use a timemod in the trigger

trigger1 = Time%60 = 0 ;Sound effect is 1 second long

Re: How to fix looping sound problem ?
#4  May 05, 2015, 07:40:17 am
  • ****
First, give that sound a channel; something unique and greater than 0, like 5 or 4.

In the State -2, you could add something like this:

Code:
[State -2]
type = StopSnd
trigger1 = stateno != xxxx ; the stateno of your move
channel = # ; the channel you set earlier
ignorehitpause = 1

Yeah I am trying that. I don't really know if it worked because I would have to wait for Jotaro to be interrupted which is completely random. Sometimes it doesn't happen at all for a couple of games and another time you would get that shit for 3 matches in a row...

I guess I'll wait a few days after playing for a decent amount of times and if that sound doesn't loop anymore, I'll consider the problem solved.

Cheers for the answers guys.
My stages exhibition
https://www.youtube.com/watch?v=FO2YZO7ut5I

Find them at: http://www.trinitymugen.net/forum/index.php?action=tpmod;dl=cat294

You are free to use the materials in the stages I released before 2014. Credits are always appreciated.
Re: How to fix looping sound problem ?
#5  May 06, 2015, 11:04:04 pm
  • ***
  • MAX 330 MEGA PRO-GEAR SPEC
    • UK
If it is a quick sound effect, I try to avoid the "loop" altogether.  I have yet to encounter any negative side effects of this method, there shouldn't be any issue with doing it this way.

Just use a timemod in the trigger

trigger1 = Time%60 = 0 ;Sound effect is 1 second long

That'll break/overlap whenever the game isn't being played at Normal speed, though.

Yeah I am trying that. I don't really know if it worked because I would have to wait for Jotaro to be interrupted which is completely random. Sometimes it doesn't happen at all for a couple of games and another time you would get that shit for 3 matches in a row...

I guess I'll wait a few days after playing for a decent amount of times and if that sound doesn't loop anymore, I'll consider the problem solved.

Cheers for the answers guys.

You could try having P2 throwing fireballs at different times during the move to test a reasonable amount of situations.
Re: How to fix looping sound problem ?
#6  May 07, 2015, 06:49:27 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com

Re: How to fix looping sound problem ?
#7  May 08, 2015, 01:59:40 pm
  • ****
okay I can confirm solution 1 didn't work, unless i did something wrong.

If it is a quick sound effect, I try to avoid the "loop" altogether. 

 The loop is needed imo. Unless I misunderstand what you mean, but this "ora ora" needs to be repeated sometimes several times (for the super, where he says it like 15 times... ora ora ora ora ora ora ora ora ora ora ora ora ora....  :jester: )

Quote
That'll break/overlap whenever the game isn't being played at Normal speed, though.

I am playing at speed "Fast 2"

other suggestions ?
My stages exhibition
https://www.youtube.com/watch?v=FO2YZO7ut5I

Find them at: http://www.trinitymugen.net/forum/index.php?action=tpmod;dl=cat294

You are free to use the materials in the stages I released before 2014. Credits are always appreciated.
Re: How to fix looping sound problem ?
#8  May 08, 2015, 03:07:23 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
The loop is needed imo. Unless I misunderstand what you mean, but this "ora ora" needs to be repeated sometimes several times (for the super, where he says it like 15 times... ora ora ora ora ora ora ora ora ora ora ora ora ora....  :jester: )

trigger1 = Time%60 = 0
This means it will trigger every 60th tick (time = 60, time = 120, etc)

If your sound effect is 15 ticks in length you would use trigger1 = Time%15 = 0, so it would trigger every 15th tick (15, 30, 45, 60, etc)

According to the poster above me, though, this would not work properly for someone playing MUGEN at a different rate than 60 ticks/sec.  I don't know how common it is for people to play the game at different rates than the default.

Re: How to fix looping sound problem ?
#9  May 08, 2015, 04:26:42 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com

-[Все слова это только слова.]-
Re: How to fix looping sound problem ?
#10  May 09, 2015, 03:15:20 am
  • ****
Code:
[State 220, Voice]
type = PlaySnd
trigger1 = time = 25
trigger2 = time > 25
trigger2 = var(0) = 2
value = 1000, 1
channel = 0
loop = 1

[State -2]
type = StopSnd
trigger1 = stateno != 220 ; the stateno of your move
channel = 4 ; the channel you set earlier
ignorehitpause = 1


And here is below the entire piece of code for the statedef.
There are 2 occurrences where this sound (1000, 1) is played, so I wrote the stopSnd code twice

Spoiler, click to toggle visibilty
My stages exhibition
https://www.youtube.com/watch?v=FO2YZO7ut5I

Find them at: http://www.trinitymugen.net/forum/index.php?action=tpmod;dl=cat294

You are free to use the materials in the stages I released before 2014. Credits are always appreciated.
Last Edit: May 09, 2015, 03:19:13 am by JeanBureau
Re: How to fix looping sound problem ?
#11  May 09, 2015, 05:42:00 am
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
Hmm, I'm a little confused here. The StopSnd should be in State -2 or -3, ie. Under StateDef -2, .etc. The channel should be 4 for the sound and the StopSnd channel. They have to match up. You've got channel 4 in one and 0 in the other it seems.

-[Все слова это только слова.]-
Re: How to fix looping sound problem ?
#12  May 09, 2015, 08:52:26 am
  • ****
My bad, having channels that don't match was like writing no code at all.

so I tried 2 things:

- putting channel 0 for both
- putting channel 4 for both

in both cases the result is fucked. Both channel 0 led to no sound at all, and both channel 4 led to something else that was also fucked anyway.

So I'm back to the original code so far
My stages exhibition
https://www.youtube.com/watch?v=FO2YZO7ut5I

Find them at: http://www.trinitymugen.net/forum/index.php?action=tpmod;dl=cat294

You are free to use the materials in the stages I released before 2014. Credits are always appreciated.
Re: How to fix looping sound problem ?
#13  May 10, 2015, 06:34:27 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Hmm, I'm a little confused here. The StopSnd should be in State -2 or -3, ie. Under StateDef -2, .etc. The channel should be 4 for the sound and the StopSnd channel. They have to match up. You've got channel 4 in one and 0 in the other it seems.

What he said.  Make sure the StopSnd is inside [Statedef -2], not inside [Statedef 11010].

Statedef -2 is an always active state, which is why the StopSnd must be executed from there.

Re: How to fix looping sound problem ?
#14  May 12, 2015, 05:28:20 pm
  • ****
I rewrote the code inside statedef -2 and it didn't work, and now the sound keeps looping everytime I do the move so it's even worse.

I give up lol.

The way its coded is retarded. Looks nothing like the code of the other jotaro I have
My stages exhibition
https://www.youtube.com/watch?v=FO2YZO7ut5I

Find them at: http://www.trinitymugen.net/forum/index.php?action=tpmod;dl=cat294

You are free to use the materials in the stages I released before 2014. Credits are always appreciated.