bass

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 5 Imported by: ? modules, 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

bass

Generate bass synth audio samples.

Note that this package is experimental and a work in progress!

  • Version: 0.0.1
  • License: MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyEnvelope

func ApplyEnvelope(samples []float64, attack, decay, sustain, release float64, sampleRate int) []float64

ApplyEnvelope applies an ADSR envelope to the waveform

func DetunedOscillators

func DetunedOscillators(freq float64, detune []float64, length int, sampleRate int) []float64

DetunedOscillators generates multiple detuned sawtooth oscillators and combines them

func Drive

func Drive(samples []float64, gain float64) []float64

Drive applies a simple drive effect by scaling and clipping

func Limiter

func Limiter(samples []float64) []float64

Limiter ensures the signal doesn't exceed [-1, 1] range

func LowPassFilter

func LowPassFilter(samples []float64, cutoff float64, sampleRate int) []float64

LowPassFilter applies a basic low-pass filter to the samples

func SaveToWav

func SaveToWav(filename string, samples []float64, sampleRate int) error

SaveToWav saves the waveform to a wav file

func SawtoothOscillator

func SawtoothOscillator(freq float64, length int, sampleRate int) []float64

SawtoothOscillator generates a sawtooth waveform at a specific frequency

Types

This section is empty.

Directories

Path Synopsis
cmd
create command
cmd/create/main.go
cmd/create/main.go

Jump to

Keyboard shortcuts

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