资 源 简 介
python-realbook library
python-realbook is an high quality music score drawing library for creating Real Book style sheet music. It uses Cairo as drawing backend.
Features
High quality score drawing
Realbook-style chord writing
Support: node, chords, symbols
irealbook:// format parser (http://irealbook.net/)
To do:
* Code cleanup
* Add documentation and examples
* irealbook parser debugging
* Writing notes support
Examples
A simple score
```
import cairo
from realbook import MusicScore
Create a new MusicScore
score = MusicScore()
score.title = "Title"
score.author = "Author"
score.tempo = "Swing"
s = score.add_staff()
m = s.addmeasure(section="A", stopbarline="final")
m.add_chord(0, "C")
# print to pdf
w, h = (8.27100, 11.69100)
surface = cairo.PDFSurface("score.pdf", w, h)
cr = cairo.Context(surface)
score.draw(cr, w,