Week 4: Alternating Patterns
Page Overview:
Recap
Last time, we learned about division, Euclidean rhythms, and n notation:
d1 $ n "1(3, 8) [2 3]/2" # s "808"
By dividing the pattern in square brackets by 2, the second and third samples alternate each cycle! Our first topic today shows an alternative method of accomplishing this.
Listening
I like how much space there is in the drum pattern at the beginning. You can hear it gradually get built up.
New Tidal Notation
This week, we’ll extend our ability to create dynamic grooves with very succinct code, and we’ll finally get started applying effects!
Alternating Patterns (<>)
We can specify sounds that play in alternating cycles using angle brackets < >
which can be typed with shift+, and shift+.. For example, this pattern is the same as the above pattern in the recap:
d1 $ n "1(3, 8) <2 3>" # s "808"
You can also stick subpatterns and rests in angle brackets. This groove consistenly has a bass drum on 1 and a snare on 3, but the bass drum pattern on 2 alternates between 4 things.
d1 $ s "bd <bd [bd bd] [bd*2 ~*2] ~> sn:2 ~"
If you want to repeat a subpattern across multiple cycles, you can use !
notation. The following pattern uses a louder snare sound once every 4th cycle. (What happens if you use *
instead?)
d1 $ n "0*3 <0!3 2>" # s "sn"
By the way, going forward I’ll mix and match using n
and and s
functions for writing patterns. Choosing which to use tends to depend on the samples and groove you are writing.
Euclidean Rhythms Part 2
Last week we learned that Euclidean Rhythms in which some number of onsets are equally dispersed within some number of gaps. A great way of thinking about Euclidean rhythms is as shapes that fit around a circle. A groove with three onsets is a triangle, four is a quadrilateral, etc. An optional third comma-separated argument describes a rotation of that shape. In the following pattern, the bass drum rhythm has been shifted once over to the left resulting in hits on 2, the and of 3, the and of 4.
d1 $ s "bd(3, 8, 0)" -- |..|..|.
d2 $ s "bd(3, 8, 1)" -- ..|..|.|
It turns out that many rhythms from around the world are Euclidean. Try out some examples below copied from the Tidal Docs.
(2,5) : A thirteenth century Persian rhythm called Khafif-e-ramal.
(3,4) : The archetypal pattern of the Cumbia from Colombia, as well as a Calypso rhythm from Trinidad.
(3,5,2) : Another thirteenth century Persian rhythm by the name of Khafif-e-ramal, as well as a Rumanian folk-dance rhythm.
(3,7) : A Ruchenitza rhythm used in a Bulgarian folk-dance.
(3,8) : The Cuban tresillo pattern.
(4,7) : Another Ruchenitza Bulgarian folk-dance rhythm.
(4,9) : The Aksak rhythm of Turkey.
(4,11) : The metric pattern used by Frank Zappa in his piece titled Outside Now.
(5,6) : Yields the York-Samai pattern, a popular Arab rhythm.
(5,7) : The Nawakhat pattern, another popular Arab rhythm.
(5,8) : The Cuban cinquillo pattern.
(5,9) : A popular Arab rhythm called Agsag-Samai.
(5,11) : The metric pattern used by Moussorgsky in Pictures at an Exhibition.
(5,12) : The Venda clapping pattern of a South African children’s song.
(5,16) : The Bossa-Nova rhythm necklace of Brazil.
(7,8) : A typical rhythm played on the Bendir (frame drum).
(7,12) : A common West African bell pattern.
(7,16,14) : A Samba rhythm necklace from Brazil.
(9,16) : A rhythm necklace used in the Central African Republic.
(11,24,14) : A rhythm necklace of the Aka Pygmies of Central Africa.
(13,24,5) : Another rhythm necklace of the Aka Pygmies of the upper Sangha.
An extra cool thing you can do is integrate alternating patterns within Euclidean rhythms:
d1 $ s "hc(<11 13>, 16, <0 1 0>)" # n "<0 2>"
I’m using n
in a strange way here (after the s
) - can you tell what is going on?
Effects With 0–1 Ranges
It’s finally time to learn some audio effects! Audio effects use the same syntax as the n
function we covered last week - after your mini notation write a #
sign followed by your effect.
d1 $ s "bd hc sn:4 hc" # room 0.4
Each of the effects we will cover today take numbers between 0 and 1. Picture turning a dial where the leftmost (minimum) value is 0, the middle value is 0.5 and the rightmost (maximum) value is 1.
room
: reverb.pan
: position from left to right.gain
: volume (can go above 1 for louder sounds, but be careful!).djf
: DJ filter.
You can stack multiple effects!
d1 $ n "0 1*<1 2 3> <3!3 4> 0" # s "feel"
# djf "<0.4!2 0.5!2 0.6!2 0.5!2>"
# room 0.2
I tend to like using one effect per line, but you can do what is most readable to you. If you are using multiple lines per channel, you need to use cmd+return or ctrl+return. Using shift one runs one line.
Bonus! Effects can take in mini notation too. How are each of the effects behaving below? Where is the rhythm primarily determined?
d1 $ s "hc(11, 16, <0 4>)"
# pan "0.2 0.4 0.6 0.8 0.6 0.4"
# djf "0.4 0.8"
# room "0.8 0!15"
Challenges
- Create a groove with multiple channels that are panned in different locations. Here is a starter template with a simple drumbeat:
d1 $ n "0" # s "bd"
d2 $ n "0*8" # s "hc" # pan 0.3 # gain 0.8
d3 $ n "~ 2" # s "sn" # pan 0.8
- Experiment with overlapping 808 pitched drums using Euclidean rhythms and alterating patterns. Different sample numbers contain different pitches.
d1 $ n "0(3, 8)" # s "808lt"
d2 $ n "0(5, 8, 1)" # s "808mt" # pan "0.3"
d3 $ n "0(5, 16, <0 2>)" # s "808ht" # pan "0.6"