User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Multiple samples on one channel

  1. #1
    No Products Registered

    Join Date
    Jun 2006
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple samples on one channel

    Why MMF2 does not support multiple samples on one channel? I just would like to play all the "normal" samples on channel 1 ja music on channel 2. It would be easy to hande the volume.

    And if I just set "Play sample" and then set main volume 25 it plays well. But if I now set music to play on channel 2 and it's volume to 100 it's very quite.

    And even if I set sample.wav volume to 25 and:
    Every 1:00 -> Play sample "sample.wav" it sometimes plays with 25 and sometimes with 100. Bug?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    Queensland, Australia
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    There are 32 channels for this reason, when you use the play sample function it just finds the next free channel. This is a intentional functionality I believe.

    Also if you set the volume AFTER the play event then it works every time:

    Every 1:00 ->
    Play Sample "sample.wav"
    Set Volume "same.wav" to 25

  3. #3
    No Products Registered

    Join Date
    Jun 2006
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    "Every 1:00 ->
    Play Sample "sample.wav"
    Set Volume "same.wav" to 25"

    That didn't helped. The volume is sometimes 25 and sometimes 100. But if there is only 32 channels, it means I can use only 32 samples?

    EDIT: And what then If I use weapon's sample on channel 1. It repeats the sample every 0:10 and it does not work very well.

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,095
    Mentioned
    123 Post(s)
    Tagged
    2 Thread(s)

    Re: Multiple samples on one channel

    You should lock a specific channel, set the volume of this channel to 25 and play this sample on this channel. The other Play Sample actions will ignore this channel when they look for a free channel.

    It repeats the sample every 0:10 and it does not work very well
    That's quite a short duration, maybe you could add a blank at the end of the sample and set the sample to loop?

    Otherwise check the format of the sample : if it's a .ogg sample convert it to .wav format, .wav files use less CPU resources than OGG files, it's better for small samples.

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    I mean if I just shoot every 0:10 and it plays a weapons fire sample. It does not have time to finish the first sample untill the second comes.

    See my example:
    www.ferror.net/temp/sound.mfa

  6. #6
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,095
    Mentioned
    123 Post(s)
    Tagged
    2 Thread(s)

    Re: Multiple samples on one channel

    Ah yes, in this case you have to use the normal Play Sample action so that it can play the sound on several channels at the same time.

  7. #7
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    Could you add an action "Play sample on channel range" which plays the sample in the first empty slot or oldest slot in the given range?

    Perhaps also a "play sample at specific volume" action (deprecating the old one?), to avoid having to specifically specify the channel in order to set the volume of the sample.

  8. #8
    No Products Registered

    Join Date
    Jun 2006
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    Dynasoft has good ideas. But anyway my problem is still there. If I use play sample I can not set volume. And even if I set main volume to 25 the music channel (2) is too low.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Jul 2006
    Location
    Germany
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    Quote Originally Posted by Yves
    You should lock a specific channel, set the volume of this channel to 25 and play this sample on this channel. The other Play Sample actions will ignore this channel when they look for a free channel.
    Now I understand why I failed when I tried to create a simple routine for player-defined sound volume. I looped through all channels at start of frame and set the volume the player had adjusted in main menue - but without locking samples to specific channels

    Jarzka, maybe you could simply set a flag while player is shooting. Then set sound on/off accordingly.
    Flag=ON and Shooting.wav not playing -> play the wav
    Flag=OFF -> Stop sample
    This way you could also use a sample with multiple shots/longer duration on a single channel with defined volume setting. And it's better than an Every 0:10 event.

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple samples on one channel

    To be really honest, it's a design flaw that a sample volume is set after it have started to play. I know that MMF2 does start to play a sound instantly when the 'play sample' action is triggered, and since a small part (a millisecond) can have been played before the 'set sample volume' action is triggered (even if it's the following action in the event), you can clearly hear a digital 'pop'. I've had this problem, and I've been forced to always set a channel volume, then play a sound on that specific channel.

    To get the best sounding results, all the properties (volume, pan, sample rate) must be set the moment the sample starts.

    As Dynasoft said, a 'play sample at specific volume' would be good, but I think there should be a 'play sample with [volume] [pan] [sample rate (-1 = no change)] [repeat count (-1 = infinite, 0 = no repeat, 1 = repeat 1 time, etc...)]

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Handling Multiple Channel Connections
    By netninja in forum Lacewing
    Replies: 3
    Last Post: 2nd November 2018, 06:42 PM
  2. Multiple panned samples?
    By Yikes in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 1st May 2012, 03:11 PM
  3. Multiple Samples
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 25th May 2009, 01:34 AM
  4. Sound cuts out with multiple samples
    By Skeets in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th July 2007, 12:01 AM
  5. stop channel\samples
    By SoftWarewolf in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th October 2006, 10: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
  •