shapee

package module
v0.0.0-...-e53e6af Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Shapee (reborn)

Implementation of Christopher Penrose's paper Frequency Shaping of Audio Signals.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComplexToPolar

func ComplexToPolar(stft [][]complex128) ([][]float64, [][]float64)

ComplexToPolar calculates the polar form of a complex STFT.

func ComputeISTFT

func ComputeISTFT(stft [][]complex128, winShift int) []float64

ComputeISTFT recovers the time-series from an STFT in complex form.

func ComputeSTFT

func ComputeSTFT(wave []float64, winShift int, winLen int) [][]complex128

ComputeSTFT computes the STFT of the input waveform and returns it in complex form. It uses a Hamming window.

func ExportWavAudio

func ExportWavAudio(wave [][]float64, format *audio.Format, outPath string)

ExportWavAudio exports a .wav file from a 2D float64 array.

func ImportWavAudio

func ImportWavAudio(inputPath string) ([][]float64, *audio.Format)

ImportWavAudio imports a .wav file and returns the audio waveform as well as its format information.

func PolarToComplex

func PolarToComplex(stftMag [][]float64, stftAng [][]float64) [][]complex128

PolarToComplex calculates the complex form of a polar STFT.

Types

type Shaper

type Shaper struct {
	AmpMag    [][]float64
	FreqMag   [][]float64
	FreqPhase [][]float64
	W         int
}

Shaper is a simple struct for containing the data needed for the FreqShape function.

func (*Shaper) FreqShape

func (shaper *Shaper) FreqShape() ([][]float64, [][]float64)

FreqShape completes the audio transformation as proposed in Christopher Penrose's paper "Frequency Shaping of Audio Signals".

Directories

Path Synopsis
cmd
shapee command

Jump to

Keyboard shortcuts

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