Trigger playback of entire WAV file on object collision
-
I am working on an animation where I'm trying to trigger several WAV audio files upon the collision between certain objects. I am familiar with the Xpresso approach using the Collide node to trigger a Sound node, but I've found that this method will only play back the WAV file so long as the objects are in the collided state, so in my case with objects bouncing off each other, there is only one frame where they are actually "collided", thus I'm getting no playback. If I step through the timeline frame by frame and stop on a frame where the collision occurs, I hear the audio file playback, but not if I play back the animation in the viewport in realtime, or try to render it out with audio. Is there a way to use object collisions to trigger the playback of an entire WAV file each time a collision occurs? Also, it might be helpful to be able to trigger the playback of the audio files at specific time intervals if anyone knows how to do that.
Thanks for your help!
-
Hi heat-original,
Please use your Wav file to test it. Set the Constant to a value that makes sense to your needs.
The Text Object is only there to share the state.
All the best
-
@Dr-Sassi Thank you! This seems to work for triggering the WAV at a set time. Can this approach be applied to triggering the WAV with an object collision? I tried adapting your Xpresso setup using the Collide node but so far I can't get it to work on every collision.
-
Please have a look at the new file, heat-original.
Let me know if that works or if the collision overlaps with the previous collision.
Do you know this is not sound that will be rendered into a file?
Workaround: Set the playback to the right frame rate (Timeline), limit anything that could slow it down, and do a screen capture (audio only), Quick Time can this, for example. Then match it to the footage.
All the best