User Tag List

Results 1 to 8 of 8

Thread: How to handle sound on same channel?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question How to handle sound on same channel?

    I like to put every sound effect on a different channel so I can have better control of its volume. I do get problems however when there is a sound playing rapidly on one channel, for example a thud when an object collide with something, I may have that to play on channel 5, but if 3 of the objects collide close to each other the sound will cut 2 times before it plays fully the 3:rd time. Any suggestion on how to handle this?

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello outcast! You could probably use an event that decides which channel to play the sound on by math instead of selecting it yourself!

    What you need is:
    an alterable value, any will do, even a global value.
    A certain span of channels you're willing to devote to this, for example 6,7,8,9,10
    An event that says like this:

    On event
    Play sample on a specific channel

    and then you set the channel to Alterable Value A("Object") where "Object" is the active that holds the alterable value.
    The Alterable value will have an initial value of 6 if you're going with the span I proposed earlier. After that you need to increase the value of the alterable value by one, this could perhaps be done in the same event, I'm not sure.
    Finally, you will need an event that checks to see if the alterable value is 10 or higher, in which case the alterable value will be set to 6.

    Sorry if it all comes out a bit rambly! If you wonder about anything, don't hesitate to ask!

  3. #3
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tested this myself now, and it works
    The drawback is that it takes up quite a few channels, I don't know exactly how many you'd need to get a smooth playback.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Nice I will try this out! Maybe I will just go for 3 channels though, I already have 20 occupied so its only 12 left : p. About setting it back to 6, can this be done with the "mod" function? I have not really grasped how mod works fully, but I believe it is used for stuff like this?

  5. #5
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mod might work ^^ I'm such a math-newb that it didn't occur to me, however since you aren't increasing the alterable value when you call upon it in the sound event, you'd still need an event that changes the alterable value so the next time the sound is called upon, it will be one value higher. If you could somehow alter the variable in the same line where you are calling upon it, and you could implement the mod function, it would be a bit shorter and more neat!

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You cannot have two sounds on the same channel; the purpose of channels is to allow playing multiple sounds at once.
    Working as fast as I can on Fusion 3

  7. #7
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    LB is right, that's the whole purpose of being able to utilise individual channels. I tried a few methods like this for my Android development. If the sample is being played numerous times, by default MMF2 will scan and play the sample in an open channel...
    Want to learn Clickteam Fusion 2.5?




  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    I think I have got it to work well now! I am also using one long sample with about 10 different sound effects and setting the sounds position at random on each hit so it sounds a bit dynamic. I don't know if this is a better method though then to actually split it up in 10 different sound files and pick one at random? (apart from having less files :p )

Similar Threads

  1. BUG? Sound Channel Condition
    By tom79 in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 17th June 2013, 12:58 PM
  2. Playing 'sound effects' on a specific Channel.
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th June 2012, 10:49 AM
  3. First free sound channel starting from...
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th May 2012, 11:53 PM
  4. Sound channel question...
    By MattKapa in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 17th January 2012, 08:48 AM
  5. randomize sound effects in a specific channel
    By 1234cb in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd August 2011, 12:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •