Paul Batchelorimporta901d566 years agoHistory
75 lines · 1.9 KB · Lua
RawDownload
sptbl["adsr"] = {     files = {        module = "adsr.c",        header = "adsr.h",        example = "ex_adsr.c",    },     func = {        create = "sp_adsr_create",        destroy = "sp_adsr_destroy",        init = "sp_adsr_init",        compute = "sp_adsr_compute",    },     params = {        optional = {            {                name = "atk",                type = "SPFLOAT",                description = "Attack",                default = 0.1            },            {                name = "dec",                type = "SPFLOAT",                description ="Decay",                default = 0.1            },            {                name = "sus",                type = "SPFLOAT",                description ="Sustain (in range 0-1)",                default = 0.5            },            {                name = "rel",                type = "SPFLOAT",                description ="Release",                default = 0.3            },        }    },     modtype = "module",     description = [[ADSR generatorThis is an ADSR generator whose curves are created using a one-pole low pass filter. NOTE: The attack, decay, and release parameters are "fuzzy" values that don'texactly correspond to duration in seconds. More accurately, they are specialtau constant units that feed into the filter used to generate the envelope. Theattack value specificly undergoes some "creative" modificiations in order tocreate snappier attack times. It is highly recommend to tune parameters byear rather than to read the values literally.]],     ninputs = 1,    noutputs = 1,     inputs = {        {            name = "gate",            description = "Gate signal. This should be a steady state signal that jumps from 0 to 1."        },    },     outputs = {        {            name = "out",            description = "ADSR envelope."        },    } }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t