Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
SimTX Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Lua audio add-on API
(section)
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Declaration == <syntaxhighlight lang="lua"> simtx.addon { name = "Limiter", description = "Limits audio peaks.", controls = { simtx.controls.slider("peak", { label = "Peak", min = 0.1, max = 1, step = 0.01, default = 0.9, }), }, start = function(ctx) -- Optional per-session initialization. end, process = function(audio, ctx) audio:limit(ctx:control("peak")) end, stop = function(ctx) -- Optional per-session cleanup. end, } </syntaxhighlight> <code>simtx.processor</code> is an alias of <code>simtx.addon</code>. The <code>name</code> and <code>process</code> fields are required. <code>description</code>, <code>controls</code>, <code>start</code>, and <code>stop</code> are optional. Controls use the declarations in [[Lua extension API]]. Each transmission receives isolated callback state. Add-ons may be used with mono audio sources and with Lua modulation modes that produce audio. They do not apply to direct GNU Radio IQ, PipeWire Stereo, white noise, or an IQ-producing Lua mode.
Summary:
Please note that all contributions to SimTX Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
SimTX Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)