waveform

package
v0.0.0-...-69f9d57 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Waveform

type Waveform struct {
	MusicTitle string
	Wave       []int
}

Waveform has information of wave thined out

type Waveformer

type Waveformer struct {
	MusicPath         string
	SampleInterval    int
	SmoothSampleCount int
	HeightMax         int
}

Waveformer treats waveforms

func NewWaveformer

func NewWaveformer(heightMax, sampleInterval, smoothSampleCount int) *Waveformer

NewWaveformer returns instance of Waveformer

func (*Waveformer) GenWaveForm

func (w *Waveformer) GenWaveForm() (*Waveform, error)

GenWaveForm generate and normalize waveform from mp3 file

func (*Waveformer) SaveWaveImage

func (w *Waveformer) SaveWaveImage(destFile string) error

SaveWaveImage generate waveform and output it as images

Jump to

Keyboard shortcuts

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