SuperCollider code for 8-channel composition exhibited in 2020 at Steklenik gallery run by CONA institute.
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.

188 lines
5.9 KiB

  1. // octoPan busses //////////////
  2. (
  3. // free busses and panners when re-trying things?
  4. ~octoBus1.free; ~octoBus2.free; ~octoBus3.free; ~octoBus4.free;
  5. ~panBus1x.free; ~panBus1y.free; ~panBus1r.free;
  6. ~panBus2x.free; ~panBus2y.free; ~panBus2r.free;
  7. ~panBus3x.free; ~panBus3y.free; ~panBus3r.free;
  8. ~panBus4x.free; ~panBus4y.free; ~panBus4r.free;
  9. ~revBus.free;
  10. // octoBus1 + panners and control busses:
  11. ~octoBus1 = Bus.audio(s,1);
  12. ~panBus1x = Bus.control(s,1);
  13. ~panBus1y = Bus.control(s,1);
  14. ~panBus1r = Bus.control(s,1);
  15. ~panBus1y.value = 0.14; // set a fixed value to a bus
  16. ~panBus1x.value = 0;
  17. ~panBus1r.value = 10;
  18. // octoBus2 + panners and control busses:
  19. ~octoBus2 = Bus.audio(s,1);
  20. ~panBus2x = Bus.control(s,1);
  21. ~panBus2y = Bus.control(s,1);
  22. ~panBus2r = Bus.control(s,1);
  23. ~panBus2y.value = 0.14; // set a fixed value to a bus
  24. ~panBus2x.value = 0;
  25. ~panBus2r.value = 10;
  26. // octoBus3 + panners and control busses:
  27. ~octoBus3 = Bus.audio(s,1);
  28. ~panBus3x = Bus.control(s,1);
  29. ~panBus3y = Bus.control(s,1);
  30. ~panBus3r = Bus.control(s,1);
  31. ~panBus3y.value = 0.14; // set a fixed value to a bus
  32. ~panBus3x.value = 0;
  33. ~panBus3r.value = 10;
  34. // octoBus4 + panners and control busses:
  35. ~octoBus4 = Bus.audio(s,1);
  36. ~panBus4x = Bus.control(s,1);
  37. ~panBus4y = Bus.control(s,1);
  38. ~panBus4r = Bus.control(s,1);
  39. ~panBus4y.value = 0.14; // set a fixed value to a bus
  40. ~panBus4x.value = 0;
  41. ~panBus4r.value = 10;
  42. // 8chan reverb bus
  43. ~revBus = Bus.audio(s,8);
  44. ">>> loaded all busses".postln;
  45. "--- loading octoPanners ...".postln;
  46. ~octoPanner1 = Synth("octoPanner", [\inBus, ~octoBus1, \outBus, ~revBus], addAction: \addToTail);
  47. ~octoPanner1.map(\x, ~panBus1x);
  48. ~octoPanner1.map(\y, ~panBus1y);
  49. ~octoPanner1.map(\radius, ~panBus1r);
  50. ~octoPanner2 = Synth("octoPanner", [\inBus, ~octoBus2, \outBus, ~revBus], addAction: \addToTail);
  51. ~octoPanner2.map(\x, ~panBus2x);
  52. ~octoPanner2.map(\y, ~panBus2y);
  53. ~octoPanner2.map(\radius, ~panBus2r);
  54. ~octoPanner3 = Synth("octoPanner", [\inBus, ~octoBus3, \outBus, ~revBus], addAction: \addToTail);
  55. ~octoPanner3.map(\x, ~panBus3x);
  56. ~octoPanner3.map(\y, ~panBus3y);
  57. ~octoPanner3.map(\radius, ~panBus3r);
  58. ~octoPanner4 = Synth("octoPanner", [\inBus, ~octoBus4, \outBus, ~revBus], addAction: \addToTail);
  59. ~octoPanner4.map(\x, ~panBus4x);
  60. ~octoPanner4.map(\y, ~panBus4y);
  61. ~octoPanner4.map(\radius, ~panBus4r);
  62. // 4 x stereo reverbs are fixed to outputs ([0,1][2,3][4,5][6,7]) not panners!
  63. ~reverb = Synth("reverBusser", [\inBus, ~revBus, \outBus, 0], addAction: \addToTail);
  64. // some default oscilations of pan and reverb
  65. ">>> cleaning up panner_x and panner_y control synths...".postln;
  66. ~panner1y.free; ~panner2y.free; ~panner3y.free; ~panner4y.free;
  67. ~panner1x.free; ~panner2x.free; ~panner3x.free; ~panner4x.free;
  68. // REVERBS
  69. ">>> cleaning up reverb busses and wet oscilators...".postln;
  70. ~reverb1wetBus.free; // ~wetOsc.free; // clean up
  71. ~reverb2wetBus.free; // ~wetOsc.free; // clean up
  72. ~reverb3wetBus.free; // ~wetOsc.free; // clean up
  73. ~reverb4wetBus.free; // ~wetOsc.free; // clean up
  74. ~wetOsc1.free; ~wetOsc2.free; ~wetOsc3.free; ~wetOsc4.free;
  75. ">>> setting up reverb control buses and param oscilators...".postln;
  76. ~reverb1wetBus = Bus.control(s, 1); // create control bus
  77. ~reverb.map(\verb1wet, ~reverb1wetBus); // map an argument to control bus
  78. ~reverb2wetBus = Bus.control(s, 1); // create control bus
  79. ~reverb.map(\verb2wet, ~reverb2wetBus); // map an argument to control bus
  80. ~reverb3wetBus = Bus.control(s, 1); // create control bus
  81. ~reverb.map(\verb3wet, ~reverb3wetBus); // map an argument to control bus
  82. ~reverb4wetBus = Bus.control(s, 1); // create control bus
  83. ~reverb.map(\verb4wet, ~reverb4wetBus); // map an argument to control bus
  84. ~wetOsc1 = SynthDef(\randomVerb1, {Out.kr(~reverb1wetBus, LFNoise2.kr(1).range(0, 0.8)) }).play;
  85. ~wetOsc2 = SynthDef(\randomVerb2, {Out.kr(~reverb2wetBus, LFNoise2.kr(1).range(0, 0.8)) }).play;
  86. ~wetOsc3 = SynthDef(\randomVerb3, {Out.kr(~reverb3wetBus, LFNoise2.kr(1).range(0, 0.8)) }).play;
  87. ~wetOsc4 = SynthDef(\randomVerb4, {Out.kr(~reverb4wetBus, LFNoise2.kr(1).range(0, 0.8)) }).play;
  88. // ~wetOsc.free;
  89. // ~reverb.set(\verb1wet, 0);
  90. // ~reverb.set(\verb1wet, 1);
  91. // ~reverb.set(\verb2wet, 1);
  92. // free all control synths for panning
  93. ">>> freeing all control synths for panning...".postln;
  94. ~panner1y.free;
  95. ~panner2y.free;
  96. ~panner3y.free;
  97. ~panner4y.free;
  98. ~panner1x.free;
  99. ~panner2x.free;
  100. ~panner3x.free;
  101. ~panner4x.free;
  102. // in stereo all x pans are 0!
  103. ">>> setting default values in control pan buses...".postln;
  104. ~panBus1x.value = 0;
  105. ~panBus2x.value = 0;
  106. ~panBus3x.value = 0;
  107. ~panBus4x.value = 0;
  108. ~panBus1y.value = 0;
  109. ~panBus1r.value = 10;
  110. ~panBus2y.value = 0.28;
  111. ~panBus2r.value = 10;
  112. ~panBus3y.value = 0;
  113. ~panBus3r.value = 10;
  114. ~panBus4y.value = 0.28;
  115. ~panBus4r.value = 10;
  116. // PANNERS
  117. // x=0:y=[ 0.00 / 0.28 / 0.57 / 0.85 ]
  118. // x=1:y=[ 1.00 / 0.71 / 0.43 / 0.14 ]
  119. ~panner1y = SynthDef(\randomPan1y, { Out.kr(~panBus1y, LFNoise1.kr(2).range(0,0.28))}).play;
  120. //~panner1y = SynthDef(\oscPan1y, { Out.kr(~panBus1y, SinOsc.kr(2).range(0,0.28))}).play;
  121. //~panner1y.free
  122. ~panner2y = SynthDef(\randomPan2y, { Out.kr(~panBus2y, LFNoise1.kr(2).range(0,0.28))}).play;
  123. //~panner2y = SynthDef(\oscPan2y, { Out.kr(~panBus2y, SinOsc.kr(2).range(0,0.28))}).play;
  124. //~panner2y.free
  125. ~panner3y = SynthDef(\randomPan3y, { Out.kr(~panBus3y, LFNoise1.kr(2).range(0,0.28))}).play;
  126. //~panner3y = SynthDef(\oscPan3y, { Out.kr(~panBus3y, SinOsc.kr(2).range(0,0.28))}).play;
  127. //~panner3y.free
  128. ~panner4y = SynthDef(\randomPan4y, { Out.kr(~panBus4y, LFNoise1.kr(2).range(0,0.28))}).play;
  129. //~panner4y = SynthDef(\oscPan4y, { Out.kr(~panBus4y, SinOsc.kr(2).range(0,0.28))}).play;
  130. //~panner4y.free
  131. //
  132. ">>> setting verbDelayFX and ~reverBus...".postln;
  133. ~reverbDelay.free;
  134. ~reverBus.free;
  135. ~reverBus = Bus.audio(s,2);
  136. ~reverbDelay = Synth(\verbDelayFX, [\inBus, ~reverBus, \outBus, 0, \revWet, 1, \dlyWet, 1], addAction: \addAfter);
  137. //~reverbDelay.set(\revWet, 1);
  138. //~reverbDelay.set(\dlyWet, 1);
  139. ">>> finished loading all busses and control synths for panning etc ...".postln;
  140. "".postln;
  141. );