Difference between revisions of "sfxr.lua"
m (whoops, forgot category) |
(Update) |
||
Line 1: | Line 1: | ||
{{#set:Name=sfxr.lua}} | {{#set:Name=sfxr.lua}} | ||
{{#set:LOVE Version=0.9.x}} | {{#set:LOVE Version=0.9.x}} | ||
− | {{#set:Description= | + | {{#set:Description=Generate your sounds dynamically, at runtime}} |
− | '''sfxr.lua''' is a pure Lua port of the sfxr game sound generator. It | + | '''sfxr.lua''' is a pure Lua port of the sfxr game sound generator. It performs fast enough for short sounds or pregenerated longer ones. |
[[File:sfxr_lua.png|400px|thumb|left|Screenshot]] | [[File:sfxr_lua.png|400px|thumb|left|Screenshot]] | ||
− | This single-file library allows you to dynamically create retro sound effects based on parameters | + | This single-file library allows you to dynamically create retro sound effects based on game-defined parameters. It also comes with a demo application as shown above based on [[Löve Frames]]. |
Usage example (plays a random sound on every keypress): | Usage example (plays a random sound on every keypress): | ||
Line 20: | Line 20: | ||
It supports all 7 preset generators for Pickup/Coin, Laser/Shoot, Explosion, Power-Up, Hit/Hurt, Jump and Blip/Select sounds and also both a randomizing and a mutating function. It also has all parameters from the original synthesizer, including basic envelopes, frequency slides, vibrato, change, square duty sweeping, phaser effect, low and high pass filters and sweep repeating. | It supports all 7 preset generators for Pickup/Coin, Laser/Shoot, Explosion, Power-Up, Hit/Hurt, Jump and Blip/Select sounds and also both a randomizing and a mutating function. It also has all parameters from the original synthesizer, including basic envelopes, frequency slides, vibrato, change, square duty sweeping, phaser effect, low and high pass filters and sweep repeating. | ||
+ | |||
+ | You can also design sounds with the demo application and safe them either in | ||
+ | a Lua-based format or the binary format of the original sfxr. Both formats can | ||
+ | be loaded too, of course. | ||
* '''[https://github.com/nucular/sfxrlua Get the source from GitHub and collaborate]'''<br/> | * '''[https://github.com/nucular/sfxrlua Get the source from GitHub and collaborate]'''<br/> |
Revision as of 16:56, 26 August 2014
sfxr.lua is a pure Lua port of the sfxr game sound generator. It performs fast enough for short sounds or pregenerated longer ones.
This single-file library allows you to dynamically create retro sound effects based on game-defined parameters. It also comes with a demo application as shown above based on Löve Frames.
Usage example (plays a random sound on every keypress):
local sfxr = require("sfxr")
function love.keypressed(key, rep)
local sound = sfxr.newSound()
sound:randomize()
sound:play()
end
It supports all 7 preset generators for Pickup/Coin, Laser/Shoot, Explosion, Power-Up, Hit/Hurt, Jump and Blip/Select sounds and also both a randomizing and a mutating function. It also has all parameters from the original synthesizer, including basic envelopes, frequency slides, vibrato, change, square duty sweeping, phaser effect, low and high pass filters and sweep repeating.
You can also design sounds with the demo application and safe them either in a Lua-based format or the binary format of the original sfxr. Both formats can be loaded too, of course.