Skip to Main Content
Construct 3 suggestions 21H2 - ARCHIVED

This suggestions platform is now closed and will be shut down on March 1st 2024.

Please ensure any content you care about is backed up before that date.

Feature requests are now handled on GitHub here: https://github.com/Scirra/Construct-feature-requests

15 VOTE
Categories Runtime
Created by Richard Lems
Created on Nov 27, 2021

Schedule next Play action should support music

Why schedule music?

Working together with several music composers in the past I have always found that their preferred way of of exporting files is via a separate 'intro' and 'loop' file. This is currently impossible to implement.

Even in the live version of Mighty Goose, if you listen closely you'll notice a gap between intro and loop music.


Alternatives

Placing your music files in the Sounds folder allows you to schedule them. If your project does anything with Audio and time scale however, this is not an option.

Another option I've seen mentioned is crossfading. Asking composers to make their tracks crossfade compatible can only work in a very specific genres and is very constraining in general. Also not an option.


Why should you spend your valuable time on this?

This solves a really big (and basic!) issue with the audio system in Construct. Rather than spending development time on more 3d features, I'd rather see the base systems of Construct improved.

Being able to schedule music will allow creators to offer a polished audio experience to users. Looking back in time on the forums, I got the impression that this is quite difficult (also due to browsers compatibility). Maybe some developments have been made that can provide a new perspective?

Just one more thing I'd like to say: If Construct really wants to be the best 2d game engine out there (and not just the best 2d game engine on the web!), this is one of the features that I would expect.


Problems

As someone else pointed out: The problem with schedule next play is it doesn't care which sound is next, like if you have other sounds playing randomly those sounds will get in the way.

It's a good point. Even if the system allowed music to schedule, there still wouldn't be a good way to make sure your music would play seamlessly. Maybe adding a 'schedule next play with tag' action would be a good way to solve this issue.

Note: I had to find a forum post from 3 years ago that not being able to schedule music files is 'by design'. To prevent future confusion, the documentation for the audio object should at least mention this is impossible.

  • Attach files
  • Admin
    Ashley Gullen
    Reply
    |
    May 30, 2022

    Currently music is played with the HTML <audio> element which does not support sample-accurate scheduling, which is why this is not currently supported. Treating music as sound has tradeoffs like having to download and decode the entire track in memory up-front before any playback can start, which can delay playback in other cases. So I think here we are constrained by what browsers currently support.

    You can opt-in to playing music as sound anyway by putting it in to the sound folder. Maybe you could do that and then use a custom approach to timescaling audio?

  • +7