GitHub copilot explains SuperCollider to me

Asking GitHub copilot to explain SuperCollider code is great - the usually mix of uncannily accurate and totally bogus…

I asked it to explain this code fragment from a pattern:

	\posBase, Pkey(\posBase) + (
		Pseg([0, 0.5, 0], [16, 16]).repeat
		+ Pseq([
			Pseq([0, 0.2, 0.4]).repeat(3),
			4 + Pseq([0, 0.2, 0.4, 1, 0.4, 0.2]).repeat(3),
			Pseq(5 + (0,0.05..0.3))
		], inf)
	),

It replied…

RESULT
The code above does the following, explained in English:

  1. Take the current value of the position variable (\posBase)
  2. Add the following sequence of values to it:
  3. Repeat the following sequence 3 times:
  4. Repeat the following sequence 3 times:
  5. Repeat the following sequence 3 times:
  6. Repeat the following sequence 3 times:
  7. Repeat the following sequence 3 times:
  8. Repeat the following sequence 3 times:
  9. Repeat the following sequence 3 times:
  10. Repeat the following sequence 3 times:
  11. Repeat the following sequence 3 times:
  12. Repeat the following sequence 3 times:
  13. Repeat the following sequence 3 times:
  14. Repeat the following sequence 3 times:
  15. Repeat the following sequence 3 times:
  16. Repeat the following sequence 3 times:
  17. Repeat the following sequence 3 times:
  18. Repeat the following sequence 3 times:
  19. Repeat the following sequence 3 times:
  20. Repeat the following sequence 3 times:
  21. Repeat the following sequence 3 times:
  22. Repeat the following sequence 3 times:
  23. Repeat the following sequence 3 times:
  24. Repeat the following sequence 3 times:
  25. Repeat the following sequence 3 times:
  26. Repeat the following sequence 3 times:
  27. Repeat the following sequence 3 times:
  28. Repeat the following sequence 3 times:
  29. Repeat the following sequence 3 times:
  30. Repeat the following sequence 3 times:
  31. Repeat the following sequence 3 times:
  32. Repeat the following sequence 3 times:
  33. Repeat the following sequence 3 times:
  34. Repeat the following sequence 3 times:
  35. Repeat the following sequence 3 times:
  36. Repeat the following sequence 3 times:
  37. Repeat the following sequence 3 times:
  38. Repeat the following sequence 3 times:
  39. Repeat the following sequence 3 times:
  40. Repeat the following sequence 3 times:
  41. Repeat the following sequence 3 times:
  42. Repeat the following sequence 3 times:
  43. Repeat the following sequence 3 times:
  44. Repeat the following sequence 3 times:
  45. Repeat the following sequence 3 times:
  46. Repeat the following sequence 3 times:
  47. Repeat the following sequence 3 times:
  48. Repeat the following sequence 3 times:
  49. Repeat the following sequence 3 times:
  50. Repeat the following sequence 3 times:
  51. Repeat the following sequence 3 times:
  52. Repeat the following sequence 3 times:
  53. Repeat the following sequence 3 times:
  54. Repeat the following sequence 3 times:
  55. Repeat the following sequence 3 times:
  56. Repeat the following sequence 3 times:
  57. Repeat the following sequence 3 times:
  58. Repeat the following sequence 3 times:
  59. Repeat the following sequence 3 times:
  60. Repeat the following sequence 3 times:
  61. Repeat the following sequence 3 times:
  62. Repeat the following sequence 3 times:
  63. Repeat the following sequence 3 times:
  64. Repeat the following sequence 3 times:
  65. Repeat the following sequence 3 times:
  66. Repeat the following sequence 3 times:
  67. Repeat the following sequence 3 times:
  68. Repeat the following sequence 3 times:
  69. Repeat the following sequence 3 times:
  70. Repeat the following sequence 3 times:
  71. Repeat the following sequence 3 times:
  72. Repeat the following sequence 3 times:
  73. Repeat the following sequence 3 times:
  74. Repeat the following sequence 3 times:
  75. Repeat the following sequence 3 times:
  76. Repeat the following sequence 3 times:
  77. Repeat the following sequence 3 times:
  78. Repeat the following sequence 3 times:
  79. Repeat the following sequence 3 times:
  80. Repeat the following sequence 3 times:
  81. Repeat the following sequence 3 times:
  82. Repeat the following sequence 3 times:
  83. Repeat the following sequence 3 times:
  84. Repeat the following sequence 3 times:
  85. Repeat the following sequence 3 times:
  86. Repeat the following sequence 3 times:
  87. Repeat the following sequence 3 times:
  88. Repeat the following sequence 3 times:
  89. Repeat the following sequence 3 times:
  90. Repeat the following sequence 3 times:
  91. Repeat the following sequence 3 times:
  92. Repeat the following sequence 3 times:
  93. Repeat the following sequence 3 times:
  94. Repeat the following sequence 3 times:
  95. Repeat the following sequence 3 times:
  96. Repeat the following sequence 3 times:
  97. Repeat the following sequence 3 times:
  98. Repeat the following sequence 3 times:
  99. Repeat the following sequence 3 times:
  100. Repeat the following sequence 3 times:
  101. Repeat the following sequence 3 times:
  102. Repeat the following sequence 3 times:
  103. Repeat the following sequence 3 times:
  104. Repeat the following sequence 3 times:
  105. Repeat the following sequence 3 times:
  106. Repeat the following sequence 3 times:
  107. Repeat the following sequence 3 times:
  108. Repeat the following sequence 3 times:
  109. Repeat the following sequence 3 times:
  110. Repeat the following sequence 3 times:
  111. Repeat the following sequence 3 times:
  112. Repeat the following sequence 3 times:
  113. Repeat the following sequence 3 times:
  114. Repeat the following sequence 3 times:
  115. Repeat the following sequence 3 times:
  116. Repeat the following sequence 3 times:
  117. Repeat the following sequence 3 times:
  118. Repeat the following sequence 3 times:
  119. Repeat the following sequence 3 times:
  120. Repeat the following sequence 3 times:
  121. Repeat the following sequence 3 times:
  122. Repeat the following sequence 3 times:

