Wednesday, November 17, 2010

Hidden Audio functionality in Maya2011

New Audio Handling in Maya2011

I wanted to point out a couple of hidden features for Audio handling that aren't in the docs and that kind of slipped into Maya2011 via the CameraSequencer upgrades. The audio node in Maya used to just have 2 main attrs, path and offset, that was all you could do, point it to a wav and set the start time. If you now look at an audio node in 2011 there's a ton of new attributes to control the behaviour of the audio. Unfortunately most of this is hidden unless you're using the AttributeEditor or CameraSequencer, in which case RMB on a sound you'll get access to Mute, that's about it. In the Trax sound is still just a simple, poorly supported add-on..... or is it?



Firstly there's now a Mute attr, so you can mute out those audio's you don't want, this displays in both Sequencer and Trax, but for Trax you have to set the attr direct.  Now for the more complex stuff. If you're used to editing in Trax you're used to sliding the start and end times, trimming the clip etc. There's no UI support for Sound for any of this, BUT you can still do it via the attr's directly.



So, 2 sets of attrs work together. Offset and EndFrame, SourceStart and SourceEnd. The Offset is no longer what it used to be, this is the start of the clip nothing more. If like us you have tons of sound code designed to offset audio then it's all stuffed! you need to manage both Offset and EndFrame at the same time now in order to shift a sound node along time.

However, using the Source attrs you can now trim the audio, directly in Maya..... there's not a lot been mentioned about this and we only found it by accident.

 The 2 sound nodes here are the same bit of audio, but the lower has been offset to start at frm 120, because the source start has also been moved to frm120 the audio is still in sync with the original one, just trimmed to start later on. The end source has been moved in, trimming the audio to stop earlier. You can also add silence to the start of the sound if needed.

Thought I'd share that as it's actually going to be really useful, think I'll push for the UI  integration from Autodesk so that the sound node is treated like the clips are, about to be trimmed directly rather than having to set the attrs up manually.

Mark

4 comments:

  1. I'm trying to work around an annoying bug here with Sound offsets and Playblasts, using some MEL, but it's not working, curious to know if you have found a solution.

    I'm animating a character dancing to some music, and that involves regular playblasts to F-Check, so I can check how the motion is syncing up with the sound. this works fine if I playblast from the beginning of the animation, but if I have the playrange reduced and just PB a section of it (say for example frame 100 to 200 instead of 1 to 200) the audio in the resulting playblast always starts from the beginning of the audio clip, so the sync is totally broken.

    It's pretty tedious playblasting from frame 1 all the time when I'm working on a section of the animation in the middle or end, so I've tried various things to convince Maya to offset the music before playblasting, but none seem to work. If I try the 'Offset' 'Sound Start' and 'Sound End' attributes of the sound file they work fine in the viewport while running the scene, but when I playblast the audio seems to ignore this and always starts from the beginning.

    ReplyDelete
  2. Sorry, should have said - Maya 2012, Win 7 64 (I believe this bug is present in Maya 2011 too).

    ReplyDelete
  3. Playblasting with audio is...... crap for want of a better word. In fact I'm going to expand on my other post about Playblasting shortly to cover Audio issues. I've just tried doing what you're saying but outputting via XVID to avi and changing timeranges does work fine, audio is consistant. That said are you firing the Playblast mel command off....?

    ReplyDelete
  4. Thanks for your reply.

    When I playblast to AVI it does work correctly, but if I use fcheck and PB a section of the animation (not including the very 1st frame) then the audio is always playing from the start of the audio file in fcheck. So I guess the bug is with fcheck itself? I can live with using AVIs but would much prefer if fcheck would work properly as it's much better when animating lip sync as you can scrub the audio while checking your work.

    ReplyDelete