backgroundloops

package
v0.0.0-...-de4951f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitBackgroundLoops

func InitBackgroundLoops(displayWidth int, displayHeight int, minVal, maxVal float64)

InitBackgroundLoops creates the BackgroundLoop types array and initializes every one of them

Types

type BackgroundLoop

type BackgroundLoop interface {
	InitBackgroundLoop(int, int, float64, float64)
	Draw(*rgbmatrix.Canvas, dmx.DMXData, []SoundEnergyTriBand)
}

Wave is used for the implementation of any possible display patterns

func GetBackgroundLoopNum

func GetBackgroundLoopNum(i int) BackgroundLoop

func GetFirstBackgroundLoop

func GetFirstBackgroundLoop() BackgroundLoop

GetFirstWave returns the first BackgroundLoop type from the array

func GetNextBackgroundLoop

func GetNextBackgroundLoop() BackgroundLoop

GetNextWave returns the next BackgroundLoop type from the slice

type CenterBackground

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

CenterBackground defines the values used for the display of the wave that are specific to this pattern type

func (*CenterBackground) Draw

func (cb *CenterBackground) Draw(c *rgbmatrix.Canvas, dmxData dmx.DMXData, soundHistory []SoundEnergyTriBand)

Draw adds the background details to the canvas on the matrix

func (*CenterBackground) InitBackgroundLoop

func (cb *CenterBackground) InitBackgroundLoop(displayWidth int, displayHeight int, minVal, maxVal float64)

InitBackgroundLoop does the initial calculation of the reused variables in the draw loop

type CenterBackgroundInst

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

CenterBackgroundInst defines the values used for the display of the wave that are specific to this pattern type

func (*CenterBackgroundInst) Draw

func (cbi *CenterBackgroundInst) Draw(c *rgbmatrix.Canvas, dmxData dmx.DMXData, soundHistory []SoundEnergyTriBand)

Draw adds the background details to the canvas on the matrix

func (*CenterBackgroundInst) InitBackgroundLoop

func (cbi *CenterBackgroundInst) InitBackgroundLoop(displayWidth int, displayHeight int, minVal, maxVal float64)

InitBackgroundLoop does the initial calculation of the reused variables in the draw loop

type DesaturateBackground

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

DesaturateBackground defines the values used for the display of the wave that are specific to this pattern type

func (*DesaturateBackground) Draw

func (db *DesaturateBackground) Draw(c *rgbmatrix.Canvas, dmxData dmx.DMXData, soundHistory []SoundEnergyTriBand)

Draw adds the background details to the canvas on the matrix

func (*DesaturateBackground) InitBackgroundLoop

func (db *DesaturateBackground) InitBackgroundLoop(displayWidth int, displayHeight int, minVal, maxVal float64)

InitBackgroundLoop does the initial calculation of the reused variables in the draw loop

type HistoryBackground

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

HistoryBackground defines the values used for the display of the wave that are specific to this pattern type

func (*HistoryBackground) Draw

func (b *HistoryBackground) Draw(c *rgbmatrix.Canvas, dmxData dmx.DMXData, soundHistory []SoundEnergyTriBand)

Draw adds the background details to the canvas on the matrix

func (*HistoryBackground) InitBackgroundLoop

func (b *HistoryBackground) InitBackgroundLoop(displayWidth int, displayHeight int, minVal, maxVal float64)

InitBackgroundLoop does the initial calculation of the reused variables in the draw loop

type NoBackground

type NoBackground struct {
}

MirrorWave defines the values used for the display of the wave that are specific to this pattern type

func (*NoBackground) Draw

func (m *NoBackground) Draw(c *rgbmatrix.Canvas, dmxData dmx.DMXData, soundHistory []SoundEnergyTriBand)

Draw adds the background details to the canvas on the matrix

func (*NoBackground) InitBackgroundLoop

func (b *NoBackground) InitBackgroundLoop(displayWidth int, displayHeight int, minVal, maxVal float64)

InitWave does the initial calculation of the reused variables in the draw loop

type ShiftHueBackground

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

ShiftHueBackground defines the values used for the display of the wave that are specific to this pattern type

func (*ShiftHueBackground) Draw

func (shb *ShiftHueBackground) Draw(c *rgbmatrix.Canvas, dmxData dmx.DMXData, soundHistory []SoundEnergyTriBand)

Draw adds the background details to the canvas on the matrix

func (*ShiftHueBackground) InitBackgroundLoop

func (shb *ShiftHueBackground) InitBackgroundLoop(displayWidth int, displayHeight int, minVal, maxVal float64)

InitBackgroundLoop does the initial calculation of the reused variables in the draw loop

type SoundEnergyTriBand

type SoundEnergyTriBand struct {
	Bass, Mid, Treble float64
	Tm                time.Time
}

Jump to

Keyboard shortcuts

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