Sonification of Knitting Patterns

Alex McLean invited me to participate in the Kairotic intervention of the Heritage & Culture Hack in Sheffield on 10/01/2015. Amy Twigger Holroyd was also part of the group and we decided to try to turn knitting patterns into sound for great success. I wrote a small parser in SuperCollider that currently only parses the horseshoe lace from knitting bee correctly, which looks (manually split up into arrays for each row) like this:
[
"k1, *yo, k3, sl1, k2tog, psso, k3, yo, k1*",
"purl",
"k1, *k1, yo, k2, sl1, k2tog, psso, k2, yo, k2*",
"purl",
"k1, *k2, yo, k1, sl1, k2tog, psso, k1, yo, k3*",
"purl",
"k1, *k3, yo, sl1, k2tog, psso, yo, k4*",
"purl",
]

Amy successfully completed a round of the horseshoe lace as you can see in her tweet:

Here is the horseshoe lace repeated twice in each row, with text output of the knitting commands for illustration:

And here the whole thing sped up:

I put the source code in a gist.

For A Yorkshire Hack at the Digital Utopias Conference in Hull 20/01/2015 I started translating the parser into JavaScript to make a browser version, using web audio via Charlie Roberts’ Gibber.lib to sonify knitting patterns for knitters everywhere. More on this later.

Live Coding @ #UNPITCH_ Action_2

A recording of a live coding duo performance I did last year with Shelly Knotts, using SuperCollider and a lot of feedback…

Concerto for Duck and Orchestra

As part of my master’s I built an instrument into a duck. Not a real duck of course. My plan was to create a standalone instrument with an Arduino board (so not using the Arduino to send e. g. sensor data to a computer which does the sound synthesis). Amazingly enough I found a nice way to do sound synthesis on the Arduino: Mozzi.

The next thing was how to smoothen the PWM output of the Arduino. A solution for that was to build a low pass filter as described here. Last thing was to attenuate the output a bit, for that I used the simple amplifier as described in Nicolas Collins’ book “Handmade Electronic Music”. Now just shove that all into a cheap bathroom radio in duck form, add some sensors and a mini jack output, and I’m all set.

For the piece I wanted to use video material as accompaniment. I searched for videos of orchestras I could use and found some nice little news snippets from the Netherlands which are CC-BY-SA licensed on Open Beelden. As I wanted to play the videos in a granular fashion, I wanted to have something that would just skip to any possible point instantaneously. After trying to achieve that task with Processing and failing miserably as at least Processing 1.x had a pretty slow video performance, I built a simple video player with Cinder that reacted to osc messages I sent from SuperCollider.

I used SuperCollider to do the actual sequencing of events with some random elements in it and for the reverb, filtering, compressing and spatialisation of the duck’s sound. The finished piece was premiered at the Studiokonzert 2013 in ZKM Kubus in Karlsruhe and I also performed it at the second concert of the MuSA Symposium.

Here is a video of the premiere:

Continue reading “Concerto for Duck and Orchestra”

Equivalent commands: SuperCollider – Clojure

A list of equivalent commands (mostly on arrays) with different names. Likely to expand over time.

SuperCollider Clojure
clump partition
collect map
choose rand-nth
flat/flatten flatten/apply concat
removeDups distinct
scramble shuffle
sum (reduce + coll) / (apply + coll)

Delbrots @ NMF 2013

With our Mandelbrots noise side project Delbrots and the Man I played at Network Music Festival 2013 in Birmingham. It was a little strange to do a really loud set on a Sunday at about 4pm, but Glitch Lich played before us, so it wasn’t that bad.

I made some simple code visualization for it using Quil. I still didn’t have time to figure out how to get it in full screen mode, so i put some tape on the projector instead (you can still see the title bar a bit). The whole thing looked a little like that:

Delbrots and the Man FTW!

A post shared by Antonio Roberts (@hellocatfood) on

(Thanks to Antonio for the awesome photo!)

Continue reading “Delbrots @ NMF 2013”

Random jpgs with SuperCollider

Hellocatfood just
described how to create jpgs in puredata. Here is a quick port of his solution to SuperCollider:

~jpgheader = Int8Array[255, 216, 255, 219, 00, 132, 00, 03, 02, 02, 03, 02, 02, 03, 03, 03, 03, 04, 03, 03, 04, 05, 08, 05, 05, 04, 04, 05, 10, 07, 07, 06, 08, 12, 10, 12, 12, 11, 10, 11, 11, 13, 14, 18, 16, 13, 14, 17, 14, 11, 11, 16, 22, 16, 17, 19, 20, 21, 21, 21, 12, 15, 23, 24, 22, 20, 24, 18, 20, 21, 20, 01, 03, 04, 04, 05, 04, 05, 09, 05, 05, 09, 20, 13, 11, 13, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 255, 192, 00, 17, 08, 01, 224, 02, 128, 03, 01, 17, 00, 02, 17, 01, 03, 17, 01, 255, 196, 01, 162, 00, 00, 01, 05, 01, 01, 01, 01, 01, 01, 00, 00, 00, 00, 00, 00, 00, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 16, 00, 02, 01, 03, 03, 02, 04, 03, 05, 05, 04, 04, 00, 00, 01, 125, 01, 02, 03, 00, 04, 17, 05, 18, 33, 49, 65, 06, 19, 81, 97, 07, 34, 113, 20, 50, 129, 145, 161, 08, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 09, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 01, 00, 03, 01, 01, 01, 01, 01, 01, 01, 01, 01, 00, 00, 00, 00, 00, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 17, 00, 02, 01, 02, 04, 04, 03, 04, 07, 05, 04, 04, 00, 01, 02, 119, 00, 01, 02, 03, 17, 04, 05, 33, 49, 06, 18, 65, 81, 07, 97, 113, 19, 34, 50, 129, 08, 20, 66, 145, 161, 177, 193, 09, 35, 51, 82, 240, 21, 98, 114, 209, 10, 22, 36, 52, 225, 37, 241, 23, 24, 25, 26, 38, 39, 40, 41, 42, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 226, 227, 228, 229, 230, 231, 232, 233, 234, 242, 243, 244, 245, 246, 247, 248, 249, 250, 255, 218, 00, 12, 03, 01, 00, 02, 17, 03, 17, 00, 63];

~jpgfooter = Int8Array[255, 217];

(
f = File.new(“test.jpg”, “wb”);
f.write(~jpgheader);
100.do{f.write(({255.rand}!1024).as(Int8Array));};
f.write(~jpgfooter);
f.close
)

(
f = File.new(“test.jpg”, “wb”);
f.write(~jpgheader);
f.write(
100.collect{ |i|
500.collect{ |j|
(j%i)%255 * rrand(0.9,1.1)}.sort.mirror2;
}.flop.flatten.as(Int8Array));
f.write(~jpgfooter);
f.close
)

“open test.jpg”.unixCmd

result of the second process