Cross fade question.

  • 5 Replies
  • 5044 Views
*

Offline egomassive

  • 1703
  • 233
    • View Profile
    • egomassive games
Cross fade question.
« on: August 22, 2012, 06:51:16 »
So, I've been making a Knytt Stories mod and now there are objects that let you fade the ambiance tracks in and out as well as mute them. Together these objects can create a cross fade effect between the 2 ambiance tracks as Juni moves between them like a slider. Unfortunately, I can't get a smooth transition. The volume either dips, or peaks a little.

I'm out of my element working with sound, but what I think I need is a formula for volume over time curves. I know there are many musicians around here so hopefully someone knows an answer or can point me to one. Wikipedia was of no use. Thanks in advance.

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3431
  • 126
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Cross fade question.
« Reply #1 on: August 22, 2012, 18:28:53 »
You would want to have a linear fade for in and out, not a gradual one fading in slow, then fast till 100%, and out in reverse, which is sometimes also the case.

Note that for the best transition, both sounds should be equally loud. If one of the ambiences is not playing the same volume (even if it both says volume = -5 db (or whatever value you can set in your program) the actuall sound can be soft or loud at that point.

So you will want to instantly mute the sound and make sure they're qually loud at that point.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline egomassive

  • 1703
  • 233
    • View Profile
    • egomassive games
Re: Cross fade question.
« Reply #2 on: August 22, 2012, 20:11:56 »
So you will want to instantly mute the sound and make sure they're qually loud at that point.
Not sure what you mean by this sentence.

You've pointed out a mistake I've been making so far. I'm using two versions of "O Canada" to test, one with chorus and one without. Naturally the chorus makes one track louder.

If I use linear fades, should the tracks meet at 50% volume? That's what I was aiming for originally, but I admit I was using a rough approximation of "slider" location and that was giving me a funky curve.

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3431
  • 126
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Cross fade question.
« Reply #3 on: August 23, 2012, 03:30:17 »
So you will want to instantly mute the sound and make sure they're qually loud at that point.
Not sure what you mean by this sentence.

You've pointed out a mistake I've been making so far. I'm using two versions of "O Canada" to test, one with chorus and one without. Naturally the chorus makes one track louder.

If I use linear fades, should the tracks meet at 50% volume? That's what I was aiming for originally, but I admit I was using a rough approximation of "slider" location and that was giving me a funky curve.

What I mean is this: If you do the change from track 1 to track 2 instantly (muting one while unmuting the other) you can ensure that at the cross-over point, the volume is the same.

And yes. You will want the center to be at 50% volume. You should not want to get a curve. It should be linear, and both tracks sound have the same volume at that point.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline egomassive

  • 1703
  • 233
    • View Profile
    • egomassive games
Re: Cross fade question.
« Reply #4 on: August 23, 2012, 07:59:56 »
It's surprisingly simple then. I was expecting I'd need logarithms or something of that nature. Thanks for the help. *gives star*

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3431
  • 126
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: Cross fade question.
« Reply #5 on: August 23, 2012, 19:08:36 »
Nope, unless you want a fancy smanchy transition, but that will not get the seamless transition you're after anyway. :)

Thanks for the :hiddenstar: :) Appreciated.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex