User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 26 of 26

Thread: Gap between audio tracks?

  1. #21
    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)
    Ha, wouldn't you know, that seems to have done it.
    As it is now
    Start of frame - Play intro on channel 32
    sample position of intro is 3510 - play and loop main on channel 31

    Seamless transition to the looping part!

  2. #22
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Sep 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The gap is partly because of the condition you're using: "sample is not playing" has to wait for the sound to end before it becomes true, which is why there's a gap. Also, despite being able to preload samples in the Data Elements, that option has never worked flawlessly for me in this situation.

    Anyway, I had to figure out how to do this in my own game so here's how it works for me. Play BOTH samples on Start of Frame and pause the looping one, then resume the Looping sample when a counter reaches a certain value. Basically, you have to force Fusion to load the samples into memory.

    Start of frame:
    . Play "intro" on channel 1.
    . Play and loop "mainloop" on channel 2.
    . Pause channel 2.

    Always:
    . Add 1 to "Counter"

    "Counter" = 289
    . Resume channel 2.
    Attached files Attached files

  3. #23
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Nice tip Nim!

  4. #24
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    664
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I know this is a MAJOR necrobump lol, but i've found another alternative that works as well and is pretty easy to code too.

    Here it is:

    Start of Frame:
    - Play "sample" (whichever name you choose for the sample)

    Create a new event for "Compare Two General Values", right click the speaker icon and select "Sample Position", type in the name of your sample, set the compare to "greater or equal to" and type in the sample position of the end of the track (in milliseconds).

    You'll get:
    SamplePosition("Sample")>=107900 (the 107900 is just an example time)
    - Play sample
    - Set position of sample "Sample" to 5602" (another number just for an example)

    To recap lol -

    Start of Frame:
    - Play "sample"

    SamplePosition("Sample")>=107900
    - Play sample
    - Set position of sample "Sample" to 5602"

    This lets you use the same track and loop it seamlessly at the end point of the track to the desired loop point towards the beginning. Hope this helps someone out!

  5. #25
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nim View Post
    The gap is partly because of the condition you're using: "sample is not playing" has to wait for the sound to end before it becomes true
    Wouldnt it be possible then to create an Event starting with a GREEN condition that is allways true ( GREEN conditions triggering independantly of the Event List sequence ) and add the 'sample is not playng' Codition to the same event?
    Would this be able to solve the gap issue maybe?

  6. #26
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Oct 2016
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there, I'm finding this problem too.
    The method above works in Windows when I test it, but in Android "SamplePosition" doesn't work.

    ChannelPosition instead works, which does register in Android... but when trying to use it to loop a sound as in the above example, it still introduces a gap once exported to Android.

    Anyone have a solution?

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Some MIDI tracks are muffled
    By fawfulfan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd July 2012, 01:44 PM
  2. Synchronizing audio tracks
    By Nifflas in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th April 2011, 12:08 PM
  3. Is there an extension which tracks mouse movement?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th March 2011, 09:53 PM
  4. tire tracks?
    By Physco in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th March 2009, 12:15 AM

Posting Permissions

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