Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/britzl/blip
Blip is a library to procedurally generate and play sound effects for games
https://github.com/britzl/blip
defold defold-library sfxr
Last synced: 6 days ago
JSON representation
Blip is a library to procedurally generate and play sound effects for games
- Host: GitHub
- URL: https://github.com/britzl/blip
- Owner: britzl
- License: mit
- Created: 2017-10-10T05:19:37.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-28T20:17:50.000Z (over 2 years ago)
- Last Synced: 2024-11-02T14:33:49.590Z (13 days ago)
- Topics: defold, defold-library, sfxr
- Language: C++
- Homepage:
- Size: 1.23 MB
- Stars: 19
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-defold - Blip - bit sound effects. (Libraries / Programming Language)
README
![](images/BLIP-HERO-PA01.png)
# Blip
Blip is a library to procedurally generate and play sound effects for games. The library is based on the [Sfxr](https://github.com/grimfang4/sfxr) project by [Dr.Petter](http://www.drpetter.se/).# Installation
You can use Blip in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:https://github.com/britzl/blip/archive/master.zip
Or point to the ZIP file of a [specific release](https://github.com/britzl/blip/releases).
# Usage
You generate a sound by calling one of the predefined sound effect groups:```
local seed = 1234
local wav = blip.explosion(seed)
```This will generate a sound effect as a WAV sample using the specified seed. The seed is a number that is used to generate a specific version of the sound effect. Passing in a certain seed will always result in the same sound. Use the [example app](example/) to find seeds that you like and use them in your own project.
Once you have a sound effect that you like you set it on an existing sound component and play the sound:
```
-- set the sound data on the sound component #sound
local resource_path = go.get("#sound", "sound")
resource.set_sound(resource_path, wav)-- play the sound
sound.play("#sound")
```# Try it!
Try the [HTML5 version of the example app](https://britzl.github.io/Blip/).