Plugin screenshot showing a textbox, some displayed text, and a circle with coloured sections.

Summer Vibes

HP – What did you do, this Summer?
AE – Created a music plugin with Claude.
HP – Didn't realize you were a coder! Who’s Claude?
AEI'm not. Claude is an Artificial Intelligence system from Anthropic.
HP – OIC! You’re among those people who anthropomorphize AI…
AE – Nope! The same way you don’t anthropomorphize when you say “I took a walk with my dog” or “she smashed this rock with a sledgehammer”.
HP – Fair. So, you made a plugin, eh? Care to show me it?
AE – Here ya go!
HP – Wait! Isn't the circular sequencer a Native Instruments thing?
AE – It’s a Hy-Plugins thing, and Olympia Noise Co. thing, and “Buchla USA” thing… The circular representation is just a convenient way to display cycles… and it’s in use since at least 1252.
HP – Right, so, what makes your plugin special, then?
AE – The fact that it came from me? I mean, it doesn’t need to be unique. It’s a project, not a product. In fact, I’ve put it in the Public Domain (CC0). And it has plenty of features that I find interesting, for both “didactic” and performance purposes. So, it’ll be part of my playflow.
HP – You mentioned it’s free…
AE – As in speech.
HP – Can I try it?
AE – Totally! Well, if you have a Mac, totally. You can download it here from the release page and install it directly. For iPadOS, I hope to have it on TestFlight soon.
HP – Neat! Still… Nerdy way to spend a Summer, no?
AE – You’re not wrong. I’m a learning geek. 

The Plug

HP, Hypothetical Person, uses a Mac and has access to plugin hosts and DAWs, including the “free as in first-party perk” GarageBand. The core work behind that plugin is available as a webapp.

What do these do? Simply put: you enter a pattern and you get it displayed in a circle. You can also play it, to hear what it sounds like.

If you don’t know anything about music, you may find this confusing. If you’re still with me, great! I could use your fresh perspective.

If you know a few things about music, you may find this confusing. At this point in the project, I haven’t done much to make things immediately obvious.

If you know a lot about music, you may find this frustratingly confusing. I get that.

Many of the things I choose to do in this work are rather unusual. And they come from multiple origins. The plugin and webapp both have disparate use cases.

🤓🤓🤓🤓

A core set of ideas I’ve had is around math-oriented approaches to notating rhythmic patterns. That part is far from uncommon.

At a very basic level, we think of “hits” and “rests”. In a loop. Say, “hit, hit, rest”. So, 1-1-0. Binary. Which converts to different numbers, with hexadecimal notation (from 0 to F) being both geeky and common. Since each hex digit has 16 possibilities. So, 🧮… we can ‘encode’ a sequence of four ‘steps’ with hit or rest. Neat! With octal notation, 8 possibilities so… 3 steps of “on or off”.

Really, this is a common idea in many fields, including in music.

However – and this is a key difference between my approach and most other things out there: I count this number in a strict left-to-right fashion.

So…

1000 is “hit, rest, rest, rest” and the corresponding hex digit is 1.

1011 is “hit, rest, hit, hit” and the corresponding hex digit is D.

0x1D (hex 1 followed by hex D) is 1000 1011, 0x1D1D is 1000 1011 1000 1011.

0xDAD is 1011 0101 1011.

This goes against computer science convention… and I find it much easier to “parse”. At a glance, I can easily tell what repeats. In fact, that’s what I find useful about octal being three steps, as some patterns are “ternary”.

Pattern valueHex
10000x1
01000x2
11000x3
00100x4
10100x5
01100x6
11100x7
00010x8
10010x9
01010xA
11010xB
00110xC
10110xD
01110xE
11110xF

Getting the vibe

For a while, now, I’ve been playing with computer code using Large Language Models (LLMs). There are many approaches to generating computer code, some of which qualify as vibecoding. And there are many ways to understand vibecoding. As with the old joke (“ask ten people, get 15 different opinions”), we could argue to no end as to what “it actually means”.

To me,

Vibecoding is a practice of creating fully working computer software through interactions with a Large Language Model without getting into the details of the code itself.

So it’s not really “coding” in the strict sense. Sure, it does involve a number of steps which are quite similar to those involved in software development (which is the whole thing which surrounds coding). Debugging/troubleshooting, especially. Yet it’s quite different from coding tasks in software development projects. (Yeah, I know that coders spend a lot of time at these other tasks. They’re “part of” coding, in that sense. What’s missing in vibecoding, though, it’s the part which involves, y’know, getting code together.)

Otherwise, it’s much closer to “design” in the sense that we give specifications as to how things should behave and interact based on those results. It’s also akin to management, though it’s remarkably different in key ways.

Basic idea is: “it’s a vibe”.

While the practice has been going on for a while (including by yours truly), Andrej Karpathy coined “vibe coding” this past Winter.

