GitHub - hoffa/notation: ? Simplified music notation
source link: https://github.com/hoffa/notation
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
? notation
Reading music is hard.
I got frustrated with the inconsistencies and (what I perceived as) unnecessary complexity in modern music notation. All I want to know is where to put my fingers. Note length, tempo, velocity, progression and other stuff are minor worries in comparison. Those things can be felt, without learning.
I wanted to create a simple and consistent music notation, along with parsers, converters and whatnot. Turns out writing beautiful renderers is tough, and it can get quite ugly with edge cases and the variety of sheets out there. I haven't yet had the motivation to finish anything considerable, so instead for some peace of mind, I'm documenting the envisioned notation here. This is a work in progress, so many things will likely change.
This is written from the perspective of a clueless piano beginner who just wants to play.
Usage
I've included a barebones parser and renderer. I'm trying to keep the code as short and simple as possible, and focus on ironing out the worst of issues. I don't want to deal with wrapping, justification and the plethora of other visual adjustments at this point.
Here's the basic usage:
./parse.py song.mxl | ./render.py
Format
Staves
- Thick lines always represent C notes, no matter the key.
- Measures are separated by vertical lines.
- Time signatures and key signatures are not shown.
- Changes in octave are indicated using a signed number at the start of the measure.
Notes
Note value and accidental are encoded in the shape of the note.
Natural, sharp and flat notes have the following shapes:
Rests
Rests aren't explicitly displayed.
Stem length
Assuming d
is the note value (where 1 is a whole note) and h
is the size of the gap between staff lines, the stem length is (log₂(1 / d) + 1) * h
. If d
is 1, the stem length is 0.
For example, a whole note will have no stem, a quarter note will have a stem length of log₂(1 / 0.25) + 1 = 3
staff line gaps, an eighth note will have a length of log₂(1 / 0.125) + 1 = 4
staff line gaps, etc.
The longer the note, the shorter the stem.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK