2c_voice_allocation_setup.scd 460 B

12345678910111213141516171819202122
  1. (
  2. //PUT HERE THE NUMBER OF POLYPHONY VOICES
  3. var nbVoices = 16;
  4. // Synth array for voice allocation
  5. ~synths = Array.fill(nbVoices, { Synth(\rgbSynth) });
  6. // Array to keep in memory active synths (i.e. active notes)
  7. ~activeNotes = Array.fill(nbVoices, { nil });
  8. // Function to modify a parameter for all synths
  9. ~setSynthsParam = { |param, value|
  10. ~synths.do { |synth|
  11. synth.set(param, value);
  12. };
  13. };
  14. "Voice allocation arrays loaded".postln
  15. )