Announcement

Collapse
No announcement yet.

Change music track volume dynamically in game

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Wow, nice first post, jstubbs, haha.

    Thanks a lot, they seem really useful references. Let me check and give them a try. I'll be back with some feedback (positive, I hope!).

    Leave a comment:


  • replied
    Originally posted by jgg View Post
    I changed the play music (no more inputs or outputs available than default ones) with a play sound node, exposed the volume mulitiplier and set it dynamically, but it doesn't perform as expected. Seems that for already started sounds it doesn't change, it's an already use channel, that's why I intended to change it with a play music node, which only defies 1 channel.

    U_U Any other idea? Or further refinement of JessieG suggestion maybe? =D

    Unfortunately the volume multiplier of a PlaySound node in kismet doesn't update dynamically

    What you need to do is use the continuous modulator node in a SoundCue and alter the volume dynamically, this is usually done through code. That doesn't really help you though... However, a few clever people have come up with alternatives to needing a programmer to hook it up for you.

    Graham Gatheral has created a custom kismet node that lets you access continuous modulators in kismet:
    http://www.gatheral.co.uk/blogs/udk/...ator-node.html

    Using that you should be able to create a dynamic music system in kismet quite easily - he also has an example up there for doing exactly what your after.

    Another alternative is to get yourself a copy of this book (which is also an all round excellent resource for game audio and audio in UDK):
    http://www.thegameaudiotutorial.com/

    They've created their own PlaySound for kismet that adds functionality for dynamically changing pitch/volume through continuous modulators.

    For changing the volume of music when dialogue plays, it's probably best to use a SoundMode (which can be set in kismet using the SetSoundMode node). Which works essentially like a basic 'snapshot' mixer. So you could create a 'DuckDialogue' SoundMode, which would lower the volume/EQ all SoundClasses other than Dialogue and then trigger this when your dialogue plays - then when the lines finished stop the SoundMode and everything returns to normal.

    Hope that helps

    Leave a comment:


  • replied
    I changed the play music (no more inputs or outputs available than default ones) with a play sound node, exposed the volume mulitiplier and set it dynamically, but it doesn't perform as expected. Seems that for already started sounds it doesn't change, it's an already use channel, that's why I intended to change it with a play music node, which only defies 1 channel.

    U_U Any other idea? Or further refinement of JessieG suggestion maybe? =D

    Leave a comment:


  • replied
    If you right click on a play sound you can expose the volume multiplier input node. Maybe you can mess with that to dynamically change the volume with triggers?

    Leave a comment:


  • replied
    No worries keep your question here didn't know it was about kismet so no worries keep it here sorry about that i can be an idiot sometimes ,
    anyway i think this can only be done in kismet easily, i can't to be able to find out how to control the volume for a specific audio on unrealscript and kismet well i don't really know alot about it, sorry about that, hopefully someone will be able to help you,

    Leave a comment:


  • replied
    Thanks reinrag.

    This is what I need:

    1. You reach one point in the map --> music starts (currently through Kismet).
    2. During gameplay, when some sounds are played (dialogues, and also through Kismet), the music should be played at a lower volume, so the voices can be heard. Once dialogues end, music recover the original volume level.

    I thought it could be somehow controlled through Kismet, so I decided posting my question here. Once I posted a Kismet question on the programming subforum, as Kismet is just visual scripting, but I was told to do it here next time Oo.

    Leave a comment:


  • replied
    This should be posted in the programming section normally, as it's programming related, anyway in the audio component there is a function that will adjust volume
    Code:
    native final function AdjustVolume( FLOAT AdjustVolumeDuration, FLOAT AdjustVolumeLevel );
    notice you just need to write a float value for the volume duration that you will set and the second parameter will also be a float value this however will be the volume level you want to set, now be advised you cannot write this in the audiocomponent.uc file you'll need to write this in some other file i reckon that should be written on your pawn class, anyway i can't give you a "tutorial" really as i don't really know what you want to do exactly,

    Leave a comment:


  • replied
    Any idea about it?

    Leave a comment:


  • started a topic Change music track volume dynamically in game

    Change music track volume dynamically in game

    Hi,

    I would like to know if there is any way to change the volume of any music track that is being played in game (I'm currently playing them throug Kismet). It would be useful to lower it when dialogues are played, for example.

    Thanks!
Working...
X