I'm trying to make prog metal music with live coding, which usually involves changes of time signatures and additive groupings of 16th notes. As an exercise, I'm trying to pattern the main riff of "Phantoms" by Meshuggah (here's a wonderful explanation of the riff by Yogev Gabay).
Part of the drums play the riff in 4/4 (e.g. s "hh hh sn:3 hh"). However, kick and guitars / bass play very long sequences of 16th notes (note number n means n 16th notes, ~ means one 16th note rest, and ! means repetition): (3~ 3!2~ 3!4~ 3!3~)!3 = 34 x 3 = 102 16ths (3~ 3!2~ 3!7~ 3!4~ 3!3~) = 56 16ths (3~ 3!2~ 3!4~ 3!3~) = 34 16ths
Total length of the riff = 192 16th notes
I have 3 doubts:
Q1: How would you approach writing patterns like this in a compact way in Tidal?
Q2: How would you write a sequence of different time signatures, where the pulse duration (e.g. 16th) is maintained between bars, rather than the cycle duration? E.g. in a sequence like 4/4 5/8 3/4, my cycle would be divided into 16, 10 and 12 16th notes, but I want all of them to have the same duration.
Q3: How would you truncate a polymeter? E.g. say you have a 5 against 3 polymeter, but you wanna truncate the sequence in 5 after 4 repetitions of the sequence in 3, so when the sequence repeats, both start at the beginning of their sequence respectively:
5: 123451234512
3: 123123123123
Q1: How would you approach writing patterns like this in a compact way in Tidal?
I'm a bit confused as I think 3 ~ 3!2 ~ 3!4 ~ 3!3 ~ has 14 events not 34?
If you want to have 4 event per cycle you can use {}%4 e.g.
{3~ 3!2~ 3!4~ 3!3~}%4
Repeating these phrases beatwise is currently difficult though. This kind of beatwise concatenation is something I'm working on for version 2.0 of tidal, inspired by carnatic rhythms.
Q2: How would you write a sequence of different time signatures, where the pulse duration (e.g. 16th) is maintained between bars, rather than the cycle duration? E.g. in a sequence like 4/4 5/8 3/4, my cycle would be divided into 16, 10 and 12 16th notes, but I want all of them to have the same duration.
I think this hits the same issue unfortunately.
Q3: How would you truncate a polymeter? E.g. say you have a 5 against 3 polymeter, but you wanna truncate the sequence in 5 after 4 repetitions of the sequence in 3, so when the sequence repeats, both start at the beginning of their sequence respectively:
5: 123451234512
3: 123123123123
To restart a pattern every 4 cycles you can put restart "t/4" $ in front, e.g.
Ok I made this handy 'minicat' function. You pass it a number of beats per cycle, and a list of mininotation strings, and it will add the mininotation together beatwise.
import Data.Either
minicat :: (Show a, Parseable a, Enumerable a) => Time -> [String] -> Pattern a
minicat beatsPerCycle minis = _fast (beatsPerCycle/total) $ timeCat sized
where total = sum $ map fst sized
sized = rights $ map (((\mini -> (fst $ steps_tpat mini, toPat mini)) <$>) . parseTPat) minis
I've worked with this in the past using a combination of cps maths and zoom - unfortunately cps is applied globally so it may or may not meet your needs:
-- zoom for time sig changes - every 4 bars changes from 4/4 to 3/4
let c = (140/240)
in
d1
$ every' 4 1 (zoom (0, 0.75) . (# cps (c * (4/3))))
$ s "bd cp"
# cps c
will give you |12345123|12345123|, 1 is a cycle here, so if you did something like timeLoop 16, you would get really long polymeters that would restart on the 1 after 16 cycles
I watched the (amazing!) video that you shared @alvaro.makes.music - thank you!
I think the notation you used ((3~ 3!2~ 3!4~ 3!3~)!3) is similar enough (but different!) to Tidal notation that it led us down a different path. That said, I love the rhythmic ideas that came up in the thread! For example, the restart function is totally new to me.
It uses nTake for the note pattern he describes here. It also converts the first sequence you notated as 3~ 3!2~ 3!4~ 3!3~ into Tidal's rhythm notation "1!3 ~ 1!6 ~ 1!12 ~ 1!9 ~".
The next step would be to concatenate the different sequences together while maintaining the equal length (your Q2). I imagine it would look something like this:
We are missing the part that ensures cellVariation has more time so that the notes have the same duration. Maybe someone on the forum can help us get the final part!
Okay, next challenge.The pitch changes on every group of notes (the "1!3") between 0, 1 and 15 half steps. So for the abstraction [1,2,4,3], we get something like: ... #up "{0!3 0 2!3 15!3 0 0!3 2!3 15!3 0!3 0 2!3 15!3 0!3 0}%16"
To be used like d1 $ struct (shuggah [1,2,4,3]) $ s "superpiano" #up (transpose [1,2,4,3] [0,1,15])
Except the pitches need to cycle until they align with the rhythm again. Example:
Rhythm: [1,2,4,3] => groups = 1+2+4+3 = 10 groups of ("1!3") notes
Pitch: [0,1,15] => notes = 3
How many times we have to run the pattern with cycling pitches until they align?
mcm(groups,notes) = mcm(10,3) = 30 groups of ("1!3") notes
Repetitions of the rhythm: mcm(groups,notes) / groups = 30/10 = 3 repetitions