Being inspired by Quipu, and also Dave and Julian‘s work on visualising and sonifying Quipu data (their “coding with knots” paper is here, will link to preprint soon..), I thought I’d have a go at making some. Quipu seem to be ancient databases, used to archive and communicate information. They were in use by Andean people over hundreds of years. The goal is to encode Tidal patterns in a similar manner, which I think was also Dave’s idea. So far, I think this should work very well.. Some initial (and of course, naive) thoughts about trying to make Quipu are below.
I started with four-ply 100% cotton handknit yarn, which was less fluffy and easier to work with than sheep’s wool. It did cross my mind to try to find Alpaca wool for authenticity, but it was not very easy to find, and I read that cotton was used in the Quipu too. After a bit of knotting things weren’t going too well, due to the stretchiness of the yarn it was difficult to get the knots close together, and it was all a bit fiddly.. Especially for the ‘end knot’ in a number which requires you to pass the yarn through its own loop up to nine times, securing itself in neat spiral. I wondered whether this yarn had the right structure for the task..
Looking closer at the diagrams and photographs of Quipu on-line though, it became clear that the Quipu yarn was ‘doubled’ – folded in half and twisted together to create a loop at one end, which could then be used to attach to another piece of yarn with a ‘cow hitch’. I found I could double small pieces of wool quite easily by hand, by twisting it with the direction of the existing twist until I met resistance, folding the yarn in half, and letting it twist together. Happily, the result was a yarn which was not only easy to hitch (and un-hitch) from another piece, but also was much easier to work with, in terms of tying the knots and getting them to sit in the right place, with a little help from a 20mm crochet hook.
It seemed important to start knotting at the bottom of the doubled yarn, otherwise it would start to unravel back to its original 4-ply. In terms of the Quipu representation of natural numbers (which handily, is base ten), this meant starting by knotting the unit, and then the tens, and so on. Once attached, the threads were easy to move along the thread they were attached to, and un-hitch if necessary.
I’ll need a lot more practice to make the knots more ‘readable’. Yarn is twisted in a particular direction – in this case the ‘Z’ rather than ‘S’ direction, so perhaps the knots have to match in terms of whether they’re right or left handed. There is a suggestion that the direction of twist and handedness of the knot is significant in terms of information storage, I’m a bit sceptical about this, as least they appear to be dependent on one another. For now I’m putting a little bit of twist into the yarn as I tie the knot to make sure the ply doesn’t ‘open up’.
Anyway, I think I have some grasp of how this can work now. The next task is to try to notate Tidal patterns. The ability to hitch threads to the side of others should make knotting together the parse tree of a TidalCycles pattern fairly straightforward. I’d also like to use beads to represent things which aren’t directly numerical, such as sound samples — Hama beads look perfect for this, the right size, available in bulk in a wide range of colours, and cheap! Hopefully I’ll have something to show at my lunchtime talk at the ODI this Friday.
Had a fun time in Leeds last night, here’s the recording of my live code improv:
A recording of a stream I did to Algorave Montréal this morning
They’re using it in the first track, to control ebows on their guitars as well as triggering sample patterns. True to form, it’s a huge song. Here’s an article with a bit more info.
I spoke to DJ Semtex about algorithms last month:
You can read the full article here.
Looking forward to talking about Algorave, live coding, TidalCycles and a cultural grounding for it all in pattern at TEDx Hull tomorrow. I have been a bit unsure whether the showbiz 15 minute talk was for me but preparing for it has been a nice exercise in organising my thoughts, and I am now really looking forward to it. I’ll do some semi-improvised live coding, hopefully won’t crash and burn.. The rest of the line-up is really interesting too.
Things coming up in 2017..
- Running Tidalclub Sheffield with Lucy Cheesman – every third Thursday of the month, the third edition this 16th March
- 17th Mar – Algorave wearefive – celebratory online stream with 48 performances beaming from round the world + clock
- 23 Mar – Algorave Berlin – a really nice line-up, I’ll be playing solo
- 31 Mar – TEDx Hull – a talk about algorave, and algorithmic dance culture
- 22 Apr – Eulerroom 6 – haven’t done one of these for a while.. Hosted by Tidal Club, I’ll be organising with Lucy but not actually playing.
- 28 Apr – Algorave Leeds – another huge line-up, live coding solo again
- 16 May – Taking part in a panel session at Thinking Digital Arts, Gateshead
- 26/27 May – Running a two-day TidalCycles workshop with the multi-channel system at Call&Response in South London
- 2 Jun – Back to the Open Data Institute in London, launching the outcomes of my residency there
- 7 Jun – An evening TidalCycles workshop at London Music Hackspace, Somerset House
- 9 Jun – Algorave activity as part of No Bounds festival, Hope Works Sheffield, I’ll be performing with Joanne
- 23 Jun – Talk and probable algorave activity at Bump festival, Brussels
- 9 Jul – Canute performance at the Bluedot festival algorave, Jodrell Bank
- 18-20 Aug – Another collab with Joanne at the Green Man festival algorave in Einstein’s Garden
- 9 Sep – Organising evening performances at FARM Workshop 2017, Oxford
- 8-12 Nov – Organising Algomech festival in Sheffield again
I’ve just realised that I haven’t posted here about my new job. I have left my post as research/teaching fellow in the University of Leeds, and since February 2017 have started work for a Museum, in particular the Research Institute of the Deutsches Museum, an incredible science museum in Munich — although I am still based in Sheffield UK. I’ll be working part time over the next five years on the PENELOPE research project lead by Ellen Harlizius-Klück, following our previous project Weaving Codes, Coding Weaves.
Ok this post is going to look quite dry, but is actually very exciting, at least for users of TidalCycles. So first here’s a video demonstrating the simplified syntax the below blurb will allow in a future version (version 1.0, which will probably be released soon after the upcoming 0.9).
If you want to see more videos like this check the playlists on the TidalCycles youtube channel.
Anyway.. Something I’ve noticed at Tidal workshops is that beginners have problems with this sort of code:
density 2 "1 2 3 4"
There’s the pattern
1 2 3 4, denoted by quotes, and the number
2 without quotes. This says ‘make the pattern twice as dense’, so you end up with this every cycle:
1 2 3 4 1 2 3 4.
Fairly straightforward, but why is the
2 a number, not a pattern? With more complicated, higher-order patterns this becomes increasingly unclear. There are ways to treat that number like a pattern:
spread' (density) "2 5" $ "1 2 3 4"
do n <- "2 5"
density n "1 2 3 4"
… but now you’re converting between numbers and patterns of numbers instead of engaging with the music you’re making.
So I asked about this on haskell-art, in particular how to make it so a function like
density could take either a number, or a pattern of numbers. One suggestion from Henning Thielemann was surprising – that Tidal’s
Pattern type could be defined as a Haskell
To cut this short it turned out that simply by evaluating a small amount of very simple code, Tidal’s syntax suddenly becomes far more expressive.
d1 $ sound "bass3" # speed "1.2"
you can just do
d1 $ sound "bass3" # speed 1.2
d1 $ sound "bass3*4" # speed (scale 1.2 3.2 $ ((+) <$> (slow 4 tri1) <*> sine1))
you can just do:
d1 $ sound "bass3*4" # speed ((slow 4 tri1) + sine1 * 2 + 1.2)
d1 $ up (every 3 ((+12) <$>) "1 8 [7 ~ 4]") # sound "bd"
d1 $ up (every 3 (+12) "1 8 [7 ~ 4]") # sound "bd"
and with a quick re-jig of the definition of functions like
d1 $ n ((+) <$> ((+) <$> "1 2 3" <*> slow 3 "0 1") <*> slow 2 "3 1") # sound "voodoo"
d1 $ n ("1 2 3" + slow 3 "0 1" + slow 2 "3 1") # sound "voodoo"
and much more…
density and friends, e.g.:
let density tp p = unwrap $ (\tv -> withResultTime (/ tv) $ withQueryTime (* tv) p) <$> tp
It’s then possible to fulfil my original aim:
d1 $ density "1 [2 3] [1 3]/2" $ sound "bd [sn:2 mt]/2"
while still supporting the original syntax:
d1 $ density 1.5 $ sound "bd [sn:2 mt]/2"
Basically, it turns out that if you let Haskell treat patterns of numbers as numbers, it provides extremely expressive means for working with them. This makes sense — patterns of numbers are numbers, just numbers which are polyphonic, and vary over (rational) time.
Lovely. This is a huge and unexpected win, which greatly simplifies pattern combination and manipulation, in the process greatly extending the possibilities that are within reach of a few keystrokes. This renews my suspicion that Haskell is full of much wondrous stuff just waiting to be discovered..
 Here’s that ‘small amount of very simple code’, if you want to try this at home:
