A question about sound files and audio

Although BJS has the ability to load audio/sound files, I have always used Howler.js because of its ability to create “sound sprites” What this means is I could create one sound file of weather effects (for example rain, wind, thunder) then use that one file to play the appropriate sound at a particular time. So one file replaces three and I just choose when to start and stop the appropriate sound in that one file.

Several years back, I asked about this feature and could it be added to the Babylon Sound functionality, but I kind not find anything about it in the documentation.

So was it ever added?

cheers, gryff :slight_smile:

Hey Gryff!

Nope it was not. I still think it is a good idea though but we did not work on it for now

@Deltakosh : Well that is too bad David. I do find it useful. For those who perhaps did not understand my first post here is some typical code:

var sound = new Howl({
urls: [‘sounds.mp3’, ‘sounds.ogg’],
sprite: {
rain: [0, 2500],
thunder: [3000, 1000],
wind [5000, 9000]

// play the weather

The first number is the start time and the second number is the length both in milliseconds. Useful for battle sounds, background sounds, and holding conversations where the response to a question might be different depending on the scene conditions that exist at the time. And files are easy to create with my sound program - Audacity. And of course a lot less clutter on my HD

Maybe one day … he says hopefully

cheers, gryff :slight_smile:

Let’s create an issue for that feature on the repo :slight_smile:I’ll find time to do it for you

Please just create the feature request (and provide some sample sounds I can use to test)

1 Like

@Deltakosh: Ok David will do. And TY for your efforts :slight_smile:

cheers, gryff :slight_smile:

1 Like