Skip to content

Instantly share code, notes, and snippets.

@akkunchoi
Created October 8, 2018 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akkunchoi/d2c79d2a7e6dfbad0026f264ae0f4490 to your computer and use it in GitHub Desktop.
Save akkunchoi/d2c79d2a7e6dfbad0026f264ae0f4490 to your computer and use it in GitHub Desktop.
slang
# http://slang.kylestetz.com/
@bass (adsr (osc tri) 64n 2n 0.4 4n)
@synth (osc sine) + (gain 0.08)
@melody (osc saw) + (gain 0.08)
@drums (drums) + (gain 3)
@cdrums (drums) + (gain 1)
play @synth
(rhythm [8t r16t])
(notes (flatten [
(repeat 2 [e3 e4 e5])
(repeat 2 [d3 d4 d5])
(repeat 2 [a3 a4 a5])
[g3 g4 g5]
[f3 f4 f5]
]))
play @melody
(rhythm [8n])
(notes (random (chord phrygian e4)))
play @bass
(rhythm [1n])
(notes (random (chord phrygian e2)))
play @drums
(rhythm (random [8n 8n r8n 8n]))
(notes [2 2 2 5 12 2])
play @cdrums
(rhythm [8n])
(notes [6 7 8 7])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment