Skip to content

Instantly share code, notes, and snippets.

@pd3v
Last active November 22, 2018 22:33
Show Gist options
  • Save pd3v/758ddab0e5c8017f2bce9454dd6ab573 to your computer and use it in GitHub Desktop.
Save pd3v/758ddab0e5c8017f2bce9454dd6ab573 to your computer and use it in GitHub Desktop.
Aperggiating in Tidalcycles

Arpeggiating in Tidalcycles

What is an arpeggio?

Let's start with a chord. A chord is a group of notes played at the same time; at least 3 of them. If you play those same notes, one after another, you have an arpeggio.

Play a chord

For instance, C Major chord and its notes: C E G

d1 $ n (chord "major") # s "superpiano" -- notes c5, e5 and g5 playing

Play an arpeggio - play one note after another

d1 $ n (arpg "major") # s "superpiano"

or

d1 $ arpgt "major" "c5" # s "superpiano" -- notes c5 e5 g5 playing

Play any chord arpeggio

For example, G Major

d1 $ arpgt "major" "g4" # s "superpiano" -- notes g4 b4 cs5 playing sequently

or

d1 $ n (arpg "major" + "g4") # s "superpiano" -- notes g4 b4 cs5 playing

Arpeggios are very fond of their chords

do
  d1 $ n (chord "minor" + "g4") # s "superpiano"
  d2 $ arpgt "minor" "g5" # s "superpiano"

Chord progression arpeggios

D Major scale chord progression

d1 $ slow 7 $ arpgt "major7 minor7 minor7 major7 major7 minor7 m7flat5" "d5 e5 fs5 g5 a5 b5 cs5" # s "superpiano"

or

d1 $ arpgt "<major7 minor7 minor7 major7 major7 minor7 m7flat5>" "<d5 e5 fs5 g5 a5 b5 cs5>" # s "superpiano"

D Major chord progression backing D Major chord progression arpeggios. So much fondness.

do
  d1 $ n (chord "<major7 minor7 minor7 major7 major7 minor7 m7flat5>" + "<d4 e4 fs4 g4 a4 b4 cs4>") # s "superpiano"
  d2 $ arpgt "<major7 minor7 minor7 major7 major7 minor7 m7flat5>"  "<d5 e5 fs5 g5 a5 b5 cs5>" # s "superpiano"

Set from where to start playing

If you play one note after another, where do you start? You choose. Take C Major chord, considering C note played 1st, E played 2nd, and G played 3rd, then arpg' and arpgt' functions allow you to set from which note to start playing the arpeggio.

1st form - C Major arpeggio

d1 $ n (arpg' 0 "major") # s "superpiano" -- being 0 the index for the 1st note; notes playing c5 e5 g5

or

d1 $ arpgt' 0 "major" "c5" # s "superpiano" -- notes playing c5 e5 g5

or

d1 $ arpgt "major" "c5" # s "superpiano" -- notes playing c5 e5 g5

2nd form - E then G then C

Starting from E, 2nd note or index 1:

d1 $ arpgt' 1 "major" "c5" # s "superpiano" -- notes playing e5 g5 c5

and so on and so forth for as many notes the arpeggiated chord has.

Varying through time/cycles from which note to start from

d1 $ arpgt' ("<0 1 2 3>") "major7" "c5" # s "superpiano" -- 1st cycle starts on c5, 2nd cycle starts on e5, then g5 and then b5

equivalent to

d1 $ iter 4 $ n (arpg "major7") # s "superpiano"

Unordered starting

d1 $ arpgt' "<3 1 0 2>" "major7" "c5" # s "superpiano" -- 1st cycle starts on b5, 2nd cycle starts on e5, then c5 and then g5

Arpeggios variations

Stochastic arpeggios

Using functions shuffle and scramble. Works only on a pattern's 1st cycle.

Without repeating notes

d1 $ shuffle 4 $ n (arpg "minor7") # s "superpiano"

With repeating notes

d1 $ scramble 4 $ n (arpg "dim7" + "e5") # s "superpiano"

or

d1 $ scramble 4 $ arpgt "dim7" "e5" # s "superpiano"

Rhythmic variations in arpeggios

arpgtt accepts a function to transform the whole arpeggio

arpgti accepts a time interval and a function that will transform the arpeggio within that time interval.

Given the arpeggio

d1 $ arpgt "m11" "e4" # s "superpiano"

Transforming into

d1 $ arpgtt (fast 2) "m11" "e4" # s "superpiano"

d1 $ arpgti (0.66,1) (fast 2) "m11" "e4" # s "superpiano"

Melodic varations in arpeggios

d1 $ arpgtt (|+| n (irand 3 * 12 * choose[1,-1])) "m11" "e4" # s "superpiano" -- Arpeggios' notes in different octaves

d1 $ arpgti (0.66,1) (|+| n ("<12 -12 24>")) "m11" "e4" # s "superpiano"

Rhythmic and melodic variations in arpeggios

A combination of the two previous topics.

d1 $ arpgti (0, 0.5) ((|+| n (irand 3 * 12 * choose[1,-1])).(every 6 (fast "<2 0.5>"))) "m11" "g5" # s "superpiano"

Running arpeggios up and down

d1 $ palindrome $ arpgt "minor7" "a4" # s "superpiano"

d1 $ fast "<4 3 2 3>" $ palindrome $ slow 5  
$ arpgt "minor major minor minor major" "e4 g5 a5 b5 d5" # s "superpiano" -- E minor pentatonic scale Rocks!

Arpeggios on the loose

d1 $ fast 2 $ arpgtt ((|+| n (slow 11 $ run 11)).(# crush (slow 11 $ rev $ run 5 + 1))) "m11" "e4"  
# s "[supersaw, superhex, supercomparator]" # rel 0.2 # nudge "[0,0.9,0.71,0.52]"

d1 $ stack [slow 2 $ n (chord "<major7 minor7 major7 m7flat5>" + "<c4 e4 c4 b3>") # s "supercomparator",  
superimpose ((# bpf (slow 8 $ scale 400 6000 sine)).(#bandq 0.5).(#gain 1.2))  
$ arpgtt (every 6 (fast 2))"<major7 m7flat5>" "<c4 b4>" # s "[supersaw, superchip]"  
|+| n (choose[0,12,-12,24,-24]) # att 0.6 # sus 0.6]  
# room 0.6 # size 0.6 # delay 0.7 # delayt 0.25 # delayfb 0.7 # orbit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment