Let’s generate some imaginary guitar pedals
A few weeks ago I ordered some drum gear from Sweetwater. They’re the anti-Amazon of music gear shopping: well-categorized, curated, human-run, and reliably legitimate.
When my package arrived, Procjam was in full swing, and I was working on a stories-about-dead-aliens generator. Sitting in the bottom of the box was Sweetwater’s paper catalog, and found myself flipping through the pages reading descriptions of snare drums.
I’m not a guitarist, but I wondered what the guitar pedal section would look like. It turns out there are, uh, a lot of guitar pedals.
When I sat down to work on my Procjam entry again, I realized I would have a lot more fun generating guitar pedals than stories about dead aliens.
Play with the guitar pedal generator
Guitar pedals!
Why procgen? Why guitar pedals?
Everest Pipkin gave a talk at Roguelike Celebration this year about corpora-as-media, and gave a great argument for why procedural generation is a good way of making art:
- It increases the likelihood of surprise.
- It can produce novel ideas that humans cannot or do not.
- It can be responsive and unique.
- Writing is hard, so we should make the computer do it.
When looking at the body of guitar pedal appearances and descriptions as corpora, several characteristics pop out as making them good procgen candidates. For descriptions, there is a jargony vocabulary describing features and output, a varied but predictable structure, and a large number of examples. For appearances, there is a flexible visual grammar that makes a guitar pedal recognizable no matter what the tiny details are.
Beyond all that theory stuff, I try to float with the currents of inspiration and not think too much. This time I was inspired by a Sweetwater catalog.
Computer as music catalog copywriter
As I was writing this post I kept wanting to quote parts of Everest Pipkin’s talk, but I was in danger of reproducing the whole thing in text, so you should just go watch the talk (it’s only 23 minutes) and I’ll assume you did that from now on. If you don’t have time, it’s fine. You’ll understand well enough.
The goal of my procedural guitar pedal marketing copy generator is to co-create a celebration of the unique language of music with the original copywriters. My corpus is 20 pages of guitar pedals literally torn out of the Sweetwater catalog.
Rules, Ethos, Poetics
To create a grammar for generating new copy, it helps to figure out the rules, ethos, and poetics of the copyspace. (Thanks, Everest!)
Rules:
- Less than 400 characters.
- Always positive, never negative.
- Roughly two sentences.
Ethos:
- Every guitar pedal is valuable.
- Every guitar pedal is unique.
- Every guitar pedal is perfect.
Poetics:
- Details over comprehensiveness.
- Use the full body of musical language.
- Revere the guitar legends.
- Celebrate jargony features.
Anatomy of guitar pedal marketing copy
For each item in the corpus, I broke it down into its component parts before I entered it into my data files.
Here’s a word-for-word blurb for the Archer (“Classic Transparent Overdrive”) pedal:
The Archer is a high-headroom, transparent overdrive pedal, packing coveted K-style harmonic saturation and plenty of clean output. Archer’s touch-preserving headroom and endless amp-pushing boost are the results of an internal charge pump that boosts its 9-volt operating voltage up to 18 volts.
Broken down into its component parts, it looks like this:
[The :shortname] is a high-headroom, transparent [:purpose] [:pedal],
packing [:benefit] and [:benefit]. [:shortname]’s [:benefit] and
[:benefit] are the results of [:benefit].
Here’s another one, the PlimSoul (“A New Flavor of Overdrive”) pedal:
What’s better than a great overdrive pedal? How about two great overdrives in one pedal? Fulltone’s PlimSoul delivers just that, giving you a smooth, bluesy overdrive on one side and a more biting overdrive on the other. You can even blend the two channels to craft your ultimate signature overdrive.
What’s better than a great [:purpose] [:pedal]? How about _two_ great
[:purposes] in one [:pedal]? [:brand]’s [:shortname] delivers just
that, giving you [a :toneAdjective], [:toneAdjective] [:purpose] on
one side and a more [:toneAdjective] [:purpose] on the other. You can
even blend the two channels to craft your ultimate signature [:purpose].
Between these two, we’ve collected a list of “benefits”:
- “endless amp-pushing boost”
- “an internal charge pump that boosts its 9-volt operating voltage up to 18 volts”
- “a genuine, US-made NOS 6205 preamp tube”
We also have some “tone adjectives”:
- “smooth”
- “bluesy”
- “biting”
- “clean”
Now let’s do a remix from scratch for “The Stevebox”:
[The :shortname] features [:benefit] for [a :toneAdjective],
[:toneAdjective] sound that everyone will love. And [:benefit] means
you’ll never lose that [:toneAdjective] [:purpose].
The Stevebox features a genuine, US-made NOS 6205 preamp tube for a biting, smooth sound that everyone will love. And an internal charge pump that boosts its 9-volt operating voltage up to 18 volts means you’ll never lose that bluesy overdrive.
Perfect!
One last thing worth pointing out in this section is that most descriptions can be cleanly split into “first sentence” and “second sentence,” and it’s usually possible to match any first sentence with any second sentence.
What’s better than a great overdrive pedal? How about two great overdrives in one pedal? Fulltone’s PlimSoul delivers just that, giving you a smooth, bluesy overdrive on one side and a more biting overdrive on the other. And an internal charge pump that boosts its 9-volt operating voltage up to 18 volts means you’ll never lose that clean overdrive.
Not perfect, but more than good enough!
What you’re looking at here is a grammar: recursive rules for putting things together. As I write this, my grammar contains 2,901 words, plus a list of 1,820 famous musicians.
Improv
The tool I used to process the grammar into text is called Improv by Bruno Dias. Improv’s core idea is that phrases have tags, and once a tag is used, its value doesn’t change. So if I have a phrase tagged type: distortion
, and that phrase is used somewhere in my output, then phrases tagged type: reverb
will not appear because their tag has the wrong value.
To learn more about Improv, read Bruno's tutorial. My code uses most of Improv’s features, so it might serve as a good example. Feel free to email me if you’re working with Improv and need help.
My main “innovation” around using Improv is I do some of the text entry in a CSV with LibreOffice, so I can browse word lists very quickly. I have a Python script that converts the CSV to YAML.
Computer as guitar pedal designer
Text is cool, but to really sell something like this to internet randos, I needed graphics. I used Vue.js and a massive amount of CSS to create a grammar for guitar pedals that looks something like this:
- Controls: pair, single row, pair of rows, triangle
- Single control: knob, finger switch, or LED
- I/O
- Inside: labels
- Outside: rectangles representing jacks
- Name and brand
- Bottom: 1-4 foot switches
- Foot switch: Stomp plate, hex foot switch, or round foot switch
The graphical part has no connection to the marketing copy besides the name and brand, so the descriptions can sometimes mention features the pedal doesn’t appear to have, but in practice no one notices.
CSS is a deep technical topic and I don’t have energy left to write about details, but here are some opinions:
- CSS with Flexbox is a great visual prototyping tool.
- Use Puppeteer for PDF output.
- Use
em
s for sizing so you can scale the whole thing using font size.
I did a PDF version for NaNoGenMo (“write a program that generates 50,000 words of fiction”). The catalog has 760 pedals organized by type and brand.
Tips for PDF output using Puppeteer:
- Fix background colors using
-webkit-print-color-adjust: exact;
. - Fix box shadows using
-webkit-filter: opacity(1);
. - Text shadows must be done using
-webkit-filter
rather thantext-shadow
. - There is a minimum font size. Trying to make text smaller than 0.5rem won’t work.
- CSS columns don’t work well with page breaks. Group pages in divs.
Fun parts of the data files
- Adjectives describing tone
- Sanitized list of famous guitarists’ names
- A simple but effective grammar for generating the subtitles (“Your Vibrato Machine”)
- A list of “benefits” such as “its cocktail of germanium and silicon transistors”
- Top-level generalized copy
Discussion
You can talk to me on Twitter at @irskep or over email. The main feedback I’ve gotten so far is “this is great, do modular synths next.” No promises!