There’s a new kind of coding I call “vibe coding”, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It’s possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard. I ask for the dumbest things like “decrease the padding on the sidebar by half” because I’m too lazy to find it. I “Accept All” always, I don’t read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it. The code grows beyond my usual comprehension, l’d have to really read through it for a while. Sometimes the LLMs can’t fix a bug so I just work around it or ask for random changes until it goes away. It’s not too bad for throwaway weekend projects, but still quite amusing. I’m building a project or webapp, but it’s not really coding – I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.

Being at home with Claude

(With a nod to a cousin for a leading role.)

So far, this project has been almost entirely done through interactions with Claude.

It started as a simple artefact through a chat with the Claude AI chatbot. It grew more complicated as time went on. Eventually made it into an open, trackable project as a repo on GitHub, the Microsoft-owned platform used to share many an Open Source project.

Since then, mostly been using Claude Code, the Anthropic tool for computer code. Though it’s really geeky, I find that it suits my workflow.

It’s been an intense learning experience. Not in a bad way. In a true way. 

I’m kinda proud. Feeling accomplished. And, yeah, learnt a lot!

As with a lot of deep (human) learning, much of it is difficult to describe. Some of it is demonstrable. Bits can be reproduced. 

Hard things are easy, easy things are near-impossible

Of course, there are difficult things which remain difficult. It’s just that… you think something will take a huge amount of time and it’s done in an instant. Then, when you want to make a small tweak… you’re in it for quite a ride.

Take the initial Claude artefact. Within seconds, I had something working. The weeks since have been a constant refinement, of course. Yet many of the features which took the longest were simple tweaks. Were I a coder, I’d likely be able to solve them quickly. Alas, I am not.

The strict left-to-right order I mentioned in the nerd block? Fiendish. Kept causing errors. Claude would not cooperate. It was just about flipping things around, an easy task in computing. Yet it proved nightmarish and haunted me for weeks. (Had to do it over again, at some point in the plugin development. And, as I type this, I still have a “todo” item to change the original webapp implementation.)

Recently, I had to spend hours fighting Claude with an issue caused by ‘E’ being interpreted as ‘e’. Claude Code turned the whole house upside down, making things fail miserably, only to find the lowercase issue.

Life is a test

Learnt a lot about the importance of testing. Had heard a whole lot about “unit tests”. Eventually implemented a series of them. They’re far from sufficient, especially when it comes to user-facing features. Still, they’ve proven quite useful as a way to eliminate some recurring issues. In fact, it’s funny how Claude Code will react while creating a unit test which clearly demonstrates a flaw in the code.

Testing is at the very core of LLMs and GenAI in general. At a very basic level, a significant part of the training is about exceedingly large numbers of tests, with clear results.

And that’s the key. If something is easy to assess automatically, it’s likely easy to generate. Humongous numbers of iterations can get you a long way, when you can get clear feedback.

On the other hand, those things which are difficult to assess (the majority of Life, I’d say) is exceedingly difficult to get through most generative tools. You could possibly make a simulacra of the thing through an automatic assessment along some robust criteria. And that’s how we get things which give the impression of being created by humans. Yet it all lacks intersubjectivity.

Know thy self

As is so frequently the case in learning that it sounds trite, my vibecoding process is also about self-learning. That gets tricky to explain because it’s about reflexivity. Still, it’s… telling.

Because I’m creating my own plugins, I notice that I don’t feel the same way about commercial products in the whole #MusicTech scene. In there, as in other hobbies, there’s a notion of “GAS”, Gear Acquisition Syndrome. With frequent jokes about “a cure for GAS”. While I’ve bought a few things over the Summer, my attraction to most of these products has really shifted. Which even gets me to dream in new ways, both figuratively and literally.

Not only am I not a coder, I’m quite vocal about not being a manager. Sure, I can (and often do) lead projects. That’s often called “project management”. I cannot, however, manage people. It’s even about psychological demands. Thing is, some part of interacting with Claude feels to me like management. Not that Claude Code is “like an intern”. Certainly, LLMs aren’t like learners since they simply do not learn. I don’t mean that they’re reluctant learners. They don’t (currently) learn from our interactions, though some of them may refer to those interactions when instructed to do so. (Huge difference with human learning.)

Also learnt some hard lessons about knowing when to “cut my losses” and start over. Been reading Amy Edmonson’s Right Kind of Wrong. Quite fitting. When Claude Code gets “carried away” (its words!), it’s about holding back. Here, as in many other aspects of the process, versioning through Git has been key. Can be tricky and I’m no expert at that. Still, I’m already way better at it than I was a few weeks ago. It counts as self-knowledge for a variety of reasons.

Vibing to the beat

Also been learning stuff about music through this project. Some is very obvious, such as understanding some geeky algos by getting them implemented in my software. Or getting inspired from a math/music video.

Then, there are things which happen unconsciously. Such as hearing beats in their representation. As I’ve been listening to contemporary Pop music while doing cardio training, there’s quite a bit that I notice in a new way. An example could be the so-called “Scotch snap”. In my notation, it’s 0x3. And, thanks in part to the Baader-Meinhof Effect, I get to notice it more than I would otherwise. Same with the Tresillo rhythm (0x94) which is often used in the documentation which has been inspiring me through much of this vibecoding process.

