Skip to content

Instantly share code, notes, and snippets.

@datramt
Created April 13, 2019 13:52
Show Gist options
  • Save datramt/17dc22b62316bceb3fdecb0c076dd661 to your computer and use it in GitHub Desktop.
Save datramt/17dc22b62316bceb3fdecb0c076dd661 to your computer and use it in GitHub Desktop.
snippet for determining ranges with sonic pi note name symbols
# is n within range x..y?
x = :C1
y = :C5
n = :Bb3
puts (x.to_i..y.to_i).cover?(n.to_i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment