Skip to content

Instantly share code, notes, and snippets.

@jarmitage
Created April 14, 2020 20:37
Show Gist options
  • Star 39 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jarmitage/1f9dfa38f776508e8b52634ecd70c66d to your computer and use it in GitHub Desktop.
Save jarmitage/1f9dfa38f776508e8b52634ecd70c66d to your computer and use it in GitHub Desktop.
Avril 14th
-- happy avril 14th :)))))))))))))))))))))))))))))))))))))))
do
let bars = 4
key = "8"
righthand = "[[4 -3] [0 _ _ _ _ _ 0]] [[-3, -8] [7 5 4 0]]"
lefthand = "[0 9 12 16] [4 12 16 19] [5 12 17 19] [2 12 17 16]"
d1 $ slow bars
$ stack [
n (righthand + key + "<24 36>/2"),
n (lefthand + key)
]
# s "midi"
# octave "3"
# velocity "0.3 0.5 0.8 0.9"
# sustain "[2 0.7]*4"
@davispolito
Copy link

davispolito commented Apr 14, 2020

This is super cool. Could you explain what is actually meant by the code for the righthand and how that is combined with the lefthand using this stack concept? This tidal language seems very cool.

@jarmitage
Copy link
Author

@davispolito stack plays a list of patterns simultaneously, and lefthand and righthand refer to the separate piano parts.

@davispolito
Copy link

so what would be [[4 -3] [0 _ _ _ _ _ 0 ]] vs [4 -3 0 0] ?
I assume "_" is a rest. are the duration values based on size of the array? i.e. for an array [0, 1, 2, ... , n] each note would get a duration of 1/n.
And then what is the difference between [a b] and [a, b]

@jarmitage
Copy link
Author

@robmckinnon
Copy link

Note: To get this working locally after installing TidalCycles follow the SuperDirt MIDI Tutorial to define a MIDI Out for SuperCollider named midi.

In my case I defined MIDI Out to point to a VIRTUAL MIDI-Out Host running on my laptop. I was then able to receive MIDI events over Web MIDI and play audio via Web Audio in a browser. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment