
Your phone can already write you a song. Type a sentence into a music generator, something like a slow jazz ballad about a rat in a Barcelona street at night, and it will give you a track with a breathy saxophone, brushes on the snare, and a walking bass. It will be passable. It will not be about anything you saw.
This was my initial brief for the third postcard in my suite: “I saw a solitary rat, just after midnight, near the station, minding its own business. In the middle of the road. Peaceful.” A generator can take those words. It cannot take the decisions that turned them into A Rat in Sants, the decisions are the music.
That is why the project behind Postcards of Barcelona had one rule from the first night, written into the repository before a single section existed: composition, not generation. AI music composition and AI music generation sound like the same thing, but they are opposites.
Text all the way down
The rule needed a medium both of us could read. Music written as audio is opaque to an agent, and music written in a graphical score editor is opaque to a terminal. Therefore, everything was text.
The notes live in LilyPond, a language for engraving scores. A bar of the rat’s baritone sax is a line of text. The same text produces the printed score and the MIDI, and every change is a diff in git. I or the agent could propose a phrase by writing it, I could read the score, hear the render, and say what I thought. The decision went into a notes file for that piece, with my words quoted. The films followed the same pattern later: scenes written as code, shot lists as text, every decision in Markdown next to the work.
Text is also what let the agent drive the rest of the stack. LilyPond’s MIDI feeds the samplers, the samplers’ stems feed ffmpeg for the mix and the studio sound, and every step is a command I or the agent can run, read, and check. None of those open-source tools was built to work with the others, or with an AI model: text is the one format they all share.
Text did something I had not expected. It made the work inspectable, so it could be steered. The first draft of the passengers’ section had the city theme as a gentle waltz on the piano, with the rat’s little motif carrying on underneath on the baritone, unnoticed. I listened and told the agent: “Maybe the rat can go slightly more separate than the people. Different metric, more intertwined rather than synced.” The second draft put the rat in fours against the passengers’ threes, its phrases crossing the bar lines and meeting the crowd only once every twelve beats: one creature out of step with the city, minding its own business. That exchange is impossible with a generator, because there is no page to point at.

The rat in fours, as text and as score. Three phrases of four beats fill four bars of the passengers’ waltz, so the two only line up every twelve beats.
A Rat in Sants. The passengers’ waltz starts at 1:42: the baritone is the rat, walking in fours underneath and meeting the crowd only now and then. In the film it moves on its own phrases while the passengers hurry from the station to the metro.
What the scripts were allowed to do
The rule drew a hard line between the notes and the performance. Scripts could change how a written note sounds: the swing, a bend where I wrote a glide, a little looseness in the timing so the band doesn’t sound like a sequencer, a vibrato on a long note, which recorded instrument plays it, the room it is heard in, and the mix. They could never add, remove, or choose a note. No algorithm, no random generation.
That is roughly the line between a composer and a performer, and it held all the way to the films. Every gull landing, cockroach step, and camera move is written in a shot list and tied to the score. A gull beats its wings on each soprano call. A cockroach puts a foot down on each note of the percussion part I called the feet. Procedural code was allowed for texture only, like the shimmer on the water or the leaves in the trees, with fixed seeds so that every render is the same film.
Three things the rule gives me
The work is mine. The credits on every film say Music, production and video: Roberto Hortal, and I can defend each line of them. Every note was a note I had chosen. Some of them the agent suggested and I accepted as they were, the way a composer accepts a good idea from a player in rehearsal. None of them got in because I wasn’t paying attention.
The work is specific. A generator gives you the centre of everything it has heard. My brief for the seagulls asked for Tete Montoliu in the piano and a touch of rumba catalana. The second draft overdid the rumba, and I said so: “We’ve gone too far to rumba. We need more Tete, rumba just a flavour: claps, guitar. Much more subtle.” The third draft had a soft nylon guitar and quiet palmas only in the vamp and the bridge. That is the difference between a style and a choice, and you can only make it when you control the individual notes.
I learnt the craft. Five days of deciding taught me what a voicing is, why a metric modulation moves the beat without jolting the listener, and why a melody played in octaves by the piano sounds bigger than the same melody on the sax. I wrote about this risk, for software, in Cognitive Coverage: when the machine produces the work, the scarce skill is understanding what was built. Generation skips the understanding. Composition with an agent forces it on you, one decision at a time.
The case for the shortcut
Generation is faster, and for background music in a café nobody needs to defend each note. If you want a track, use a generator.
Speed was never my constraint. The whole suite, with its films, took five days of my own free time. What I wanted was a piece of work with me in it, made in a craft I had not been trained in. A generator cannot give you that at any speed. Choosing each note is the kind of positive friction that is doing a job: it is where the judgement lives, so it is the step you keep.
The series began with I Composed and Filmed a Jazz Suite in Five Days. The next post, One Section at a Time (Fri 4 December), shows how that judgement was organised so it never slowed the work down.
The agent suggested some of the notes. Each one that stayed, I had heard and chosen.
Leave a Reply