Seamless music transition

0 favourites
  • 9 posts
From the Asset Store
25 Homemade seamless jazzy seamless backgrounds for 2d scrolling or platform games
  • Well C2 loops music seamlessly which is great (always had problems with that in CC and others) but what do you do when it comes to playing an intro, checking if that's finished, then playing and looping the rest of the song? There's always a slight pause before the main part plays..

    I've tried "On Tag Ended" and "Is Playing" inverted but they both do the same thing. Also tried pre-loading both parts. Not sure it's something I can fix on my end :<

  • read the manual

  • Read the thread.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Read my post.

    It seems like C2 is maybe preparing the audio to play it afterward

    Why don't you try and play the loop a bit before you stop the intro ?

    You could play Loop , wait x seconds and then stop Intro

    Edit; Muahahaha ! Got more rep than ya :P !

  • The only thing I can think of is a timer that is the length of the intro. Start the other track just before.

    California How is a comment like that useful? Tokinsom explained 2 perfectly reasonable examples. Put some effort in, and maybe your rep will be as high one day.

  • Rep means nothing. Show me some decent games ;)

    I had considered a timer but I have a feeling there will be inaccuracies (and that wouldn't be very efficient). I'm fairly positive there's nothing to do on our end about it. Perhaps it'll work properly in a node webkit build..lemme try that.

    Nope :T Ashley any input on this?

  • I've found this is browser related. Here's a small experiment.

    OnEndLooping.capx

    IE has a subtle delay (less noticeable in this example, but if you switch to looping the same track, you can here it).

    Chrome has no delay. Firefox has a terribly noticeable delay.

    Also maybe double check that there is no small delay at the end of your intro music file. There was a thread about a small pause being added by the C2 converter, under certain circumstances.

  • I thought that might be the case which is why I tried it out on a node webkit build but it still happens. There is a pause in Chrome but it's less than a second.. Still noticeable though, and moreso with the chiptunes I wrote.

    The music definitely cuts off right at the end as they loop perfectly by themselves.

  • I've got this working in my game. You'll have to prepare your audio a little differently than perhaps you're used to. For this to work, don't worry about clean cut-offs so that the two audio tracks join together perfectly. Leave in the overhang of the last note of the intro and have a good start to the main loop.

    Use the system > compare two values expression. If Audio.PlaybackTime("intro") = 2.3, then play your main loop.

    To do this, you'll have to have at least your "intro" audio file in the Sounds folder since the audio engine doesn't seem to be able to play multiple files from the Music folder simultaneously. You'll also probably need to preload on the previous layout to avoid a wait at the start of the layout.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)