sox

package
v0.0.0-...-dc47d55 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GarbageCollection = false
View Source
var TempDir = os.TempDir()

TempDir is where the temporary intermediate files are held

View Source
var TempPrefix = "sox"

TempPrefix is a unique indicator of the temporary files

View Source
var TempType = "wav"

TempType is the type of file to be generated (should be "wav")

Functions

func Clean

func Clean() (err error)

Clean will remove files created after each function

func CopyPaste

func CopyPaste(fname string, startPos float64, endPos float64, pastePos float64, crossfade float64, leeway0 ...float64) (fname2 string, err error)

func Depop

func Depop(fname string) (fname2 string, err error)

func FFT

func FFT(fname string) (data string, err error)

FFT

func Gain

func Gain(fname string, gain float64) (fname2 string, err error)

Gain applies gain

func Info

func Info(fname string) (samplerate int, channels int, err error)

Info returns the sample rate and number of channels for file

func Join

func Join(fnames ...string) (fname2 string, err error)

Join will concatonate the files

func Length

func Length(fname string) (length float64, err error)

Length returns the length of the file in seconds

func Mix

func Mix(fnames ...string) (fname2 string, err error)

Mix will mix the files

func MustFloat

func MustFloat(t ...interface{}) float64

MustFloat returns only the first argument of any function, as a float

func MustString

func MustString(t ...interface{}) string

MustString returns only the first argument of any function, as a string

func Norm

func Norm(fname string) (fname2 string, err error)

Norm normalizes the audio

func Paste

func Paste(fname string, piece string, pasteStart float64, crossfade float64) (fname2 string, err error)

Paste pastes any piece into a place in the audio, assumes that the piece has "crossfade" length on both sides in addition to its current length.

func Pitch

func Pitch(fname string, notes int) (fname2 string, err error)

Pitch repitched the audio

func PostProcess

func PostProcess(fname string, gain float64) (fname2 string, err error)

PostProcess

func Repeat

func Repeat(fname string, n int) (fname2 string, err error)

Repeat will add n repeats to the audio

func RetempoSpeed

func RetempoSpeed(fname string, old_tempo float64, new_tempo float64) (fname2 string, err error)

RetempoSpeed will change the tempo of the audio and pitch

func RetempoStretch

func RetempoStretch(fname string, old_tempo float64, new_tempo float64) (fname2 string, err error)

RetempoStretch will change the tempo of the audio trying to keep pitch similar

func Reverse

func Reverse(fname string) (fname2 string, err error)

Reverse will reverse the audio

func SampleRate

func SampleRate(fname string, srCh ...int) (fname2 string, err error)

SampleRate changes the sample rate

func SilenceAppend

func SilenceAppend(fname string, length float64) (fname2 string, err error)

SilenceAppend appends silence to a file

func SilencePrepend

func SilencePrepend(fname string, length float64) (fname2 string, err error)

SilencePrepend prepends silence to a file

func SilenceTrim

func SilenceTrim(fname string) (fname2 string, err error)

SilenceTrim trims silence around a file

func SilenceTrimEnd

func SilenceTrimEnd(fname string) (fname2 string, err error)

SilenceTrimEnd trims silence from end of file

func Slowdown

func Slowdown(fname string, slowdown float64) (fname2 string, err error)

RetempoStretch will change the tempo of the audio trying to keep pitch similar

func Stretch

func Stretch(fname string, stretch float64) (fname2 string, err error)

Stretch does a time stretch

func Stutter

func Stutter(fname string, stutter_length float64, pos_start float64, count float64, xfadePieceStutterGain ...float64) (fname2 string, err error)

Stutter does a stutter effect

func Tmpfile

func Tmpfile() string

func Trim

func Trim(fname string, start float64, length ...float64) (fname2 string, err error)

Trim will trim the audio from the start point (with optional length)

Types

This section is empty.

Jump to

Keyboard shortcuts

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