How does the Crossfade by Param node work?

In regards to this node in the SoundCue editor the documentation says “The name of the parameter used to control the crossfade.” … but how does this parameter control the crossfades over distance ? What variables does it affect and how ?
Thanks,
R.

2 Likes

Anyone ? ?

I think you want to use a different node.

Crossfade by parameter does the fade based on a parameter you name there. In a blueprint you would set the param value on the sound node to crossfade based on whatever data you want.

If you want crossfading by distance you should use the crossfade by distance node in the soundcue.

You could use the parameter version if in the blueprint you do a get distance of player to the sound and set the param but seems overly complicated.

Thanks, but I wasn’t wanting to use it over distance, as obviously I’ll just use it’s existing functionality, I was just curious about what it actually does (i.e. does this parameter just act as a proxy for distance for reading through the crossfade curves ? Does it override distance - if so how do you use them simultaneously?) and if there’s any use for it. I guess I’ll have to play around with it some more,
Cheers,
R.

I guess i am confused because you keep saying distance. Distance has no meaning for the “by parameter” node.

By parameter just creates a parameter on that cue that can be altered at runtime in blueprint or code.

If, for example, you have an ambient sound actor you can create a “Set Float Parameter” node from it and change that parameter which will blend the crossfade.

1 Like

Maybe we’re not talking about the same thing. There is no ‘by parameter’ node in the SoundCue editor, what I’m referring to is the ‘Crossfade by param’ node as stated in the title of my original question. As you can see from the attached image it uses ‘distance’ variables - hence my use of the word ‘distance’. It basically looks exactly the same is the ‘Crossfade by distance’ node but implies you can use a parameter affect this, but there’s no documentation on what this parameter actually does. I’m aware of how I can use parameters to control the wave playing in the ‘Wave Param’ node, and named float parameters to control pitch / vol etc inside a ‘Continuous modulator’ node - and I could use this to ‘crossfade’ if I wanted, but what does the parameter inside a ‘Crossfade by parameter’ node actually apply to.

9964-2014-07-09_22-59-17.png

I haven’t used the Param verision of this. But, how I understand this is when to change between one sound wav to another using the param. version of this. Once activated, you can still set distances of fade between the two you are switching between. So if you wanted a quick transition between the sound wavs you would set the fade distace to nothing. But, if you wanted it to trigger and then slowly fade in while your character gets closer to the sound you can set those distances appropriately.

Does that make sense?

Yes - thanks,
I have worked it out. You just send it a parameter via the Set Float targeting the audiocomponent and this will read through the fades. Its just misleading that they haven’t swapped out the word ‘distance’ for something more meaningful like ‘Parameter Value’.
Cheers,
R.

I googled and reached here. But not solved my question.
Later, I probably understood how to use.

I hope this will make somebody’s sense.
Important point in this case is BOIL’s 90 to 100.

1 Like

Ok so how you can use this:

You have to realize the param value is mapped to the fade in and fade out values.
I use a param called VehicleSpeed that goes from 0 to 1.
In this case my first audio track plays by default since its fade in at 0.
As my VehicleSpeed value increases, the first audio track starts fading at 0,4 and is totally faded out at 0,8.
My second audio track starts fading in at 0,4 and is at full volume at value 1. I do not need to set a fade out value for my second audio so i leave it at a high number.

You can see this as a color ramp/gradient but then for audio.

1 Like