ledvis

package
v0.0.0-...-aa21e42 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blinking

type Blinking struct {
	// contains filtered or unexported fields
}

Blinking is a visualization that blinks the LEDs based on the normalized amplitude of the audio.

func NewBlinking

func NewBlinking(cfg VisualizerConfig) (*Blinking, error)

type ChannelStyle

type ChannelStyle uint8

ChannelStyle is the style to draw the channels in.

const (
	// MonoLeft means that a single mono channel is drawn from the left.
	MonoLeft ChannelStyle = iota
	// MonoRight means that a single mono channel is drawn from the right.
	MonoRight
	// StereoTypeSymmetricMiddle means that the left and right channels are
	// drawn symmetrically from the middle and outwards.
	StereoTypeSymmetricMiddle
)

func (ChannelStyle) NumChannels

func (s ChannelStyle) NumChannels() int

NumChannels returns the number of channels for the given channel style.

func (ChannelStyle) String

func (s ChannelStyle) String() string

type VisualizerConfig

type VisualizerConfig struct {
	Backend string
	Device  string
	// Bins is the number of bins to use for the visualizer.
	// If not set, then the number of LEDs is used.
	Bins int
	// SmoothFactor is the smooth factor to use for the visualizer.
	SmoothFactor float64
	// ChannelStyle is the channel style to use for the visualizer.
	ChannelStyle ChannelStyle
}

VisualizerConfig is the configuration for the visualizer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL