Free GO Library for Manipulating Audio File Formats
Play, Record, Encode, Read & Convert Audio files via GO API.
GoAudio is an open source API to manipulate audio files programmatically. Using the API, Go developer can currently process WAVE files only. The developer can read & write WAVE files, create different waveforms using different types of oscillators. Furthermore, the API allows creating automation tracks and envelopes.
Using the API, you can apply stereo panning, converted mono files to stereo and work with breakpoint files through linear interpolation. Moreover, the API allows extracting information from WAVE file format and allows writing down your own audio data in it.
At A Glance
An overview of GoAudio features.
- Read Wave
- Write Wave
- Create Wave Forms
- Automation Tracks
- Change Amplitude
- Waveform Tables
- Waveform Synthesis
- Extract Breakpoints
- Stereo Panning
GoAudio only requires GO runtime.
Getting Started with GoAudio
The recommended way to get GoAudio in your project is by using GitHub. Please use the following command for a smooth installation.
Install GoAudio from GitHub
go get github.com/DylanMeeus/GoAudio go build -i github.com/DylanMeeus/GoAudio/...
Create Audio Sine Wave via Free GO API
GoAudio allows GO developers to create audio sine waves from their own Go applications. In order to generate this, you can call math.Sin(x) method of the API and pass x as radians. To get the sine wave out of this method, you need to iterate over a range.
Generate Sound using via Open-Source GO API
The API allows the developers to generate sounds directly from your go application. First of all you need to setup sample rates and duration. A sample rate tells you how many samples per second are used to encode your sound. After that you need to set the frequency of the sound, you can use a frequency of 440HZ as pitch standard.
Change Amplitude of Wave file via GO
The API allows the developers to change amplitude of wave files In order to change the amplitude you define input file, output file and factor by which we scale the amplitude. Next you can parse these values, and read the audio data from the input file and change raw audio data type of Sample = float64 to change to amplitude of the audio file.