playMaker

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

Gav (HeyBud)

  • Full Member
  • ***
  • Posts: 117
    • View Profile
    • Tumblr
Sync audio track with an event
« on: October 02, 2016, 09:38:49 PM »
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 02, 2016, 09:41:28 PM by Sarcophagav »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4120
    • View Profile
    • jinxtergames
Re: Sync audio track with an event
« Reply #1 on: October 03, 2016, 04: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
    • View Profile
Re: Sync audio track with an event
« Reply #2 on: October 03, 2016, 11:11:41 AM »
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: 117
    • View Profile
    • Tumblr
Re: Sync audio track with an event
« Reply #3 on: October 03, 2016, 09:10:52 PM »
Cool thanks for the ideas guys i'm going to try this audio float first.

djaydino

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

Gav (HeyBud)

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