AudioPlayer adds wav audio playback capability to Nuke nodegraph environment. Load a wav and hear it play when scrubbing or viewing comp! Also draws waveform on top of image.
AudioPlayer
Updated: 6 March 2021
Author: hendrik
Compatible Nuke versions: 11.3 or later
Compatibility: Linux 64
What it does
AudioPlayer adds wav audio playback to Nuke nodegraph environment. Load a PCM wav audio file and hear it play when scrubbing through comp or playing back. Optionally enable/dsiable waveform overlay. Internally it uses OpenAL libraries so for it to work, system should have OpenAL support (should be in place in both Linux and Win10).
What doesn't work
Due to Nuke viewer cache regular playback will only work if cache is cleared. This isn't too comfortable but I haven't found a way to work around this yet. To enable realtime playback I suggest playing audio through very lightweight comp. Set your keys based on waveform and audio playback, then check animation in actual final comp.
How to install
Copy lines from init.py and menu.py to respective files in Nuke settings folder (usually ~/.nuke). It detects Nuke version and loads proper plugin binary.
How to use
WAV fileĀ uncompressed WAV audio file (PCM with 8 or 16bit int precision, float audio is not supported)
Show waveform draw waveform overlay on top of input image. Left channel is drawn to red, right channel to green, time marker to blue. Waveform is scaled to fit input width.
Loop when enabled, clip loops infinitely. Time marker overlay jumps to start for each loop.
Offset shifts audio in time. Positive values shift audio to future (plays later), negatives to past (plays sooner).
FPS set this to project fps value, this syncs up audio playback with frame rate in Nuke viewer.
Gain audio gain.
Piitch audio pitch, also changes audio speed.
Waveform height how high is the maximum waveform amplitude. Internally scaled with 100.0 to get column height pixel value.
Chunk size how long piece of audio makes up one audio queue buffer. Longer chunks play nicer (less crackling) but somewhat change the responsiveness.
Enable better scrubbing toggling this will do two things. First it sets chunk size to 1 internally, and second, it aborts drawing in last stripe to break buffering. Upside is that scrubbing will always work (doesn't cache), downside is that it breaks the image, so NEVER render through it!
Changelog
Version 1.0 - first effort, working prototype. Has issues with caching that mutes audio (because node is not evaluated anymore).
Use as one sees fit, if it breaks you get to keep the pieces.