Skip to content

Instantly share code, notes, and snippets.

@mrjoshida
Created January 3, 2021 21:09
Show Gist options
  • Save mrjoshida/eb52f0cb3816954810eb5e2a91b9aedb to your computer and use it in GitHub Desktop.
Save mrjoshida/eb52f0cb3816954810eb5e2a91b9aedb to your computer and use it in GitHub Desktop.
Starter code for the Chapter 3 project Scales and Intervals in the book Coding and the Arts (creativecodingbook.com). Paste into Sonic Pi to run.
use_bpm 120
current_note = 60
play(current_note)
sleep(1)
current_note = current_note + 2
play(current_note)
sleep(1)
current_note = current_note + 2
play(current_note)
sleep(1)
current_note = current_note + 1
play(current_note)
sleep(1)
# Continue the pattern to finish a C Major scale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment