Hi folks. My name is Ricardo, I`m sound designer, initiating on game audio.
Im looking forward to learn the basics of audio game implementation on Unity. I allready understand the game object, audio listener and other basic functions of it, but I did not can get over this basic default functions. Im doing a Avid Pro tools game audio course, and they have some pre-build games for us to play with, but for exemple, I can`t implement news audio objects with the behaviors I want, just play with the ones they have create.
I want to know how I can make a sound change due to scenario change; how to implement a continuos flow of interactive music, making it change, from idle theme, to combat, to idle again, and so on…
I`m not a programmer, but I can read e copy&past, and do some tailoring.
ahhh,I all ready read the a lot of unity docs.
If someone can point me some directions.
I think the first thing you’ll need to learn about is how to crossfade audio clips. You will need two Audio Sources (use two Game Objects, with one Audio Source each), and you’ll need to lower the volume of one of them, while you raise the volume of the other. There is no visual editor for the fade, like you would find in a good DAW, but you can raise 0-1 values to an exponent, for a performant and easy-to-use way to custom tailor your curves. I have a page on the wiki which may guide you with that.
You’ll generally get the best answers around here, if you try something, and then ask specific questions to get through problems, one at a time. I don’t know of any specifically audio-geared Unity tutorials, but I haven’t really gone looking; you can try YouTube – there are a lot of good tutorials on there.
Hi Jessy, thanks!
Well I understand what you mean… but still I don`t even know where to do it…where to put this info…
how do I begin scripting it. I download the tutorial game… from the site… where do I do it there?
thanks
There are several tutorials, but I don’t know that you should try to sift through any of them in order to try this. You should however educate yourself enough to know how to script a property that you can find in the documentation; that is information that you should learn in any basic tutorial. You can drag Audio Clips from the Project folder panel right into the Hierarchy panel, to make Game Objects with Audio Sources attached, using those clips. The easiest, I think, to get started, would be to have one script attached to another Game Object, which references those Audio Sources, and changes their volumes.
That’s not enough information to complete a crossfade, because you still need to perform the fade over time, but there are several ways to do that, and there should be threads about it to help you. The page on coroutines is probably where you’ll want to go if you don’t find helpful threads. If you can’t get it after checking out that information, go ahead and put up the code that you have, which isn’t working. You’ll need to have some kind of start, and then we can guide you along further.