Access Parameters of a Sound Que?

Here’s the use case…

I have a Weather Blueprint running that is updating variables every so often (things like wind speed, amount of rain, is it thundering… etc). I also have a Sound Component attached to the player that is constantly looping “Environmental Audio” that needs to be updated based on the weather blueprint.

The Weather Blueprint needs to be able to access the params of a Sound Que to allow or disallow certain sounds from being active in the que or inactive. I can find branches and wav param NODES inside the Sound Que, but I cannot seem to set any BOOL or INT variables inside the que itself, which tells me I need to set those externally…but how?

Example: The sound que has three different choices for a looping wind sound (light, medium, or heavy), and only one of them should be playing (based on a variable inside the Weather Blueprint). How do I tell the sound que which one to play from the Weather Blueprint? What I really want to do is use SWITCH NODES inside the que, but I don’t know how to tell the que what the int is determining the output!

Hopefully someone understands what I am going for and can point me in the right direction. All the documentation says is:

Switch Node
The Switch node selects an input node based on the value of an integer parameter.
Property Description
Sound Node Switch
Int Parameter Name The name of the integer parameter used to determine which input is used.

SUPER detailed and descriptive. Very helpful, no?

1 Like

Bumping for visibility.

Hi ,

Please do not bump threads that are less than 4 days unanswered. This clutters the answerhub and makes it more difficult for users to parse through questions. Thank you.

I still can’t figure this out… would love to be pointed in the right direction!

Hi ,

Check this link out, perhaps the answer here can be of use to you:

A few other pages that may be useful to this or other sound questions you may have:

I hope this helps!

Aaaahhhhhhhhhhh so they work kinda like Dynamic Material Instances… Got it. These links were SUPER helpful! Thanks so much !

A+ for you today.

:diamonds::diamonds: STAFF
Hi ,
Check this link out, perhaps the answer here can be of use to you:

A few other pages that may be useful to this or other sound questions you may have:

I hope this helps!

that was answer, not mine. Just wanted to check this off my questions list. Thanks again mate!

For anyone that comes across this post looking for the c++ solution (as google brings you here as the first result for c++ SoundCue parameter)


Example… Setup an Audio Component and load the Sound Cue

 UAudioComponent* propellerAudioComponent;

 // Load our Sound Cue 
 static ConstructorHelpers::FObjectFinder<USoundCue> propellerCue(
     TEXT("'/Game/airplane-engine.airplane-engine'")
 );

 // create an Audio Component - this is how we control the SoundCue
 propellerAudioComponent = CreateDefaultSubobject<UAudioComponent>(
     TEXT("PropellerAudioComp")
 );

 // Attach our sound cue to the SoundComponent (outside the constructor)
 propellerAudioComponent->SetSound(propellerCue.Object;);

Set a parameter of the sound cue, and play it

 // Set a parameter named 'pitch' on the Sound Cue 
 propellerAudioComponent->SetFloatParameter(FName("pitch"), 0.8f);

 // Finally play the sound  (outside the constructor)
 propellerAudioComponent->Play();

For a longer explanation see my blog article: playing sounds from c++ using Sound Cues