Now we’re doing to take our prior example
let melody = s "superchip(<3 5 7>,8)" # n "<[f a c e] [d e f c]>"
d1 $ sometimes (|+ voice "<0.2 0.25>")
$ melody
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"
d2 $ slow 2
$ (|- 12)
$ melody # release "2" # voice "0.2 0.4 0.3"
and change it up to be more interesting. The first thing we’ll do is introduce the transformation rev
, which takes a pattern and reverses it. I don’t mean that it reverses the sounds themselves, it reverses the order of the pattern. This keeps the melody and bassline related but not sounding quite as synced up.
let melody = s "superchip(<3 5 7>,8)" # n "<[f a c e] [d e f c]>"
d1 $ sometimes (|+ voice "<0.2 0.25>")
$ melody
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"
d2 $ rev
$ slow 2
$ (|- 12)
$ melody # release "2" # voice "0.2 0.4 0.3"
From here, let’s make our melody sound a little thicker by adding a stutter. We’ll add the transformation stut 4 0.7 (1/8)
to add four notes each quieter than the last by 70% and spread out an eighth of a cycle apart.
let melody = s "superchip(<3 5 7>,8)" # n "<[f a c e] [d e f c]>"
d1 $ stut 4 0.7 (1/8) $ sometimes (|+ voice "<0.2 0.25>")
$ melody
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"
d2 $ rev
$ slow 2
$ (|- 12)
$ melody # release "2" # voice "0.2 0.4 0.3"
This adds a nice bit of resonance to the melody. Stuttering is just a generally useful trick when you need to make a pattern sound more interesting, including your drum beats.
The last transformation we’re introducing is a really fun one: jux
. What jux
does is apply a transformation to a pattern and then play the transformed version of the pattern in one ear and the untransformed version in the other ear. We’ll use jux
to drop the bassline another octave but just in one ear:
let melody = s "superchip(<3 5 7>,8)" # n "<[f a c e] [d e f c]>"
d1 $ stut 4 0.7 (1/8) $ sometimes (|+ voice "<0.2 0.25>")
$ melody
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"
d2 $ rev
$ jux (|- 12)
$ slow 2
$ (|- 12)
$ melody # release "2" # voice "0.2 0.4 0.3"
While jux
creates a cool effect, it sounds even better if we can rotate it around your ears. We can do that with a modifer called pan
and our first continuous pattern sine
.
let melody = s "superchip(<3 5 7>,8)" # n "<[f a c e] [d e f c]>"
d1 $ stut 4 0.7 (1/8) $ sometimes (|+ voice "<0.2 0.25>")
$ melody
# release "0.4 <0.3 0.6>" # voice "0.3 0.4 0.5"
d2 $ rev
$ jux (|- 12)
$ slow 2
$ (|- 12)
$ melody # release "2" # voice "0.2 0.4 0.3" # pan (slow 4 sine)
What we’re doing here is panning with a sine wave that varies between 0 (which pan interprets as all the way left) and 1 (which pan interprets as all the way right). We put the slow
in the pattern to make it take a full four cycles to loop back around again, giving the bassline a calm slow meander around your head.
Now the main thing left is to include some percussion. We won’t use the percussion samples we’ve seen before. Instead, since we’re making some chiptunes, we’ll use noise to create percussion. This is how old video games made drum sounds: putting a very short release on noise makes it sound kind of like a drum hit.
Here’s a percussion pattern that goes well with the rest of our little tune:
d3 $ slow 2 $ s "supernoise(7,8)"
# n "-24" # release "0.1 0.15 0.2" # room 0.4 # gain 1.1
If we put all these pieces together we get something that sounds not half bad!