instance Num a => Num (Pattern a) where
negate = fmap negate
(+) = liftA2 (+)
(*) = liftA2 (*)
fromInteger = pure . fromInteger
abs = fmap abs
signum = fmap signum
instance (Fractional a) => Fractional (Pattern a) where
fromRational = pure . fromRational
(/) = liftA2 (/)
The scene at an algorave is often what you’d expect from any good techno night – a dark room, engaging visuals, a decent, bass-heavy speaker set-up, and lots of people ready to dance. Except instead of a DJ up in a booth, or a producer tapping away behind a glowing Apple logo, performers at algoraves respond to each other and the audience in real time, often projecting the lines of code onto the walls as they type. lt’s coding as improvisation and experiment, and over the last decade and a half this kind of live coding has become increasingly visible, popping up at dedicated club nights and festivals around the world including Sonar, Ars Electronica and Transmediale.
Now Alex McLean, a research fellow in human/technology interfaces at Leeds University and one of the instigators of algoraves, has been chosen as the Open Data Institute’s first sound artist in residence, in association with Sound And Music. He had been working with live coding since 2000, when he met Adrian Ward, one of his partners in the long-running live coding ensemble Slub. “We didn’t really know what we were doing, we just had this idea of somehow wantıng to make music with programming languages. We all llstened to Autechre, and at the time the idea of the creative coder wasn’t…” he shrugs, continuing, “programmers were seen as people who implemented designs.”
Ward was doing a media arts course in Plymouth where he was introduced to generative music, “He started making his own software to generate his music, and just leaving it running on stage.” says McLean, “but when we met up in London, and started first talking about bringing this live, there was a new version of [the computer music language] Supercollider which allowed live coding, and also a new language. ChucK, came out in the States. It just seemed like there was a moment where everyone – OK, not everyone, a really small group of strange people – thought it would be a really good idea to start making systems for writing live code to make music.”
Tidal – unrelated to a certain Jay-Z connected music streaming service – is the open-source language that McLean created to allow quick- response improvisation, now used by hundreds of musicians around the world. “I felt the need to develop something that was more immediate, because I was working with percussionists and finding that it would take several minutes before I could make a sound.” Tidal uses simple, one-word commands to apply functions to a pattern, and can link several computers over a local network to sync to a control pulse.
Watching him work, chopping and changing the lines of code that controls his loops by changing a number or adding a word to change a function, is like watching a graphic designer who has memorised keyboard shortcuts and can transform an image in seconds. Complexity emerges from simple instructions. With a few keystrokes, McLean transforms an arpeggio and a simple set of beats into complex polyrhythms that pan in decaying arcs across speakers. He granulates sound patterns and reverses them, and creates blobby, queasy Aphex Twin-style textures before switching up samples to produce something nasty and sputtering, like the filthiest work of The Bug. It’s pure concentration and flow, and in an algorave setting it can throw up quite a few surprises.
As well as other coders. McLean performs with musicians who play traditional instruments, as well as live artists and choreographers. But successful improvisation depends on communication between players – and how does this square with the concentration needed to live code? He describes watching a video of a performance with collaborator Matthew Yee King, in their group Canute: “We’re next to each other on the stage, and there’s quite a lot of points where I’m iooking at him, and that performance was, I think, quite possibly the best I’ve done. There’s a lot of points where we both finish at the same time, just somehow communicate an episode so we time it and change, which has been quite rare for me.”
This kind of rapport becomes more difficuit when working with choreographers or performance artists. He did another piece with the performance artist Suzanne Palzer, where she stepped on and off a platform. Her movement off the piatform caused the screen showing his code to go biank, and it would light up again when she stepped back on. She was, McLean says “trying to interrupt and interfere – and I was trying to remember where my code was! Suzanne’s work is about digital art but without computers, just these off and on movements.”
Apart from its use in improvising music. Tidal can be used to apply functions to patterns of any kind, not only sound. McLean will be working with the Open Data Institute to take aspects of large public data sets and represent them in new ways. In one of his academic papers that explains the pattern functions of Tidal, McLean uses visual representations – coloured blocks layered in rows to demonstrate the effects of functions on the code.
His examples look like knitting patterns, and another of his collaborative projects explores weaving. “The idea is to try to represent the weaves with code – and there are all of these problems.” he says, discussing everything from the three-dimensional nature and tactile properties of different materials to the ‘edge problem’ – many commercial textile software programmes ignore the edge of the fabric. “People think of code as being really complicated, and weaving as really simple and repetitive, but when you actually look at weaving, it’s incredibly complex.” He gives workshops to introduce non-coders to Tidal, and “people who haven’t programmed anything before start making music together in a couple of hours”, he says, smiling. “It’s kind of on the level of understanding knitting patterns or something like that.”