How do I fade in/out music?

0 favourites
  • 8 posts
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • Hey there!

    Can one LERP master volume from -99db to 0 db in a second or two? In that case whats the formula?

    Or is there a better idea for this?

    Thanks! ^_^

  • Hi.. I think there is fade volume action added in Audio plugin since R122 (C3 Runtime)

    Which is more convenience than lerp.. IMHO

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey there!

    Can one LERP master volume from -99db to 0 db in a second or two? In that case whats the formula?

    Or is there a better idea for this?

    Thanks! ^_^

    i am no LERP master volume but atleast this one thing i know ^_^...

    lerp(a to b in ticks/s) or lerp(a,b,x) lerp(0,-99,dt) lerp(-99,0,dt) fade out , fade in ... young obi kenobi.

    however i prefer the variable way, lerp sometimes snaps towards the end and i don't like that.

    also not sure if the volume has changed on decibels, but i think in Construct volume muted is -35db or nothing can be heard at that point, doing -99 is kinda pointless. unless again if that changed and you can actually hear stuff at -90db then -99db is a good value call.

    Edited: also above me there is a post ... with the new feature in C3 ... that might solve it for you, if you don't want any custom fade in fade out.

  • Hi.. I think there is fade volume action added in Audio plugin since R122 (C3 Runtime)

    Which is more convenience than lerp.. IMHO

    Hey there! That option isnt there in C2.

  • Hey there! That option isnt there in C2.

    It wouldn't have been suggested if you had posted in the C2 section. ;)

    You can try rexrainbow's plugin, rex_audio_helper.

    construct.net/en/forum/extending-construct-2/work-in-progress-addons-30/plugin-fade-in-fade-out-audio-96730

  • You can definitely hear -35db. It all depends on the quality of your headphones/speakers and what the volume of the imported sound file is. You can probably hear -50 to -60db with decent headphones, so I would go as far as -90db before considering it silent.

  • You can definitely hear -35db. It all depends on the quality of your headphones/speakers and what the volume of the imported sound file is. You can probably hear -50 to -60db with decent headphones, so I would go as far as -90db before considering it silent.

    oh that's new, i remember in C2 around -35 /-45 i couldn't hear nothing, maybe cause i had shitty headphones back then xD but the audio analyser wouldn't pick anything from ~-45 and above either so... weird ... anyway the lerp works with what ever number u want :D i just tested the audio thing in C3 volume can be heard at -100 also, so i guess do for fade in lerp(-infinity,0,dt) and for fade out lerp(0,-infinity,dt) that should fix it for sure ^_^ lmao...

  • I usually fade to -90 then stop the sound. That seems to work well.

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