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 9 лет назад
loveframes @ a02fafd902 2ca33bd6d5 Added LoveFrames as a submodule so I can start to build a fancy GUI as a demo 10 лет назад
spec 24ad42b0ad Start adding unit testing with busted and Travis-CI 10 лет назад
.gitmodules 2ca33bd6d5 Added LoveFrames as a submodule so I can start to build a fancy GUI as a demo 10 лет назад
.travis.yml 24ad42b0ad Start adding unit testing with busted and Travis-CI 10 лет назад
LICENSE bcb4606b3c Initial commit 10 лет назад
README.md 7c7060875a Added Travis-CI badge 10 лет назад
conf.lua 593bf96742 Made demo window height larger and added Save/Load/Export buttons 10 лет назад
main.lua 43f931ebae Fix save as Lua button 9 лет назад
sfxr.lua bc4ebf3728 Reset parameters to default before loading from a file 10 лет назад

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