Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Audio track preview in timeline?

Discussion in 'Timeline' started by jackaperkins, Jun 30, 2017.

  1. jackaperkins

    jackaperkins

    Joined:
    Oct 15, 2012
    Posts:
    5
    Hello, loving the new timeline features.

    Should I be able to hear an audio track when preview playing the sequence in edit mode? I created a totally default mixer/group and it works fine when I enter play mode, I just dont hear any sounds when pressing play in the timeline window. No console errors or any other glitches.

    To add a twist, I'm using the older 5.6.0 beta timeline build, rather than the new 2017.1 timeline preview build. Is audible preview a feature in 2017 and not 5.6?

    Many thanks,
    -Jack
     
  2. Backside2357

    Backside2357

    Joined:
    May 22, 2017
    Posts:
    2
    I just installed the 2017 beta and have the same "problem". The audio preview feature is absolutely necessary, please help.
     
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,003
    Audio only works when you go in to Play Mode, the timeline window preview does not play audio.
     
  4. Backside2357

    Backside2357

    Joined:
    May 22, 2017
    Posts:
    2
    Good to know that it really works like that. However, audio in preview mode is absolutely necessary.
     
    Onsterion and TimmyTheTerrible like this.
  5. truebototics

    truebototics

    Joined:
    Jan 2, 2016
    Posts:
    22
    Would be ideal to have audio in the Timeline preview window. Thanks
     
    Onsterion and AndreiKubyshkin like this.
  6. AndreiKubyshkin

    AndreiKubyshkin

    Joined:
    Nov 14, 2013
    Posts:
    198
    Hey! If I add audio clips in Play Mode I'm unable to hear them playing until I restart the Play Mode. Is it an intended behaviour as well?

    Also is it planned to add the ability to change volume / pan / pitch of audio tracks? Right now I can, of course, add the the game object with the audio source component to the timeline and animate it's properties with record button on separate track. But it really feels like a workaround but not the solution.

    Thank you for your time!

    P.S. Plus one vote for hearing the audio playback in the Edit Mode.
     
    Last edited: Jul 6, 2017
  7. AndreiKubyshkin

    AndreiKubyshkin

    Joined:
    Nov 14, 2013
    Posts:
    198
    If I mute audio track while in Play Mode it also doesn't do anything, the audio will play until I restart the Play Mode. It would be an underestimate to say it is inconvinient
     
  8. thierry_unity

    thierry_unity

    Unity Technologies

    Joined:
    Jun 10, 2015
    Posts:
    181
    thanks!
    This is indeed an issue, I opened a bug in our system for that. Here is the id for future reference: #930254

    Another one, could be related but I want to make sure theses two issues are verified separately theses doesn't seem to be only happening with audio tracks too. here is the ID for that one #930268

    thanks for reporting these issues!
     
    AndreiKubyshkin likes this.
  9. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    398
    I made a custom playable in order to solve that (doing a playable to show subtitles) but i cannot figure out how to adapt playable duration to AudioClip lenght.
    Can someone help me?
     
  10. AndreiKubyshkin

    AndreiKubyshkin

    Joined:
    Nov 14, 2013
    Posts:
    198
    Hey!

    I met another problem. If I want to change a volume of the audio track, I'm adding the gameobject with audiosource as an animation track and animate it's volume. It works well. But when I try to change pitch of audio source, it doesn't affect the actual pitch of the track. I mean even with crazy pitch values like 0 or 100 there's no changes in the sound. Does anyone have a clue how to defeat this problem?

    Thanks!
     
  11. mdotstrange

    mdotstrange

    Joined:
    Sep 23, 2013
    Posts:
    211
    I was sort of shocked to find out that Timeline cannot play audio in the Editor and that Play Mode is required to hear the audio clips- Has anyone created a script or technique to get editor audio playback with Timeline? Thx
     
  12. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,338
    It would be great if the timeline preview played audio, but an (easier?) stop-gap feature would be to at least render the waveform in the timeline (maybe in a foldout, under the bar). You can synchronize a lot of edits to the waveform.
     
    Deeeds likes this.
  13. thierry_unity

    thierry_unity

    Unity Technologies

    Joined:
    Jun 10, 2015
    Posts:
    181
    Sorry, right now it is not possible to hear audio outside the playmode, but it's definitely something on the roadmap for audio tracks. The waveform feature is actually available and working in 2017.2 but won't and can't be backported to 2017.1 unfortunately.
     
    AndreiKubyshkin likes this.
  14. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,338
    Happy to hear waveform is in 2017.2. Thanks!
     
    thierry_unity likes this.
  15. tezza2k1

    tezza2k1

    Joined:
    Feb 16, 2017
    Posts:
    13
    I am syncing actions to a pre-recorded speech. One of the benefits of Timeline is the instant preview capacity, and if I can't hear the sound in the preview I cannot sync and co-ordinate the speech actions easily.

    In my game a character is pre-recorded to say "Let me show you your magic wand <PAUSE> There you can see it by my right hand"

    I need to coordinate showing the Wand Gameobject somewhere between wand and <PAUSE>. This would be easy to do if audio played in Preview and is currently frustrating to enter playmode to kinda half do it.

    So I vote for audio in preview.
     
  16. nepoez

    nepoez

    Joined:
    Sep 11, 2011
    Posts:
    298
    You can press play, then scrub the timeline!
     
  17. nepoez

    nepoez

    Joined:
    Sep 11, 2011
    Posts:
    298
    Anyone know how to adjust audio volume using timeline?
     
    jacagugle likes this.
  18. jacagugle

    jacagugle

    Joined:
    Mar 12, 2015
    Posts:
    16
    I'm wondering about the same thing.
    If you play your audio from a gameobject, you can't set speed of a sound (only pitch). That is a great timeline feature. But when you play audio from timeline, you can't set audio volume. It's annoying!
     
  19. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    295
  20. jacagugle

    jacagugle

    Joined:
    Mar 12, 2015
    Posts:
    16
    Great job, but unfortunately useless for me till it doesn't work with built app :/
     
  21. AndreiKubyshkin

    AndreiKubyshkin

    Joined:
    Nov 14, 2013
    Posts:
    198
    I'm adding game object with audio source as animation track and animate volume with inline curves. Not super handy but does the job
     
  22. jacagugle

    jacagugle

    Joined:
    Mar 12, 2015
    Posts:
    16
    Yea, I do the same now, it's ok.
    I thought that the "Speed Multiplier" (which is a field in an audio track on a timeline) is something different than the "Pitch" (which is a field in an audio component attached to a gameobject). But I tested it, and "Speed" and "Pitch" do the same thing. The only difference is that the "Pitch" max value is 3, the "Speed" max value is what you want.

    I think that the name "Speed Multiplier" can be misleading, because speed of a sound, and pitch of a sound, are different things. They are connected in some way, but in some audio program you can change them separately, like increase speed and keep old pitch. Which is great feature I think.
    You can check this here:
    https://www.coursera.org/learn/music-technology/lecture/fBhhp/changing-the-pitch-and-speed-of-sound
     
  23. AndreiKubyshkin

    AndreiKubyshkin

    Joined:
    Nov 14, 2013
    Posts:
    198
    I agree, the pitch represents the height of the sound but the speed also affects it's length. Naming same thing with both words may be mesleading.
     
    jacagugle likes this.
  24. Dreamcube017

    Dreamcube017

    Joined:
    Dec 20, 2009
    Posts:
    239
    *sigh* And it seems audio once again gets the shaft.

    Hopefully there are some improvments. The wave form thing is nice though, I'll give it that. ... Not a replacement though.
     
  25. mhussar

    mhussar

    Joined:
    Feb 22, 2014
    Posts:
    5
  26. rrabassa

    rrabassa

    Joined:
    Jul 17, 2013
    Posts:
    170
    Hello,

    Every so often, Audio in my timelines does not play. Audio outside the timeline (managed by scripts etc) still work fine. The only way to get the audio back is to restart unity.

    Any ideas?

    Thanks,
    rich
     
  27. replay11

    replay11

    Joined:
    Dec 24, 2007
    Posts:
    165
    I would also like to see Audio preview and scrubbing in the timeline window. That would make syncing things up a lot easier for sure. Rubber-band style volume/pan editing tools (used in typical DAWs) would also be great for mixing the audio volume levels.
     
  28. thierry_unity

    thierry_unity

    Unity Technologies

    Joined:
    Jun 10, 2015
    Posts:
    181
    Do you have a repro steps? and could you send us a small project where this happens? thanks!
     
  29. bondstudio

    bondstudio

    Joined:
    Sep 5, 2017
    Posts:
    2
    I have the same problem
     
  30. Maghan

    Maghan

    Joined:
    Jul 1, 2015
    Posts:
    1
    Is there any Update regarding the bug of the audiotrack still playing even though Playmode is paused? I searched for #930268 in the Issuetracker but could not find any entry. Using 2017.1.0p5 atm and have not found any mention of audio/timeline-related stuff to this bug in the 2017.1-Patchnotes.
     
  31. jeffsarge

    jeffsarge

    Joined:
    Jan 3, 2014
    Posts:
    24
    +1 on audio scrubbing in timeline. Really important.
    Jeff
     
  32. MikeChr

    MikeChr

    Joined:
    Feb 2, 2018
    Posts:
    25
    Bump audio track playback in preview only (not play).
     
  33. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    414
    Any ETA on this? Where on the roadmap does it fall? Our artists came from Flash, and it was much easier for them to make sequences that need to be aligned properly to audio when they could scrub back and forth. I built this in myself, but its a bit buggy and definitely not as good as you guys taking the time to actually handle it properly. I figure though, that if I could get something sorta working without a tremendous investment, you guys should be able to figure it out (no offense meant, I mean that sincerely). If its purely you don't think its a pressing issue ... it is, at least for whatever demographic we fall under.
     
    GameDevCouple_I likes this.
  34. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    51
  35. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,003
    It will be in 2018.2.
     
  36. TSC_Lindy

    TSC_Lindy

    Joined:
    Mar 6, 2017
    Posts:
    6
  37. TimElschner

    TimElschner

    Joined:
    Jan 29, 2014
    Posts:
    7
  38. morphinegames

    morphinegames

    Joined:
    Mar 13, 2015
    Posts:
    32
    GameDevCouple_I likes this.
  39. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,948
    keijiro has like 99% of the good repos for unity on github. The mans a legend.
     
  40. spiraloid

    spiraloid

    Joined:
    Aug 11, 2015
    Posts:
    7
    without this, professional quality lipsync can't really be animated in unity....
     
    AA-Matt likes this.
  41. ethanhberkey

    ethanhberkey

    Joined:
    Dec 20, 2015
    Posts:
    2
    When i insert my game object, that has an audio source component, into a track in my timeline, i should be able to control all sound in that audio track using the controls in the audio source component on the game object. Correct? But when i change the volume or anything on the component of the game object, it doesn't make any changes to the audio that is in my timeline. In my specific case i have some music that i have in a track in my timeline. So i made an object with an audio source and connected it's audio source to the timeline track. However, the changes to the audio source component do not affect the track at all! I turn down my volume to 0 and still could hear it playing. Am i just super confused here? What is going on? What did i miss?
     
  42. unity_k8XaEZvE4PBLrQ

    unity_k8XaEZvE4PBLrQ

    Joined:
    May 12, 2018
    Posts:
    2
    I'm having this same exact issue!
     
  43. julienb

    julienb

    Unity Technologies

    Joined:
    Sep 9, 2016
    Posts:
    133
    We were not able repro this on our side. Could you open a bug report with the exact steps?
     
  44. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    146
    Hi. Got a bit of a new situation here with 2018.2. I'm using the Timeline Playable Wizard to recreate the AudioTrack with additional properties (as I can't get my hands on the original script).
    Track binding type: audio Source
    Behaviour variable: audioClip
    But even with those, the clip waveform doesn't appear & scrubbing/preview functionality doesn't work (whereas it works with audiotrack :)) Any idea to help? Thanks
     
  45. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,003
    The waveform preview is hard-coded to the audio track, so I don't have an easy way to replicate that from user code. The scrubbing is dependent on the output being an AudioPlayableOutput, but if you use that you might run into issues with stuttering. It also expects AudioPlayables to be used (so you need to use an AudioMixerPlayable and AudioClipPlayables). You can try it out by overriding the outputs property in your custom AudioTrack with the following code, instead of using the TrackBindingType (which assumes a script output).

    Code (CSharp):
    1.        public override IEnumerable<PlayableBinding> outputs
    2.         {
    3.             get { yield return AudioPlayableBinding.Create(name, this); }
    4.         }
    5.  
     
    Immu likes this.
  46. pleasantPretzel

    pleasantPretzel

    Joined:
    Jun 12, 2013
    Posts:
    29
    Is there a way to change the behavior of how the audio is scrubbed?

    The current implementation seems to play back audio by adjusting the audio's pitch in relation to the speed you scrub. This is great! Although, because the playback pitch is very low when you scrub slowly, it is at times very difficult to hear. It makes certain tasks difficult, such as lip-syncing, or other tasks that require very fine adjustments.

    A solution that I'd find really useful is to not change the audio's pitch, but play back small samples at the native pitch as you scrub. I'm not sure how else to describe this. It would be wonderful to have both scrub behaviors. Here's a video of someone displaying this scrub style in After Effects:


    Is this feature already available? And if not, where's an appropriate place to make a feature request? I thought this might be a good place to start. Thanks!
     
  47. pleasantPretzel

    pleasantPretzel

    Joined:
    Jun 12, 2013
    Posts:
    29
    So, I'm using Keijiro's audio preview version for now, I've discovered it has the exact functionality I need. It plays one frames worth of audio at native speed as your playhead enters a new frame, or something to that effect.
    This type of scrubbing is very important for precise manual work, like lip-syncing, which is what I've been using Timeline for lately. Please consider including this feature as an option in future builds. :)
     
  48. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    94
    Keijiro's audio preview track repo readme now says:
     
  49. pleasantPretzel

    pleasantPretzel

    Joined:
    Jun 12, 2013
    Posts:
    29
    Hi @Leuthil , thanks for the response. Yeah, I'm aware of the repo readme.

    The two implementations – Keijiro's and official 2018.2 version – handle audio playback differently. My point is that Keijiro's audio scrubbing implementation is more useful to me than the official 2018.2 implementation. I believe Keijiro's implementation will be considered more useful to most people who are syncing clips to audio tracks with precision down to a single frame. (I explain the difference in audio playback a bit in both of my posts #46 and #47).

    I would like to see the official implementation extended to provide an optional audio playback behavior that is similar to Keijiro's version, or the After Effects implementation. (I included a link to video example of the after effects implementation in post #46).
     
  50. Leuthil

    Leuthil

    Joined:
    Jul 26, 2013
    Posts:
    94
    Ah I see. Sorry I thought your post was before 2018.2.