playMaker

Author Topic: Sync audio track with an event  (Read 2302 times)

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Sync audio track with an event
« 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.
« Last Edit: October 03, 2016, 12:41:28 AM by Sarcophagav »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Sync audio track with an event
« Reply #1 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.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Sync audio track with an event
« Reply #2 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.

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Re: Sync audio track with an event
« Reply #3 on: October 04, 2016, 12:10:52 AM »
Cool thanks for the ideas guys i'm going to try this audio float first.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Sync audio track with an event
« Reply #4 on: October 04, 2016, 06:37:11 AM »
Hi,
Let us know how if it worked :)

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 126
    • Tumblr
Re: Sync audio track with an event
« Reply #5 on: October 06, 2016, 10:47:35 PM »
Sorry for the late response. Audio Get Time action works great. Thanks guys.