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.

33 lines
653B

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