Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Gav (HeyBud) on October 03, 2016, 12:38:49 AM

Title: Sync audio track with an event
Post by: Gav (HeyBud) on October 03, 2016, 12:38:49 AM
Is there a way to send an event from a moment in an audio track? Wanting to do something like an animation event where at a certain moment in the animation, it sends an event, but with audio mixer.

Specifically, i'm trying to play an animation of a drummer hitting the snare when the snare hits in the song.

Thanks for any thoughts.
Title: Re: Sync audio track with an event
Post by: djaydino on October 03, 2016, 07:52:55 AM
Hi,
i don't think you can let the track send an event, so what you can do depends if your snare is a separate loop (a single snare hit looping) or not

if it is you could try not using loop but let it finish and then have a state to send a event to the animatior and tweak the animation for the timing.

If not you can maybe try calculating the beats per minute and get the time between a single beat.
Then use that info in a wait and loop that with a send event to the animator.
Title: Re: Sync audio track with an event
Post by: dudebxl on October 03, 2016, 02:11:41 PM
maybe this will help:

http://hutonggames.com/playmakerforum/index.php?topic=13667.0

You can get the playback time on the audio track and based on your int/float criteria send an event.
Title: Re: Sync audio track with an event
Post by: Gav (HeyBud) on October 04, 2016, 12:10:52 AM
Cool thanks for the ideas guys i'm going to try this audio float first.
Title: Re: Sync audio track with an event
Post by: djaydino on October 04, 2016, 06:37:11 AM
Hi,
Let us know how if it worked :)
Title: Re: Sync audio track with an event
Post by: Gav (HeyBud) on October 06, 2016, 10:47:35 PM
Sorry for the late response. Audio Get Time action works great. Thanks guys.