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.

32 lines
619B

  1. // Simplest possible script using all variables, demonstrating buffering
  2. // by Brian Heim
  3. ~vcv_frameDivider = 1;
  4. ~vcv_bufferSize = 32;
  5. ~vcv_process = {|block|
  6. // Loop through each row
  7. VcvPrototypeProcessBlock.numRows.do { |i|
  8. // Get gain knob
  9. var gain = block.knobs[i];
  10. // Set gain light (red = 0)
  11. block.lights[i][0] = gain;
  12. // Check mute switch
  13. block.switchLights[i][0] = if (block.switches[i]) {
  14. // Mute output
  15. gain = 0;
  16. // Enable mute light (red = 0)
  17. 1
  18. } {
  19. // Disable mute light
  20. 0
  21. };
  22. // Iterate input/output buffer
  23. block.outputs[i] = block.inputs[i] * gain;
  24. };
  25. block
  26. }