Difference between revisions of "sfxr.lua"

m (whoops, forgot category)
m (Adding keyword.)
 
(One intermediate revision by one other user not shown)
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=A pure Lua port of the sfxr game sound generator}}
+
{{#set:Description=Generate your sounds dynamically, at runtime}}
'''sfxr.lua''' is a pure Lua port of the sfxr game sound generator. It still performs comparatively fast, though :P
+
{{#set:Keyword=Sound}}
 +
'''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 from your code. It also comes with a demo application as shown above based on [[Löve Frames]].
+
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 21:
  
 
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/>

Latest revision as of 12:35, 18 January 2017



sfxr.lua is a pure Lua port of the sfxr game sound generator. It performs fast enough for short sounds or pregenerated longer ones.

Screenshot

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.