Created
February 7, 2022 15:50
-
-
Save made-indrayana/6e3b609e60899a39247eb5823730755a to your computer and use it in GitHub Desktop.
QSC Song Simulator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timer0 = Timer.New() | |
Controls.OFF.EventHandler = function (valueChange) | |
if (Controls.OFF.Boolean) then | |
Controls.OFF.Color = "#F00" | |
timer0:Stop() | |
--Controls['Peak Out'].RampTime = 0.3 | |
Controls['Peak Out'].Value = -100 | |
--Controls['RMS Out'].RampTime = 1 | |
Controls['RMS Out'].Value = -100 | |
else | |
Controls.OFF.Color = "#700" | |
timer0:Start(0.1) | |
--Controls['Peak Out'].RampTime = 0 | |
--Controls['RMS Out'].RampTime = 0 | |
end | |
end | |
timer0.EventHandler = function() | |
local ms = string.match(tostring(os.clock()), "%d%.(%d+)") | |
math.randomseed(os.clock() + ms) | |
if (Controls.OFF.Boolean == false) then | |
Controls['Peak Out'].Value = math.random((Controls['RMS Center Value'].Value + 10),(Controls['RMS Center Value'].Value + 20)) + math.random() | |
Controls['RMS Out'].Value = math.random(Controls['RMS Center Value'].Value,(Controls['RMS Center Value'].Value + 2)) + math.random() | |
end | |
end | |
timer0:Start(0.1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment