visual

package module
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Unlicense Imports: 6 Imported by: 0

README

visual-audio

An audio visualizer to - hopefully - be used at kiosk.social for audio stuff

sample sample

Samples

fiber

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(r io.Reader, nSamples int) ([]int16, error)

Read reads a given reader (r) and returns N samples (nSamples)

func ReadPath added in v1.2.0

func ReadPath(path string, nSamples int) ([]int16, error)

Read reads a given file (path) and returns N samples (nSamples)

Types

type Canvas

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

Canvas is to contain data for our funcs

func Blank

func Blank(samples []int16, spacing, sampleWidth, height int, square bool) *Canvas

Blank will return a new *Canvas

func (*Canvas) Branding

func (c *Canvas) Branding(im image.Image, alpha float64, repeat bool) (*Canvas, error)

Branding takes an image (im) to then provide a branded canvas

func (*Canvas) BrandingPath added in v1.2.0

func (c *Canvas) BrandingPath(path string, alpha float64, repeat bool) (*Canvas, error)

BrandingPath takes a path to an image to then provide a branded canvas

func (*Canvas) CircleWaves added in v1.2.5

func (c *Canvas) CircleWaves(r, g, b int, padding float64) *Canvas

CircleWaves will generate a visual representation of the audio from samples in a circle

func (*Canvas) Image

func (c *Canvas) Image() image.Image

Image will provide the image

func (*Canvas) Save

func (c *Canvas) Save(out string) error

Save will save the image to a specific path (out)

func (*Canvas) Waves

func (c *Canvas) Waves(r, g, b int, padding float64) *Canvas

Waves will generate a visual representation of the audio from samples

Jump to

Keyboard shortcuts

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