VRChat
Audio in gesture wont work
I built my own avatar with several custom gestures with audio, but unless I have the music on by default when the avatar loads, I am otherwise not able to trigger it with a gesture.

I disabled it, I set it to play when it wakes, I parented it to the armature, and I enabled it in the animation file. I experimented with different levels and volumes but nothing will make it trigger unless its enabled on load.

How do I fix this?
< >
Showing 1-14 of 14 comments
Yuko Apr 15, 2021 @ 8:31am 
The last time I worked with audio on avatars I had to switch to using the FX layer to enable and disable audio.

This is only for SDK3, I haven't used SDK2 for a very long time now. You've said in the past you were making a custom armature, not humanoid, so I'm unsure of if using the default FX Layer and customizing will work, but you can set it up similarly to how you did your other gestures, except in FX, use the same parameters as you do it gestures.

Say you are doing emotes and using the default parameter, VRCEmote, and you wanted it to play on whatever clap is, say 3, you would create VRCEmote on the FX Layer, create a new layer, and add your animations that enable and disable only the audio file, with the transition conditions being, like the example,
VRCEmote "equals" 3 for enabling the sound file
VRCEmote "does not equal" 3 for disabling the sound file.

I'm doing this from memory, and also haven't used sound files on an avatar for months, so I'm sorry if it isn't working or I made a mistake.

There may be an updated video on youtube for how to do this, it would need to have come out in the last couple of months, or show how to do it outside of the gesture layer as that hasn't worked for several months from what I had experienced.
most of the tutorials are from several months to even years ago from before the latest updates so no one has even begun to mention how to set up parameters for audio.

all i did was clicked the hip bone, created an audio source, dragged in the .ogg, set volume to 0.5 and max distance to 10, linear space, unchecked the box at the top, and in the animation added the audio source property and set it to enabled.

at no point did anyone say anything about parameters.

also strangely enough last night when i uploaded my avatar for the first time, the audio didnt play in my home, it didnt play in the among us game, but it DID play in the Murder game

Also my armature is humanoid now
Yuko Apr 15, 2021 @ 1:17pm 
Well the old way was just using your gesture animation to enable the audio source when the animation started, so you didn't need to set up anything separate, but because in my instructions you would be using a completely separate "playable layer" you would need to have something to drive the animation stuff. I used the "Ask Amber" channel's instructions for setting up an "inventory system" but replaced the enabling of physical items, with the audio source.
https://www.youtube.com/watch?v=c7mZY7DYVu8

It is odd that the audio would work in the one single instance, it should either be working all the time or never working.
im not sure i fully understand. do i just make 2 completely separate animations? one with movements and the other with audio, then have them linked under the same button?
I just tried this and it actually worked! Thank you
nevermind it only played once and now i cant get it to work again
Yuko Apr 15, 2021 @ 6:54pm 
Did you set the conditions for the transition between the on and off correctly?
You should need an enable animation and a disable animation for the sound source object on the armature, and the conditions need to be
"Equals" for transitioning to the On animation
"Not Equal" for transitioning to the Off animation.
If you are doing this for gesture that plays once, you would need to set the On/Off animations for the sound with an exit time and have them be the same length as your gesture animation.
would that work if i copy the property, set to disable, and place it in my idle pose?
Yuko Apr 16, 2021 @ 3:29am 
I'm fairly certain that both enable and disable need to be done the same way, which would be in FX.
oh I was doing this in the actions section, not fx. I will try both to see what happens
so apprently you cannot activate multiple animations with the same button in the radial dial.

I did however find that enabling the audio in the dance animation and disabling it in the idle standing animation works.

also discovered that if you have more than one audio, the game will be a dumbass and try to play whatever the hell it feels like unless you disable all other audios besides the one you actually want in any given animation
new problem, how do I set these up so they can be cancelled halfway through? I tried using a toggle, but that makes it stick to the last frame when its done instead of returning to idle, and using the hold down button option is less than conveniant
Yuko Apr 17, 2021 @ 12:08am 
Try turning off "Has Exit Time" on the transition setting, on the controller layer parameter, between the off and on animation.
thats what i tried, which caused the frozen frame. Also the music wont play a second time after a full play through. they will play for once millisecond then go mute
Last edited by Blappeture Executive No.1; Apr 17, 2021 @ 12:22am
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Apr 14, 2021 @ 10:39pm
Posts: 14