You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
580B

  1. -- Simplest possible script using all variables
  2. -- by Andrew Belt
  3. function process(block)
  4. -- Loop through each column
  5. for i=1,6 do
  6. -- Get input
  7. x = block.inputs[i][1]
  8. -- Get gain knob
  9. gain = block.knobs[i]
  10. -- Apply gain to input
  11. y = x * gain
  12. -- Set gain light (red = 0)
  13. block.lights[i][1] = gain
  14. -- Check mute switch
  15. if block.switches[i] then
  16. -- Mute output
  17. y = 0
  18. -- Enable mute light (red = 0)
  19. block.switchLights[i][1] = 1
  20. else
  21. -- Disable mute light
  22. block.switchLights[i][1] = 0
  23. end
  24. -- Set output
  25. block.outputs[i][1] = y
  26. end
  27. end