ComfyUI  >  Nodes  >  SaltAI_AudioViz >  Audio Compressor

ComfyUI Node: Audio Compressor

Class Name

SaltAudioCompressor

Category
SALT/AudioViz/Audio/Process
Author
SaltAI (Account age: 146 days)
Extension
SaltAI_AudioViz
Latest Updated
6/29/2024
Github Stars
0.0K

How to Install SaltAI_AudioViz

Install this extension via the ComfyUI Manager by searching for  SaltAI_AudioViz
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter SaltAI_AudioViz in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Audio Compressor Description

Dynamic audio volume reduction for balanced, polished sound in mastering and mixing.

Audio Compressor:

The SaltAudioCompressor node is designed to dynamically reduce the volume of an audio signal that exceeds a specified threshold, making it an essential tool for audio mastering and mixing. This node helps in controlling the dynamic range of audio, ensuring that louder parts are softened while quieter parts remain unaffected, resulting in a more balanced and polished sound. By using this node, you can prevent audio clipping and distortion, enhance the overall listening experience, and ensure that your audio content maintains a consistent volume level. The SaltAudioCompressor is particularly useful for AI artists who want to refine their audio outputs without delving into complex audio engineering techniques.

Audio Compressor Input Parameters:

audio

This parameter takes the raw audio data that you want to compress. The audio should be in WAV format and provided as a byte stream. The quality and characteristics of the input audio will directly affect the output, so ensure that the audio is clear and free from unwanted noise.

threshold_dB

The threshold in decibels (dB) at which the compressor starts to reduce the volume of the audio signal. Signals above this threshold will be compressed. The threshold can typically range from -60 dB to 0 dB, with a common default value around -24 dB. Lowering the threshold will result in more of the audio being compressed.

ratio

The ratio determines the amount of compression applied to the audio signal that exceeds the threshold. It is expressed as a ratio, such as 2:1, 4:1, etc. A higher ratio means more compression. Typical values range from 1:1 (no compression) to 20:1 (limiting). A common default value is 4:1.

attack_ms

The attack time in milliseconds (ms) specifies how quickly the compressor responds to audio signals that exceed the threshold. Shorter attack times (e.g., 1-10 ms) allow the compressor to react quickly, while longer attack times (e.g., 20-100 ms) result in a slower response. The minimum value is typically 0.01 ms, and the default value is around 10 ms.

release_ms

The release time in milliseconds (ms) determines how quickly the compressor stops reducing the volume after the audio signal falls below the threshold. Shorter release times (e.g., 50-100 ms) allow the compressor to stop quickly, while longer release times (e.g., 200-1000 ms) result in a more gradual return to the original volume. The minimum value is typically 0.01 ms, and the default value is around 100 ms.

Audio Compressor Output Parameters:

compressed_audio

This parameter provides the compressed audio data as a byte stream in WAV format. The output audio will have a more controlled dynamic range, with louder parts reduced in volume according to the specified threshold and ratio, and the overall sound will be more balanced and polished.

Audio Compressor Usage Tips:

  • To achieve a natural-sounding compression, start with a moderate threshold (e.g., -24 dB) and a ratio of 4:1, then adjust the attack and release times to suit the characteristics of your audio.
  • Use shorter attack times for percussive sounds to ensure that the compressor reacts quickly to transients, and longer attack times for vocals to maintain their natural dynamics.
  • Experiment with different release times to find the right balance between a smooth and transparent compression and a more noticeable effect.

Audio Compressor Common Errors and Solutions:

ffmpeg: command not found

  • Explanation: This error occurs when the ffmpeg tool is not installed or not available in the system's PATH.
  • Solution: Install ffmpeg on your system and ensure it is accessible from the command line. You can download it from the official website or use a package manager.

Invalid audio format

  • Explanation: This error indicates that the input audio is not in the expected WAV format or is corrupted.
  • Solution: Ensure that the input audio is a valid WAV file and is correctly formatted. You can use audio editing software to convert or re-export the audio if necessary.

Permission denied

  • Explanation: This error occurs when the node does not have the necessary permissions to create or write to the temporary directory.
  • Solution: Check the permissions of the temporary directory and ensure that the node has write access. You may need to adjust the directory permissions or run the process with elevated privileges.

Audio file not found

  • Explanation: This error occurs when the specified temporary audio file paths are incorrect or the files have been deleted prematurely.
  • Solution: Verify that the temporary file paths are correctly specified and that the files exist at those locations. Ensure that the files are not deleted before the compression process is complete.

Audio Compressor Related Nodes

Go back to the extension to check out more related nodes.
SaltAI_AudioViz
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.