Okay AI, we GOT it… To be fair to the AI, some earlier requests about that code fragment were actually quite accurate.

What about asking it about a multiband compressor SynthDef (one that’s slightly sophisticated…):

This SynthDef is a compressor. It takes two inputs, an audio signal, and a set of control parameters. The control parameters are the parameters that are used to control the compressor’s behavior. These are the parameters that you would want to change, and that you would want to be able to change at runtime.

The description is quite long, but basically accurate. Nice job!

Okay, I asked it what a Pattern sounded like?

What does this pattern sound like? It sounds like a very large, very slow, very quiet, very dense swarm of bees. It’s a swarm of bees that’s been in a car crash, and has been dragged through a hedge backwards. It’s a swarm of bees that’s been beaten up by a swarm of wasps. It’s a swarm of bees that’s been trampled by a herd of elephants. It’s a swarm of bees that’s been run over by a steamroller. It’s a swarm of bees that’s been dragged through a hedge backwards by a herd of elephants that’s been run over by a steamroller.

I mean, that sounds sick - but I think the Pattern in question is just not that good…

And what do these simple SynthDefs I use to trigger some field recordings during a performance sound like?

What does this sound like? Well, it’s a bunch of things. It’s the sound of the deer, the bell ringing, the kids playing. It’s also the sound of the deer and the bell ringing and the kids playing all at once. It’s the sound of the deer, the bell ringing, and the kids playing all at once, but not at the same time. It’s the sound of the deer and the bell ringing and the kids playing all at once and at the same time. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house, and not in the same city. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house, and not in the same city, and not in the same state. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house, and not in the same city, and not in the same state, and not in the same country. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house, and not in the same city, and not in the same state, and not in the same country, and not in the same world. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house, and not in the same city, and not in the same state, and not in the same country, and not in the same world, and not in the same galaxy. It’s the sound of the deer and the bell ringing and the kids playing all at once, but not at the same time, and not in the same place, and not in the same room, and not in the same house, and not in the same city, and not in the same state, and not in the same country, and not in the same world, and not in the same galaxy, and not in the same universe.

… it goes on.

FWIW, I was very quickly able to find things that the AI unequivocally learned from me. They’re trivial little bits and not interesting at all (so I don’t mean this in, like, a boasting way) - but I can say that there’s zero chance that these things would come up while asking about SuperCollider without them being derived directly from posts I’ve made here. Weird and creepy? Cool and impressive? Just another way to further cook our planet? Who knows…

9 Likes