A port of the sfxr sound effect synthesizer to Lua, mainly for usage with the Löve framework - Keywords: library sound love2d https://github.com/nucular/sfxrlua

nucular 822323c8bf Merge pull request #16 from pgimeno/fix-save-as-lua-button il y a 8 ans
loveframes @ a02fafd902 2ca33bd6d5 Added LoveFrames as a submodule so I can start to build a fancy GUI as a demo il y a 10 ans
spec 24ad42b0ad Start adding unit testing with busted and Travis-CI il y a 9 ans
.gitmodules 2ca33bd6d5 Added LoveFrames as a submodule so I can start to build a fancy GUI as a demo il y a 10 ans
.travis.yml 24ad42b0ad Start adding unit testing with busted and Travis-CI il y a 9 ans
LICENSE bcb4606b3c Initial commit il y a 10 ans
README.md 7c7060875a Added Travis-CI badge il y a 9 ans
conf.lua 593bf96742 Made demo window height larger and added Save/Load/Export buttons il y a 10 ans
main.lua 43f931ebae Fix save as Lua button il y a 8 ans
sfxr.lua bc4ebf3728 Reset parameters to default before loading from a file il y a 9 ans

README.md

sfxr.lua

Build Status

A port of the sfxr sound effect synthesizer to pure Lua, designed to be used together with the awesome Löve game framework.

Example usage

These examples should play a randomly generated sound.

With Löve 0.9.x:

local sfxr = require("sfxr")

function love.load()
    local sound = sfxr.newSound()
    sound:randomize()
    sound:play()
end

With lao:

require("ao")
local sfxr = require("sfxr")

local driverId = ao.defaultDriverId()
local device = ao.openLive(driverId, {bits = 16, rate = 44100, channels = 1})

local sound = sfxr.newSound()
sound:randomize()

local buffer = sound:generateString()
device:play(buffer, #buffer)

More documentation is available at the Project Wiki