Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faiface/beep
A little package that brings sound to any Go application. Suitable for playback and audio-processing.
https://github.com/faiface/beep
audio audio-playback audio-processing go golang
Last synced: 1 day ago
JSON representation
A little package that brings sound to any Go application. Suitable for playback and audio-processing.
- Host: GitHub
- URL: https://github.com/faiface/beep
- Owner: faiface
- License: mit
- Created: 2017-07-14T16:29:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T19:50:56.000Z (9 months ago)
- Last Synced: 2024-12-04T16:06:18.635Z (9 days ago)
- Topics: audio, audio-playback, audio-processing, go, golang
- Language: Go
- Homepage:
- Size: 9.54 MB
- Stars: 2,080
- Watchers: 25
- Forks: 151
- Open Issues: 76
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-game-engine-dev - Beep - Playback and audio-processing. (Libraries / Go)
- awesome-rainmana - faiface/beep - A little package that brings sound to any Go application. Suitable for playback and audio-processing. (Go)
- awesome-golang-repositories - beep - processing. (Repositories)
README
# \*\*\*\*\*NOTICE\*\*\*\*\*
This repo is not under active development anymore and has been archived. Continued development has been migrated to [gopxl/Beep](https://github.com/gopxl/beep). A big thank you to [faiface](https://github.com/faiface) for creating this awesome library and for all the hard work put into it. We encourage old and new users to check out the new repo and contribute to it.
# Beep [![GoDoc](https://godoc.org/github.com/faiface/beep?status.svg)](https://godoc.org/github.com/faiface/beep) [![Go Report Card](https://goreportcard.com/badge/github.com/faiface/beep)](https://goreportcard.com/report/github.com/faiface/beep) [![Discord Chat](https://img.shields.io/discord/699679031603494954)](https://discord.gg/q2DK4MP)
A little package that brings sound to any Go application. Suitable for playback and audio-processing.
```
go get -u github.com/faiface/beep
```## Features
Beep is built on top of its [Streamer](https://godoc.org/github.com/faiface/beep#Streamer) interface, which is like [io.Reader](https://golang.org/pkg/io/#Reader), but for audio. It was one of the best design decisions I've ever made and it enabled all the rest of the features to naturally come together with not much code.
- **Decode and play WAV, MP3, OGG, and FLAC.**
- **Encode and save WAV.**
- **Very simple API.** Limiting the support to stereo (two channel) audio made it possible to simplify the architecture and the API.
- **Rich library of compositors and effects.** Loop, pause/resume, change volume, mix, sequence, change playback speed, and more.
- **Easily create new effects.** With the `Streamer` interface, creating new effects is very easy.
- **Generate completely own artificial sounds.** Again, the `Streamer` interface enables easy sound generation.
- **Very small codebase.** The core is just ~1K LOC.## Tutorial
The [Wiki](https://github.com/faiface/beep/wiki) contains a handful of tutorials for you to get started. They teach the fundamentals and advanced topics alike. **Read them especially if you call `speaker.Init` every time you play something.**
- [Hello, Beep!](https://github.com/faiface/beep/wiki/Hello,-Beep!)
- [Composing and controlling](https://github.com/faiface/beep/wiki/Composing-and-controlling)
- [To buffer, or not to buffer, that is the question](https://github.com/faiface/beep/wiki/To-buffer,-or-not-to-buffer,-that-is-the-question)
- [Making own streamers](https://github.com/faiface/beep/wiki/Making-own-streamers)## Examples
| [Speedy Player](https://github.com/faiface/beep/tree/master/examples/speedy-player) | [Doppler Stereo Room](https://github.com/faiface/beep/tree/master/examples/doppler-stereo-room) |
| --- | --- |
| ![Speedy Player](https://github.com/faiface/beep/blob/master/examples/speedy-player/screenshot.png) | ![Doppler Stereo Room](https://github.com/faiface/beep/blob/master/examples/doppler-stereo-room/screenshot.png) |## Dependencies
For playback, Beep uses [Oto](https://github.com/hajimehoshi/oto) under the hood. Check its requirements to see what you need to install for building your application.
Running an already built application should work with no extra dependencies.
## Licence
[MIT](https://github.com/faiface/beep/blob/master/LICENSE)
## Projects using beep
- [Mifasol music server](https://github.com/jypelle/mifasol)