Skip to content

Instantly share code, notes, and snippets.

@zgulde
Created December 10, 2015 20:29
Show Gist options
  • Save zgulde/85bc5b91642fbbc32351 to your computer and use it in GitHub Desktop.
Save zgulde/85bc5b91642fbbc32351 to your computer and use it in GitHub Desktop.
explanation of my sonic pi code

Explanation

Explaining this code.

Everything used in the code is built into sonic pi, so (in theory) anyone could run it on their machine

I have a two dimensional array of arpeggios, arpeggios (this might not be the correct musical theory term for it), and an array of synths, synths

The loop will

  1. grab a random arpeggio to play and a random synth to play it with
  2. calculate the the time each note needs to be played such that the total time it takes to play the arpeggio is arptime
  3. play the arpeggio 4 times
    • play a drum sample based on the index of the arpeggio being looped through
    • i used index + 1 to try and roughly simulate the 1, 2, 3, 4 in musical theory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment