diff options
Diffstat (limited to 'scale.bqn')
| -rw-r--r-- | scale.bqn | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scale.bqn b/scale.bqn new file mode 100644 index 0000000..b6eb24f --- /dev/null +++ b/scale.bqn @@ -0,0 +1,12 @@ +# Utilities for working with notes and scales + +# A minor scale goes up two fifths and down four from the root +minor β β§12|7Γ2-β7 + +# Transpose frequency π© up π¨ semitones. +Trans β (2 β Γ·β12)βΈΓ + +# Frequency from note in roughly scientific pitch notation +# e.g. C#, A4, Gb2, F## +Oct β β'4'-Λ('0'βΈβ€β§β€β'9')βΈ/βΎ"3"Λ # Default to 3 to hit middle C +Note β (minorβΛ'a'(β’-β€βΆ'A'βΏβ£)β) (+Β΄β(-Λ"#b"=ββ’) Trans 440Γ2βOctββ’) 1βΈβ |
