foxDSP

package
v0.0.0-...-3182ee9 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FilterLength = 4000

Variables

This section is empty.

Functions

func CalcBiquadFilter

func CalcBiquadFilter(filterType string, centreFrequency, sampleRate int, peakGain, width float64, slopeType string) []float64

func CalculateMaxGain

func CalculateMaxGain(audioData []float64) float64

Calculates the Maximum Gain Value - used for Normalization functions

func CascadeFilters

func CascadeFilters(coefficients [][]float64, myFilterLength int) []float64

func ConvolveImpulsesFFT

func ConvolveImpulsesFFT(impulse, signal []float64) []float64

func ConvolveImpulsesFFTwithTail

func ConvolveImpulsesFFTwithTail(impulse, signal []float64, overlapSize int, tail []float64) ([]float64, []float64)

func ExportWavFile

func ExportWavFile(filename string, sampleRate, bitDepth int, sm *StreamManager) error

ExportWavFile exports the WAV file using the CreateMemoryStream function

func GenerateImpulseResponse

func GenerateImpulseResponse(a0, a1, a2, b0, b1, b2 float64) []float64

func IIRFilter

func IIRFilter(input []float64, b [3]float64, a [3]float64, output []float64)

func Normalize

func Normalize(inputSamples [][]float64, targetLevel float64) float64

Normalizes Audio Data in supploed samples

func NormalizeAudioImpulse

func NormalizeAudioImpulse(audioImpulse []float64, targetLevel float64, max float64) []float64

func ReadWavFile

func ReadWavFile(filename string) ([][]float64, uint32, uint16, error)

Types

type StreamManager

type StreamManager struct {
	InputImpulse [][]float64
}

StreamManager is the equivalent of the C# StreamManager struct

func (*StreamManager) CreateMemoryStream

func (sm *StreamManager) CreateMemoryStream(sampleRate, bitDepth int) (*bytes.Buffer, error)

CreateMemoryStream is the equivalent of the C# CreateMemoryStream method

Jump to

Keyboard shortcuts

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