Table of Contents

Class SpectrascopeBlock

Namespace
VisioForge.Core.MediaBlocks.AudioVisualizers
Assembly
VisioForge.Core.dll

Spectrascope audio visualizer block that creates a frequency spectrum visualization of audio.

public class SpectrascopeBlock : MediaBlock, IMediaBlock, IDisposable, IMediaBlockInternals

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

The Spectrascope visualizer displays the frequency spectrum of audio signals in real-time. It performs Fast Fourier Transform (FFT) analysis on the incoming audio to show:

  • Frequency distribution from low to high frequencies along the horizontal axis
  • Amplitude/intensity of each frequency band as vertical lines or bars
  • Real-time updates showing how the frequency content changes over time This visualization is useful for audio analysis, equalization monitoring, and identifying frequency characteristics.

Constructors

SpectrascopeBlock()

Initializes a new instance of the VisioForge.Core.MediaBlocks.AudioVisualizers.SpectrascopeBlock class.

public SpectrascopeBlock()

Remarks

Creates a spectrascope block with default settings. The block accepts audio input and produces video output showing the frequency spectrum visualization.

Properties

Input

Gets the primary input pad for audio data.

public override MediaBlockPad Input { get; }

Property Value

MediaBlockPad

Inputs

Gets all input pads available on this block.

public override MediaBlockPad[] Inputs { get; }

Property Value

MediaBlockPad[]

Output

Gets the primary output pad for video data.

public override MediaBlockPad Output { get; }

Property Value

MediaBlockPad

Outputs

Gets all output pads available on this block.

public override MediaBlockPad[] Outputs { get; }

Property Value

MediaBlockPad[]

Type

Gets the media block type.

public override MediaBlockType Type { get; }

Property Value

MediaBlockType

Methods

Build()

Builds and initializes the spectrascope visualization block.

public override bool Build()

Returns

bool

true if the block was successfully built and configured; false if an error occurred.

Remarks

This method creates the underlying GStreamer FFT analysis elements, and establishes the input/output pads for audio/video data flow.

CleanUp()

Cleans up and releases all resources used by the spectrascope block.

public void CleanUp()

Remarks

This method disposes of the underlying GStreamer elements and resets the build state.

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

GetCore()

Gets the core GStreamer base element wrapped by this block.

public BaseElement GetCore()

Returns

BaseElement

The underlying VisioForge.Core.GStreamer.Base.BaseElement instance.

GetElement()

Gets the raw GStreamer element for advanced manipulation.

public Element GetElement()

Returns

Element

The native GStreamer Gst.Element instance.

IsAvailable()

Determines whether this media block is available. Correct NuGet SDK redist should be included into your project.

public static bool IsAvailable()

Returns

bool

true if this media block is available; otherwise, false.

IMediaBlockInternals.SetContext(MediaBlocksPipeline)

Sets the media pipeline context for this block.

void IMediaBlockInternals.SetContext(MediaBlocksPipeline pipeline)

Parameters

pipeline MediaBlocksPipeline

The parent media pipeline that will contain this block.

See Also