# superchip, euclidean rhythms, and modifying melodies with patterns

The first new synth we’re going to play with in this section is superchip, which replicates the way sounds were created on really early video game consoles and computers.

If you were to try something like

d1 \$ s "superchip" # n "c"

You’ll hear a note that’s not terribly pleasant to listen to. It has the opposite problem of the superpiano synth. While superpiano needed to have its sound stretched out to try and make you feel more like you were listening to a real piano, superchip needs to be cut short to sound more like a note and less like an overwhelming buzz. We can do this with a modifier called release

d1 \$ s "superchip" # n "c" # release 0.4

Now let’s start adding more superchip hits into this pattern. We’re going to introduce a new concept called euclidean rhythms. Basically, you write them like

d1 \$ s "superchip(7,8)" # n "c" # release 0.4

with the parentheses and the two numbers separated by a comma. The way you read this is “play seven superchips as evenly as possible across dividing the cycle into eight beats”. You can do this with any pair of numbers, although the pattern works best if the two numbers don’t divide each other. Like (7,9) is going to give a more interesting sound than (3,9) or (5,10). Euclidean rhythms are a really great way to quickly create beats and melodies that sound good but are more interesting than just a four-pulse rhythm.

In the previous example, we saw a pattern of notes modified by our instrument superpiano

d1 \$ slow 2 \$ n "[<c e> [d [a c]]? <[e f]*2 [a b]> < g f e>]"
# s "superpiano" # sustain 4 # lpf 1250 # room 0.3 # shape 0.3 # gain 0.9

but now what we’re doing is making a pattern of instruments and then modifying it with a note, in this case “c”. You don’t have to just put a single thing in a modifier, but you can make modifiers take patterns as well! We can take our pattern of supership above and change the notes to a simple pattern

d1 \$ s "superchip(7,8)" # n "f a c e" # release 0.4

Try listening to this and seeing what you hear. You should hear the same underlying rhythm but the pattern is now also divided up into quarters where the first quarter f notes play, in the second quarter a notes play, in the third quarter c notes place, and in the fourth quarter of the cycle e notes play. This is how patterns in modifiers intersect with patterns that create sound!

You can hear this effect more pronounced by taking the following code and seeing that the structure of notes that are played is always in quarters no matter how big you make the number of superchips played: if you make it four you’ll hear each note played once, if you make it eight each note will be played twice in a row, and at sixteen it will be played four times in a row.

d1 \$ s "superchip*16" # n "f a c e" # release 0.4

One of the things that’s going to let us add a lot of variation to our patterns is that basically every modifier we’ve seen can take not just a single parameter but a pattern. For example, you can change the release so that it changes across cycles:

d1 \$ s "superchip(7,8)" # n "f a c e" # release "0.4 <0.1 0.8>"

If you listen to this you’ll hear that the notes played in the first half of the cycle have a different release than the notes played in the second half of the cycle, and that the second half alternates between really short and much longer.

We can also add in another modifier that works on some of the supercollider synths: voice. Basically, voice will allow you to change the sound of the instrument in really dramatic ways, letting you almost treat it like a family of related instruments that you can switch between by tuning the voice.

d1 \$ s "superchip(7,8)" # n "f a c e" # release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"

If you listen to this now, you’ll hear even more variation across this simple pattern. If we also introduce some more variation to the pattern of notes it’ll start to sound more like a real melody:

d1 \$ s "superchip(7,8)" # n "<[f a c e] [d e f c]>" # release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"

There’s a couple of other tricks to try though. When we were talking about randomized chords, we introduce the sometimes transformation: it took a way to modify patterns and then applied it half the time. We used this to create chords, but now we’re going to use it to add more variation to the voice parameter

d1 \$ sometimes (|+ voice "<0.2 0.25>")
\$ s "superchip(7,8)" # n "<[f a c e] [d e f c]>"
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"

One of the cool things in Tidal is that operations like |+ or |- aren’t just for increasing notes but they can actually change every modifier that takes a number. In addition to changing the voice, we could even have notes become more staccato by subtracting from the release as well!

d1 \$ sometimes (|- release 0.2)
\$ sometimes (|+ voice "<0.2 0.25>")
\$ s "superchip(7,8)" # n "<[f a c e] [d e f c]>"
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"

We’ve shown a lot of neat concepts for building patterns in this section and in the next section we’ll be getting into how to make a bassline by reusing and transforming the melody!