ComfyUI Node: (SP) Waveform

Class Name

SignalProcessingWaveform

Category
Signal Processing
Author
c0ffymachyne (Account age: 5179days)
Extension
ComfyUI Signal Processing
Latest Updated
2025-05-14
Github Stars
0.02K

How to Install ComfyUI Signal Processing

Install this extension via the ComfyUI Manager by searching for ComfyUI Signal Processing
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Signal Processing 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

(SP) Waveform Description

Visualizes audio waveforms by converting audio data into customizable graphical representations.

(SP) Waveform:

The SignalProcessingWaveform node is designed to visualize audio waveforms by converting audio data into a graphical representation. This node is particularly useful for AI artists and developers who want to analyze or display audio signals in a visual format. By transforming audio input into a waveform image, it allows users to easily interpret the characteristics of the sound, such as its amplitude and frequency over time. The node processes audio data by converting it to a mono format, ensuring consistency in visualization, and then plots the waveform using customizable parameters like color, background color, and dimensions. This visualization can be beneficial for understanding audio patterns, debugging audio processing algorithms, or simply creating visually appealing representations of sound.

(SP) Waveform Input Parameters:

audio_input

The audio_input parameter is a tensor that contains the audio data to be visualized. It can be in the form of [channels, samples] or [batch, channels, samples]. The node processes this input by converting it to a mono format, which involves averaging the channels if there are multiple. This ensures that the waveform is consistent and easy to interpret. The input must be a torch.Tensor, and it is crucial for the waveform visualization process.

color

The color parameter specifies the color of the waveform line in the visualization. It accepts color names or hexadecimal color codes, with the default being "black". This parameter allows you to customize the appearance of the waveform to match your aesthetic preferences or to ensure visibility against the background color.

background_color

The background_color parameter defines the color of the background on which the waveform is plotted. It accepts color names or hexadecimal color codes, with the default being "white". This parameter is important for ensuring that the waveform is clearly visible and aesthetically pleasing.

width

The width parameter sets the width of the waveform image in pixels. The default value is 800, and it determines the horizontal size of the visualization. Adjusting this parameter can help fit the waveform into different display contexts or resolutions.

height

The height parameter sets the height of the waveform image in pixels. The default value is 200, and it determines the vertical size of the visualization. This parameter can be adjusted to emphasize different aspects of the waveform, such as its amplitude.

line_width

The line_width parameter controls the thickness of the waveform line in the visualization. The default value is 1.0, and it can be adjusted to make the waveform more or less prominent in the image. This is useful for enhancing visibility or achieving a specific visual style.

(SP) Waveform Output Parameters:

image

The image output parameter is a tensor representing the generated waveform image. This image is a visual representation of the audio input, converted into a format that can be easily displayed or further processed. The image is normalized to a range of [0, 1] and includes a batch dimension, making it compatible with various image processing workflows. This output is essential for visualizing and analyzing the audio data in a graphical format.

(SP) Waveform Usage Tips:

  • Ensure that your audio_input is a valid torch.Tensor and properly formatted to avoid errors during processing.
  • Customize the color and background_color parameters to enhance the visibility and aesthetic appeal of the waveform, especially when integrating it into different visual contexts.
  • Adjust the width and height parameters to fit the waveform image into your desired display area or to emphasize specific aspects of the audio signal.
  • Use the line_width parameter to make the waveform more prominent or subtle, depending on your visualization needs.

(SP) Waveform Common Errors and Solutions:

Unsupported waveform shape: <waveform.shape>

  • Explanation: This error occurs when the audio_input tensor has an unsupported shape that the node cannot process.
  • Solution: Ensure that the audio_input tensor is in one of the supported formats: [channels, samples] or [batch, channels, samples]. Reshape or preprocess your audio data accordingly before passing it to the node.

The 'waveform' key is missing or None in 'audio_input'.

  • Explanation: This error indicates that the audio_input does not contain a valid waveform tensor.
  • Solution: Verify that the audio_input dictionary includes a valid waveform key with a torch.Tensor value. Ensure that the audio data is correctly loaded and passed to the node.

Expected 'waveform' to be a torch.Tensor, got <type(waveform)>.

  • Explanation: This error occurs when the waveform in audio_input is not a torch.Tensor.
  • Solution: Convert your audio data to a torch.Tensor before passing it to the node. Use appropriate libraries or functions to ensure the data type is correct.

(SP) Waveform Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Signal Processing
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.