H3 Audio Smear (hold-map stretch, pitch kept) [alpha]:
H3AudioSmear is a specialized node designed to manipulate audio tracks by stretching them to align with a dilated timeline, similar to how video frames are smeared in H3 Time Smear. This process is crucial for synchronizing audio with video that has been slowed down, ensuring that the audio matches the altered timing of the video. The primary purpose of H3AudioSmear is to prepare audio for a second pass rendering, where the audio is seeded with a slowed performance rather than generating new audio at a natural rate. This ensures that the audio and video remain in sync, particularly in scenarios where the video has been intentionally slowed down. The node uses a phase vocoder technique, which preserves the pitch of the audio while stretching it, although the fine details may become rough. This roughness is acceptable as the injection strength during rendering will reintroduce the necessary details. By using H3AudioSmear, you can ensure that the audio track maintains its timing integrity, preventing issues such as mismatched lip movements or rushed audio segments.
H3 Audio Smear (hold-map stretch, pitch kept) [alpha] Input Parameters:
audio
The audio parameter represents the baseline audio clip that you want to stretch. It is crucial for defining the original audio waveform that will be manipulated to match the dilated timeline. The audio input should be in a format that includes the waveform data and the sample rate. This parameter directly impacts the node's execution as it determines the source material that will be stretched. There are no specific minimum, maximum, or default values for this parameter, but it should be a valid audio waveform with an appropriate sample rate.
hold_map
The hold_map parameter is a JSON-encoded string that specifies the stretching pattern for the audio. It contains a series of "holds" that define how much each segment of the audio should be stretched. This parameter is critical as it dictates the timing adjustments applied to the audio, ensuring it aligns with the smeared video timeline. The hold map should be carefully crafted to reflect the desired timing changes, with each hold value representing the stretch factor for a corresponding segment of the audio.
fps
The fps parameter stands for frames per second and is used to calculate the timing adjustments needed for the audio to match the video. It is essential for determining the rate at which the audio should be stretched to align with the video frames. The fps value should match the frame rate of the video to ensure proper synchronization. There are no specific minimum, maximum, or default values, but it should be consistent with the video frame rate.
H3 Audio Smear (hold-map stretch, pitch kept) [alpha] Output Parameters:
waveform
The waveform output parameter represents the stretched audio waveform resulting from the smear process. This output is crucial as it provides the modified audio that aligns with the dilated video timeline. The waveform data can be used in subsequent processing steps, such as encoding or rendering, to ensure that the audio remains in sync with the video. The output waveform maintains the original pitch of the audio while adjusting its timing to match the video.
sample_rate
The sample_rate output parameter indicates the sample rate of the stretched audio waveform. This is important for ensuring that the audio is processed and played back at the correct speed. The sample rate should remain consistent with the original audio input to maintain audio quality and synchronization.
H3 Audio Smear (hold-map stretch, pitch kept) [alpha] Usage Tips:
- Ensure that the
hold_mapaccurately reflects the desired timing changes for the audio to prevent synchronization issues with the video. - Match the
fpsparameter with the video frame rate to maintain proper alignment between the audio and video. - Use the output waveform in conjunction with video rendering processes to ensure that the audio and video remain in sync throughout the production.
H3 Audio Smear (hold-map stretch, pitch kept) [alpha] Common Errors and Solutions:
RuntimeError: Audio length mismatch
- Explanation: This error occurs when the length of the audio waveform does not match the expected length after applying the hold map.
- Solution: Verify that the
hold_mapis correctly defined and that the sum of the holds matches the intended stretch length. Adjust the hold values if necessary to ensure proper alignment.
ValueError: Invalid hold map format
- Explanation: This error indicates that the
hold_mapparameter is not in the correct JSON format or contains invalid values. - Solution: Ensure that the
hold_mapis a valid JSON string with appropriate hold values. Double-check the syntax and structure of the JSON data to resolve this issue.
