Go tools for audio processing & creation ?

GoAudio ?

Build Status Mentioned in Awesome Go

GoAudio is an audio processing library, currently supporting WAVE files, although some tools such as the synth and breakpoints are encoding-agnostic, so you could combine them with a different library for storing the data and using GoAudio only as a means to generate the waveforms.

Features

Blog

If you want to know more about how this code works and what you can do with it, I write about this code and other audio related programs over on my blog: dylanmeeus.github.io.

Owner
Dylan Meeus
Go | Linux | Vim | Coffee
Dylan Meeus
Comments
  • wave.ReadWaveFile segfault on 24bit wav files

    wave.ReadWaveFile segfault on 24bit wav files

    Greetings!

    It looks like parseRawData() segfaults on 24bit wav files, because there's no conversion function defined here

    	byteSizeToIntFunc = map[int]bytesToIntF{
    		16: bits16ToInt,
    		32: bits32ToInt,
    	}
    
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10a3643]
    
    goroutine 1 [running]:
    github.com/DylanMeeus/GoAudio/wave.parseRawData(0xc00010000c, 0x4, 0x102880, 0x10, 0x1, 0x2, 0xac44, 0x40998, 0x6, 0x18, ...)
    	...go/pkg/mod/github.com/!dylan!meeus/[email protected]/wave/reader.go:145 +0x143
    github.com/DylanMeeus/GoAudio/wave.ReadWaveFile(0x10d7ea8, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    

    I imagine the omission is due to there being no math constant defined for a max 24bit integer, which is understandable. It looks like other packages work around this by simply defining their own -- either by defining it as 8bitmax+16bitmax, or, in the case of mysql:

    const (
    	MaxUint24 = 1<<24 - 1
    	MaxInt24  = 1<<23 - 1
    	MinInt24  = -1 << 23
    )
    

    I'm happy to drop a PR if it'd be helpful, but I figured I'd just give you a heads up first, as I'm not 100% sure that my solution is correct

    Cheers,

  • bug(reader): reader should work with 24bit waves

    bug(reader): reader should work with 24bit waves

    This commit provides functions for handling 24bit waves. It needs another pair of eyes, but I think this is how you'd want to go about it. Addresses the pre-existing segfault.

  • PCM to WAV

    PCM to WAV

    Hello there,

    I want to create a wav file from PCM raw data but I can't, can you help me how can I approach this goal? PCM data is basically slice of bytes []byte(" ")

  • Examples

    Examples

    Hello there,

    how can I use GoAudio to write a wav file from PCM_LINEAR16 slice of bytes? audioPCMBytes is bytes from an audio.raw with 1 channel

    audioPCMBytes:=[]byte("......")
    // to .wav file
    

    is possible?

  • Support parsing 8bit uint and float format

    Support parsing 8bit uint and float format

    Added code to support parsing 8bit uint and float32 format wave file. Float format file has additional subchunk "fact", so it need to be skipped.

  • Lowpass/Highpass bug

    Lowpass/Highpass bug

    Hi, It seems that neither lowpass nor highpass functions are working. One issue that i can see is that they return a float64 slice filled with 0s, due to this line:

      output := make([]float64, len(fs))
       copy(fs, output)
       ////// Should be copy(output, fs)
    

    Same bug exists in both functions (Lowpass and Highpass).

    Another issue is even when the above is fixed and the returned data is imported into Audacity for spectrum analysis, you can see that it looks identical to unfiltered data, eg: no low/high pass filtering is taking affect.

    Thank you

  • Handle 'JUNK' chunks when reading in wave files

    Handle 'JUNK' chunks when reading in wave files

    I was trying to use this module to read in this wave file and was having some trouble.

    It looks like before the "fmt" chunk, it's possible to have a chunk that begins with "JUNK" that should be skipped.

    I believe it's described in this page talking about the "RIFF" format: https://www.daubnet.com/en/file-format-riff The fix would go around here: https://github.com/DylanMeeus/GoAudio/blob/master/wave/reader.go#L60

    Tangentially, there was a similar issue on the tensorflow project: https://github.com/tensorflow/tensorflow/issues/26247

  • Refactor Gtable from Struct to Type Alias

    Refactor Gtable from Struct to Type Alias

    Gtable is just a lightweight wrapper around []float64 at the moment. This can be refactored into a type Gtable []float64 alias. Or, even better perhaps, type Table []float64 to represent any kind of table (guard table / wave table).

Package flac provides access to FLAC (Free Lossless Audio Codec) streams.

flac This package provides access to FLAC (Free Lossless Audio Codec) streams. Documentation Documentation provided by GoDoc. flac: provides access to

Jan 5, 2023
GAAD (Go Advanced Audio Decoder)

GAAD (Go Advanced Audio Decoder) Package currently provides AAC parsing capabilities. This package performs a full parse of AAC-LC and HE-AACv1 bitstr

Oct 24, 2022
Mini audio library

malgo Go bindings for miniaudio library. Requires cgo but does not require linking to anything on the Windows/macOS and it links only -ldl on Linux/BS

Dec 31, 2022
Sequence-based Go-native audio mixer for music apps

Mix https://github.com/go-mix/mix Sequence-based Go-native audio mixer for music apps See demo/demo.go: package main import ( "fmt" "os" "time"

Dec 1, 2022
Go bindings for the PortAudio audio I/O library

portaudio This package provides an interface to the PortAudio audio I/O library. See the package documentation for details. To build this package you

Jan 1, 2023
Go package capable of generating waveform images from audio streams. MIT Licensed.

waveform Go package capable of generating waveform images from audio streams. MIT Licensed. This library supports any audio streams which the azul3d/e

Nov 17, 2022
CLI audio player written in go.
CLI audio player written in go.

A very minimal CLI audio player.

Dec 13, 2022
alto is a program built for audio management.
alto is a program built for audio management.

alto, a music organizer alto is a program built for audio management. It's purpose is to provide the user the means to create a path construct to move

Oct 10, 2022
Terrible Audio Downloader

Terrible Audio Downloader This is just a small go project I did for myself, to manage my audio library to get away from spotify. All it does is downlo

Oct 30, 2021
Audio visualizer in Go
Audio visualizer in Go

demo_audio_visualizer Simple audio visualizer in Go Used libraries: raylib-go go-mp3 oto go-dsp To disable the additional console window on Windows OS

Dec 4, 2022
Local-audio - Web walking audio tour platform proof-of-concept

Goal: Proof of concept for a Web Audio walk platform Data retention dynamdo db "time to live" expires in 1 day from creation of record set in add.go s

Jan 9, 2022
siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.
siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

siusiu (suite-suite harmonics) a suite used to manage the suite, designed to free penetration testing engineers from learning and using various security tools, reducing the time and effort spent by penetration testing engineers on installing tools, remembering how to use tools.

Dec 12, 2022
The Babylon project is a re-creation of my original PBX network integration tools from the early 1990's, in go.

What is Babylon? The Babylon project is a re-creation of many of my original PBX network integration tools from the early 1990's, in go. Many of these

Jan 23, 2022
Harbormaster - Toolkit for automating the creation & mgmt of Docker components and tools

My development environment is MacOS with an M1 chip and I mostly develop for lin

Feb 17, 2022
Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API and Client/Server architecture.
Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API and Client/Server architecture.

unite Pokemon Unite scoreboard HUD and extra tools running over captured game feeds using the OpenCV video processing API. Client (OBS Live) Server Ar

Dec 5, 2022
gNXI Tools - gRPC Network Management/Operations Interface Tools

gNxI Tools gNMI - gRPC Network Management Interface gNOI - gRPC Network Operations Interface A collection of tools for Network Management that use the

Dec 15, 2022
Chanify is a safe and simple notification tools. This repository is command line tools for Chanify.

Chanify is a safe and simple notification tools. For developers, system administrators, and everyone can push notifications with API.

Dec 29, 2022
Tools - This subrepository holds the source for various packages and tools that support

Go Tools This subrepository holds the source for various packages and tools that

Jan 12, 2022
[DEPRECATED] Go package authcookie implements creation and verification of signed authentication cookies.

Package authcookie import "github.com/dchest/authcookie" Package authcookie implements creation and verification of signed authentication cookies. Co

Dec 22, 2022
Heatmap creation stuff for go.
Heatmap creation stuff for go.

Heatmaps This is a toolkit for creating heatmaps. Heatmaps are awesome. I use them for a few things, and now you can, too. There are quite a few thing

Jan 4, 2023