Hi all!
I wanted to share my new project called “Ziffers”: https://github.com/amiika/ziffers
It is a new notation and parser for Sonic Pi that can be used to write, parse and play compact melodies. Its inspired by numbered musical notation. Basic syntax is composed of degree numbers 1 - 7 and lower letters w, h, q meaning w=whole, h=half, q=quarter … etc.
For example “Bluebird song” can be played using Ziffers function:
zplay q5353 5653 4242 4542 5353 5653 w5 q5432 w1
There is also support for repeats “:”, numbered repeats “;” and randomization using “?” character for random degrees or “(1,4)” for random between or “[1,3]” and “[1?3,232,4??]” to choose degrees from array. There’s also some support for synth based drum sounds, binaural effects and midi in/out.
Playing degrees using integer and integer arrays are supported:
zplay 3, key: :c, scale: :major
zplay [1,3,4,3], key: “D”, scale: “major”
zplay [[1,3,4,3],[0.25,0.25,1,1]], key: 70, scale: :minor
Ziffers parses strings and arrays to array of hash objects that can also be played using default Sonic Pi functions like:
use_synth :mod_beep
ievanpolka =
“|:q1e11q12|q3113;q2-77+2|q31h1;q.5e4q32|q31h1:|”
“|:q5e55q43|q2-77+2;q4e44q32|q3113;q4e44q32|q31h1:|”m = zparse ievanpolka, key: :g4, scale: :minor
m = m.ringlive_loop :playz do
play m.tick
sleep m.look[:sleep]
end
Thats about it. To learn more, check out examples or test run that plays trough multiple examples.
If you have any new ideas or find any bugs, please report here or in github. Examples using ziffers are also very welcome