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.

159 lines
4.3 KiB

7 years ago
  1. ({ /*
  2. ___ ___ ___ __ ___ ________ ________ _____ ______
  3. |\ \ |\ \|\ \|\ \ / /|\ __ \|\ __ \|\ _ \ _ \
  4. \ \ \\_\ \ \ \/ /|_ / //\ \ \|\ /\ \ \|\ \ \ \\\__\ \ \
  5. \ \______ \ \ ___ \ / // \ \ __ \ \ ____\ \ \\|__| \ \
  6. \|_____|\ \ \ \\ \ \ / // \ \ \|\ \ \ \___|\ \ \ \ \ \
  7. \ \__\ \__\\ \__\/_ // \ \_______\ \__\ \ \__\ \ \__\
  8. \|__|\|__| \|__|__|/ \|_______|\|__| \|__| \|__|
  9. v141020
  10. "4K/BPM" - 8 channel installation for Sonoretum, Kapelica Gallery, SI
  11. by Luka Prinčič / Nova deViator <nova@deviator.si>
  12. released under GNU GPL. feel free to copy, reuse, remix,
  13. provided that you share under same conditions: GNU GPL.
  14. */
  15. // random channel expansion and ramping
  16. ~chanExpan = {
  17. SinOsc.kr( rrand(0.0001,0.001), 0.25, 0.5, 0.5 )
  18. *
  19. LFTri.kr(
  20. [ // multichannel expansion
  21. rrand(0.005,0.03),
  22. rrand(0.005,0.03),
  23. rrand(0.005,0.03),
  24. rrand(0.005,0.03),
  25. rrand(0.005,0.03),
  26. rrand(0.005,0.03),
  27. rrand(0.005,0.03),
  28. rrand(0.005,0.03)
  29. ],
  30. 3.99.rand)} ;
  31. // something that changes the frequency every now and then (0.8 - 1.2)
  32. ~freqVar = {
  33. LFNoise0.ar(rrand(0.005, 0.03), 0.2, 1);
  34. };
  35. // bpm master control - oscilating, drifting
  36. ~bpm = LFTri.kr(0.001, 0, 0.2, 1);
  37. z = (
  38. (
  39. // kinda bassline
  40. SinOsc.ar( ((LFSaw.kr(-0.05,1) + 1) * 100 + 40 ),
  41. LFTri.kr(40,0,1),
  42. LFSaw.kr(1.5 * ~bpm) )
  43. * ~chanExpan
  44. * 0
  45. )
  46. +
  47. ( // wierd bleep-bassline
  48. LFPulse.ar(60 * ~freqVar, 0, 0.5, LFPulse.kr((1/2) * ~bpm, 0.5, 0.03, 0.9))
  49. * ~chanExpan // random channel expansion
  50. * 0.5 // volume
  51. ) +
  52. ( // Sine at 0.6666
  53. SinOsc.ar(265 * ~freqVar, 0, LFPulse.kr((2/3) * ~bpm, 0.5, 0.3) * 0.3)
  54. * ~chanExpan // random channel expansion
  55. * 1 // volume
  56. ) +
  57. (
  58. LFPar.ar(420 * ~freqVar, 0, LFPulse.kr((1/2) * ~bpm, 0.5,0.2) * 0.3)
  59. * ~chanExpan // random channel expansion
  60. * 1 // volume
  61. ) +
  62. (
  63. LFCub.ar(185 * ~freqVar, 0, LFPulse.kr((1/2) * ~bpm, 0.74,0.2) * 0.3)
  64. * ~chanExpan // random channel expansion
  65. * 1 // volume
  66. ) +
  67. (
  68. LFCub.ar(1985 * ~freqVar, 0, LFPulse.kr((1/2) * ~bpm, 0.74,0.1) * 0.2)
  69. * ~chanExpan // random channel expansion
  70. * 1 // volume
  71. ) +
  72. (
  73. LFCub.ar(9985 * ~freqVar, 0, LFPulse.kr((4/3) * ~bpm, 0.76,0.005)*0.3)
  74. * ~chanExpan // random channel expansion
  75. * 1 // volume
  76. ) +
  77. (
  78. LFCub.ar(7985 * ~freqVar, 0, LFPulse.kr((5/3) * ~bpm, 0.24,0.005)*0.3)
  79. * ~chanExpan // random channel expansion
  80. * 1 // volume
  81. ) +
  82. (
  83. SinOsc.ar(365 * ~freqVar, 0, LFPulse.kr( (4/3) * ~bpm, 0, 0.1)*0.3)
  84. * ~chanExpan // random channel expansion
  85. * 1 // volume
  86. ) +
  87. (
  88. FreeVerb.ar(LFTri.ar(260 * ~freqVar, 0,
  89. LFPulse.kr(0.5 * ~bpm,0.25,0.01)*0.3),0.5,0.8,0.1)
  90. * ~chanExpan // random channel expansion
  91. * 1 // volume
  92. ) +
  93. (
  94. SinOsc.ar(800 * ~freqVar, 0, LFPulse.kr(2 * ~bpm,0,0.1)*0.1)
  95. * ~chanExpan // random channel expansion
  96. * 1 // volume
  97. ) +
  98. (
  99. SinOsc.ar(5800 * ~freqVar, 0, LFPulse.kr(2 * ~bpm,0,0.01)*0.3)
  100. * ~chanExpan // random channel expansion
  101. * 1 // volume
  102. ) +
  103. (
  104. LFCub.ar(820 * ~freqVar, 0, LFPulse.kr( (5/3) * ~bpm, 0, 0.1)*0.1)
  105. * ~chanExpan // random channel expansion
  106. * 1 // volume
  107. ) +
  108. (
  109. LFPar.ar(7820 * ~freqVar, 0, LFPulse.kr( (5/3) * ~bpm, 0, 0.03)*0.1)
  110. * ~chanExpan // random channel expansion
  111. * 1 // volume
  112. ) +
  113. (
  114. WhiteNoise.ar( LFPulse.kr(2 * ~bpm,0.5,0.001,1) )/2
  115. * ~chanExpan // random channel expansion
  116. * 1 // volume
  117. ) +
  118. (
  119. WhiteNoise.ar( LFPulse.kr(1 * ~bpm,0.5,0.001,1) )/2
  120. * ~chanExpan // random channel expansion
  121. * 1 // volume
  122. ) +
  123. (
  124. WhiteNoise.ar( LFPulse.kr( (5/3) * ~bpm,0.5,0.001,1) )/4
  125. * ~chanExpan // random channel expansion
  126. * 1 // volume
  127. ) +
  128. (
  129. WhiteNoise.ar( LFPulse.kr( (4/3) * ~bpm,0.5,0.001,1) )/4
  130. * ~chanExpan // random channel expansion
  131. * 1 // volume
  132. )
  133. );
  134. ~out = CombC.ar(
  135. DelayN.ar(
  136. DelayN.ar(z,
  137. 0.5, [0.47, 0.75, 0.51, 0.42, 0.65, 0.67, 0.56, 0.3], 1, z),
  138. 0.5, 0.5, 1, z),
  139. 0.1, LFNoise0.kr(0.5 * ~bpm, 0.05, 0.001).abs, 2, z);
  140. ~out = ~out + (z * SinOsc.kr(0.001, 0, 0.33, 0.66));
  141. ~out = Limiter.ar((~out),0.9, 0.1);
  142. ~out = FreeVerb.ar(~out, 0.2 * ~freqVar, 1, 0.1);
  143. }.play)