freeverb

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 2 Imported by: 2

README

freeverb-go

A Go implementation of the Freeverb reverberator.

See readme.txt for the original Freeverb README.

Installation

go get github.com/jfhamlin/freeverb-go

Usage

import "github.com/jfhamlin/freeverb-go"

var (
	revmod = freeverb.NewRevModel()
)

func Process(wet, damp, roomSize float32, inputLeft, inputRight []float32) (left, right []float32) {
	// See godoc for a full list of parameters
	revmod.SetWet(wet)
	revmod.SetDamp(damp)
	revmod.SetRoomSize(roomSize)

	n := len(input)
	outputLeft := make([]float32, n)
	outputRight := make([]float32, n)
	revmod.ProcessReplace(inputLeft, inputRight, outputLeft, outputRight, n, 1)
	return outputLeft, outputRight
}

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RevModel

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

RevModel is a reverb model.

func NewRevModel

func NewRevModel() *RevModel

func (*RevModel) GetDamp

func (rm *RevModel) GetDamp() float32

func (*RevModel) GetDry

func (rm *RevModel) GetDry() float32

func (*RevModel) GetMode

func (rm *RevModel) GetMode() float32

func (*RevModel) GetRoomSize

func (rm *RevModel) GetRoomSize() float32

func (*RevModel) GetWet

func (rm *RevModel) GetWet() float32

func (*RevModel) GetWidth

func (rm *RevModel) GetWidth() float32

func (*RevModel) Mute

func (rm *RevModel) Mute()

func (*RevModel) ProcessMix

func (rm *RevModel) ProcessMix(inputL, inputR, outputL, outputR []float32, numSamples, skip int)

ProcessMix processes a block of samples, mixing the result with the contents of outputL and outputR.

func (*RevModel) ProcessReplace

func (rm *RevModel) ProcessReplace(inputL, inputR, outputL, outputR []float32, numSamples, skip int)

ProcessReplace processes a block of samples, replacing the contents of outputL and outputR.

func (*RevModel) SetDamp

func (rm *RevModel) SetDamp(value float32)

func (*RevModel) SetDry

func (rm *RevModel) SetDry(value float32)

func (*RevModel) SetMode

func (rm *RevModel) SetMode(value float32)

func (*RevModel) SetRoomSize

func (rm *RevModel) SetRoomSize(value float32)

func (*RevModel) SetWet

func (rm *RevModel) SetWet(value float32)

func (*RevModel) SetWidth

func (rm *RevModel) SetWidth(value float32)

Jump to

Keyboard shortcuts

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