Fieldwork vibes

Which is a good transition into the connections between this whole project and my background in ethnomusicology. And that one is a bit weird.

Some responses from Claude have alluded to a very direct relationship. After all, documenting musical patterns from diverse origins does connect with some aspects of ethnomusicological work (though it’d be much closer to comparative musicology than to my approach/era in ethnomusicology). In fact, there’s a kind of tension involved, as there’s a profound transformation at stake when we notate music.

🤓🤓🤓

The late Godfried Toussaint was a Computer Science prof at McG. His work is among key influences on computer-based approaches to rhythm… in the field of practice. What he’s described as “Euclidean rhythms” (PDF) are near ubiquitous in #MusicTech. And I find them fun to use. During one of my most successful live performances, those rhythmic patterns provided the strong basis which made for an easy balance between geeky and “earcatchingly approachable”.

It’s no exaggeration to say that those Euclidean rhythms are the key inspiration for this specific project.

(Thing is, this project isn’t my endgoal. When I started the chat with Claude AI to get an artefact, my intention was to get something usable quickly so that I can build on it. I care a whole lot more about chords and harmony than about rhythm.)

So, obviously, my plugin and webapp support Euclidean rhythms, with a simple notation. “E(3,8)” produces the aforementioned Tresillo (0x94): it’s three hits over eight steps. So, 10010010, like cutting off a pattern of “hit, rest, rest” just before the end of the third repetition. The Quintillo is “E(5,8)” (0xD6): 10110110. It’s the complement of the Tresillo and it’s like cutting off a pattern of “hit, rest, hit” just before the end of the third repetition. So, in both cases, it’s like cutting a ternary pattern into a binary structure (from 3×3=9 to 8 steps). There are other ways to describe these patterns. And they’re rather common… when you extract them from context. For instance, the Tresillo rhythm can be interpreted as a key component of the binary version of the so-called “clave” rhythm… if you interpret that pattern as the combination of two things. According to Toussaint, though, the clave rhythm’s popularity is strong evidence that the Euclidean algo has explanatory power. Notice the article of the seminal article: The Euclidean Algorithm Generates Traditional Musical Rhythms. The thrust of that article is that Toussaint’s analysis can help people somehow make sense of diverse rhythms around the World, using scattered (cherrypicked?) evidence from ethnomusicologists like Gerhard Kubik.

I mean, you’re not wrong. The algo can generate patterns which are similar to some components of rhythms used in traditional music. Does that mean it somehow explains them, though?

Toussaint’s book (which I’ve yet to read) makes the intention clear: The geometry of musical rhythm : what makes a “good” rhythm good?.

To my mind as a researcher, it’s quite a strange step to make. (As though you cut a ternary rhythm into a binary one… because you somehow prefer binary thinking?)

The basic Euclidean algo (well, Eric Bjorklund’s version, as used by Toussaint) is a way to divide some length into even parts. Evenness has quite an allure to certain minds and it’s not too surprising that it’d be found in music. After all, some of the most basic “4/4” rhythms typical of Eurocentric music are very even. You could write down “four on the floor” as 10101010, which is “E(4,8)” (0x55). Toussaint has readily acknowledged that it’s not very exciting. Things get more interesting with “relatively prime numbers”. So, the major insight is that people have been using a similar process to create patterns that we can represent as even divisions of a length. I mean, fine. Does it imply that evenness is preferable? What does it say about the relationships between the different elements of a rhythm, beyond a single pattern? That’d lead you to an understanding of what people do with these rhythms.

Speaking of the allure of mathematical, the aforelinked Andrew J. Milne has a whole geometric theory on “perfect balance” which is used to identify some interesting patterns. Like Toussaint’s book, the title of an article based on Milne’s work leaves little ambiguity: What Are “Good” Rhythms? Generating Rhythms Based on the Properties Set Out in The Geometry of Musical Rhythm.

There’s also the late Klarenz Barlow who’s had some influence in this sphere. A core concept, “indispensability” is… intriguing. Using an algo from Barlow’s Two Essays on Theory has been quite an interesting experience, especially after finding Marc Evanstein’s reimplementation which can deal with arbitrary numbers such as primes larger than 3. 🙄

As anyone can sense, I’m quite critical of such work as an ethnomusicologist.

What I like about those things, though, is that they can be fun bases for experiments. In fact, it’s satisfying to play with them. The rhythms they produce range from boring to funky to confusing to puzzling. Using algos to create patterns is as good as any a way to play with music.

So, yeah, I’ve implemented several features from those algos. Including “opposite” versions which give results which are uneven and/or imbalanced and/or dispensable. Plus, tweaking rhythms using such tools works well in my playflows.

At the end of the day…

This is all part of “my idea of fun”.

Leave a comment