Go tools for audio processing & creation ?

Overview

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.

Issues
  • 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,

    opened by gkuchta 4
  • 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.

    opened by gkuchta 2
  • 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(" ")

    opened by pablodz 0
  • 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?

    opened by pablodz 0
  • 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

    opened by conotto 1
  • 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

    bug 
    opened by ryjose1 6
  • 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).

    good first issue 
    opened by DylanMeeus 0
Owner
Dylan Meeus
Go | Linux | Vim | Coffee
Dylan Meeus
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

null 208 May 14, 2022
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

null 98 May 7, 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

Milan Nikolic 171 May 7, 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"

null 154 Apr 11, 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

Gordon Klaus 503 May 6, 2022
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

Matt Layher 349 Apr 18, 2022
CLI audio player written in go.

A very minimal CLI audio player.

Dave Hulihan 42 Apr 8, 2022
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

null 20 Apr 5, 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

null 0 Oct 30, 2021
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

Miretz 1 Mar 8, 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

Kai Hendry 3 Jan 9, 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

David Sugar 1 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

Gabe Susman 0 Feb 17, 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.

Re 137 May 4, 2022
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

pidgy 5 Mar 15, 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

Dmitry Chestnykh 112 Nov 19, 2021
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

Dustin Sallings 104 Jan 4, 2022
ScareCrow - Payload creation framework designed around EDR bypass.

ScareCrow More Information If you want to learn more about the techniques utlized in this framework please take a look at Part 1 and Part 2 Descriptio

Optiv Security 1.8k May 16, 2022
a barcode creation lib for golang

Introduction This is a package for GO which can be used to create different types of barcodes. Supported Barcode Types 2 of 5 Aztec Code Codabar Code

Florian 1.1k May 11, 2022
Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation.

network-fingerprint Capture packet request/response pairs for a port and/or IP to aid in Network protocol based Nuclei Templates creation. Resources I

ProjectDiscovery 46 Apr 15, 2022
Self-service account creation and credential reset for FreeIPA

Auri Auri stands for: Automated User Registration IPA Auri implements self service account creation and reset of credentials for FreeIPA Features Requ

null 8 Apr 20, 2022
Package macho implements access to and creation of Mach-O object files.

go-macho [WIP] ?? Package macho implements access to and creation of Mach-O object files. Why ?? This package goes beyond the Go's debug/macho to: Cov

Bogdan Donchenko 6 Dec 22, 2021
Create the Provider for Zoom API and automate the creation of zoom user using terraform.

Create the Provider for Zoom API and automate the creation of zoom user using terraform.

ashish dhodria 2 Nov 20, 2021
Simple Go library for typed errors creation

go-typed-errors Why this repo was created? Main reason was to create additional methods for better error typing support. Why not to use errors.As and

Bogdan 2 Nov 5, 2021
Simple Go library for typed const errors creation

go-errors Why this repo was created? Main reason was to create additional methods for better error typing support. Features Errors as constants errors

Bogdan 2 Nov 5, 2021
donLoader is a shellcode loader creation tool that uses donut to convert executable payloads into shellcode to evade detection on disk.

donLoader WARNING: This is WIP, barely anything was tested properly. Use at your own risk. Description donLoader is a shellcode loader creation tool t

blink3n 10 Mar 19, 2022
Golang based User creation and Management application. GORM, Fiber, JWT

User Creation and Management app (BACK-END) Auth Features: Create Clients (regular password + 6 one-time passwords + (optional) QR code and Secret for

Artūras 4 Apr 25, 2022
A simple re-creation of the first level for Space Invaders using Go and SDL-2.

Space Invaders Go Written in Go using SDL2 Usage This application is a sample first level for a re-creation of Space Invaders. The structure of the pr

Brandon Jernigan 0 Feb 27, 2022
List files and their creation, modification and access time on android

andfind List files and their access, modification and creation date on a Android

Tek 2 Jan 5, 2022