Can't manipulate audio volumes from blueprint?!

[Ok, so I posted this issue on AnswerHub a few days back, but received no official response. I’m reposting it here.]

**Tweeter version: **

The title says it all, is there a way that I can’t find?

If not, then why most say “one can create a full game with BP”, when BP can’t even handle such a simple and common task?

**Long version: **

I’m at a stage where I’m making the backend of the options page for a very simple game, it’s a side project of mine that I can only work on when the other projects allow. The Audio section of the options page (no art yet) looks like this:

So as you can see there are 3 categories for all the soundcues in the game, I already programmed the sliders to not be continuous, and have steps of 10, so each slidebar can have a value of 0 through 100; so 11 states for each slider.

We would do something like this very easily in UE3 using unrealscript:

I understand in UE4’s C++ it’s almost the same, and we could access the sound classes via GetAudioDevice(). I searched blueptint up to bottom only to find out we don’t have any access to neither the Engine class, nor the GetAudioDevice function, so we cannot iterate through the sound classes. I also checked and made sure we can’t manipulate those SoundClasses or SoundMixes by having a direct reference.

Now why I don’t just use 10 lines of C++ to do this instead of a full page post here, considering the fact that I’m actually a programmer and not a designer? Well the whole point of this project since the moment I started it a few weeks back, was to see if what everyone says is true: “You can make a full game with blueprints” .

When I started I figured if that statement proved to be true, I’d stick to BP for small/mobile games, unless I need some advanced parts in the game, and only use C++ for the base of larger scaled games, plus whenever I need to use more advanced features. Now obviously changing volume is no advanced thing, even a tetris game should allow you modify the sound volumes.

The only way I could find so far to do this in BP, is to create a SoundMix for each state of each slider, and swtich between or rather push/pop them. But that means creating and managing 33 SoundMixes, which doesn’t make any sense, I would call it not a solution, but a workaround, and a bad one at that.

It won’t be that hard for me to switch to a C++ based project at this moment, but if I have to do that for such a simple task, then the statement above in red is just a myth, while BP is much more powerful than Kismet, and I admit, I found to like it, but it is in no way a replacement for UnrealScript, as been advertised, and you also cannot create a full publishable game with it, not even a simple one.

[Don’t get me wrong, I know the engine is relatively young, but it seems there are still simple but important things missing when you use blueprint even for a simple game. It’s ok if you want to brand BP as what we heard everywhere, but please make it your priority to resolve these shortcomings soon, so one would be actually able to create a game with it alone.]

So now the question is, (I’m almost certain there isn’t, but in case I missed it) is there really any way to do a very simple thing like this in BP? If not, is there a plan to expose the GetAudioDevice function to BP, or make some other way available, in near future? Or really the only solution would be to switch to C++ after all, even for a simple game?

I hope the thread gets some attention this time around. Thanks in advance.

Look at the Sound Class blueprint type, and then apply the appropriate Sound Class to each sound cue/source you’re using.

Lol, thanks but that was the 1st thing I did. You might wanna read the post again, I have all that already, 6 SoundClasses in total, but to no avail.

If you read my post carefully, you see that I mentioned that now the problem is, there is currently no way to access those sound classes in BP to change the volumes from there. None, except using SoundMix object, which also has the problem I mentioned above, and is not really a solution.

I have a slider like yours (in UMG) but I have it snapping between 10 settings. Each setting is it’s own sound mix modifier which changes the volume. I can’t get it quite working with different sliders changing different sound classes. :confused:

Does anyone know what these actually do:
Push sound mix modifier
Pull sound mix modifier
Set base sound mix

I feel I’m close to figuring this out through blueprints

If you have no issue with 3rd party plugins, or are already using one, just use Rama’s plugin till Epic take care of this problem (IF they do at all, not even a simple response yet, after almost a week has passed). Otherwise, to use SoundMixes you have to use this messy kind of method:

Have 1 Sound mix per state per slider, That would be 33 SoundMixes in the image above. The first 11 would change the sound classes related to Sfx, the next 11, the ones for music and so on. Then in BP, in whatever class you’re using to manage the options page in (I have one called OptionsState which can be referenced from PlayerController), at the beginning of the game, you push 1 of each set of SoundMixes, basically the one pointing to the current volume.

Then whenever you change a slider’s value, use its OnValueChanged event, and in the class you’re managing the options page, first remove all the soundmixes you pushed so far (using PopSoundMix node), then push 3 new ones, 2, would be the same as before, and 1 would be the new SoundMix for the new volume the user just specified there. Obviously for this to work you need to keep track of what the last value of each slider was.

That being said, I don’t like that method a bit, I even wouldn’t call it a solution, having to create 33 soundmix objects, heck I don’t even have that many assets in the whole game yet, but it works if you absolutely want to use it.

Honestly, I first wait a while to see if anyone from Epic even bothers to reply to this thread. If nothing happened after a while, my next action would be to just switch to C++ and take care of this whole thing in 5 minutes, and obviously will never even try using BP for anything more than level events and some small modifications. Sad that such a nice system lacks simple but important stuff like this all around, things that are not really hard to take care of on their side, but for some reason, sadly they don’t seem to care much.

I’ve just got it working :smiley: And it just so happens to be your many sound mixes method (volume set to +0.1 on each mix). Before i was having trouble with mix modifiers either not working or cancelling other modifiers. Now I have it working by making use of the sliders begin/end capture. Although ‘pop sound mix’ doesnt seem to work for me, I can get away with clearing all mix modifiers (on begin capture) then pushing them back using the saved variables (on end capture). My ‘On value changed’ for the slider simply saves a float variable, then capture end uses that variable to find its nearest setting. The end result is the slider snapping to it’s nearest 10th. eg. releasing it at 63% of the slider will snap it to 0.6

It’s still a shame such a simple thing had to be so confusing even in blueprints. Wish I found Rama’s plugin sooner lol feel like I’ve wasted 2 full days now.

When will they just incorporate all of the stuff from Rama’s plugin into the engine? Since there is so much basic stuff there that everyone needs/wants?