Created
April 13, 2019 13:52
-
-
Save datramt/17dc22b62316bceb3fdecb0c076dd661 to your computer and use it in GitHub Desktop.
snippet for determining ranges with sonic pi note name symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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