Mercurial > ~darius > hgwebdir.cgi > musiccutter
comparison musiccutter.py @ 35:71d1f7a5dc3c
merge
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Wed, 04 May 2016 17:48:32 +0930 |
parents | 1d5dcaa3b07d |
children | 6874140c9c11 |
comparison
equal
deleted
inserted
replaced
34:36b9ff561228 | 35:71d1f7a5dc3c |
---|---|
17 if filename == None: | 17 if filename == None: |
18 filename = 'test.midi' | 18 filename = 'test.midi' |
19 # Card layout from http://www.orgues-de-barbarie.com/wp-content/uploads/2014/09/format-cartons.pdf | 19 # Card layout from http://www.orgues-de-barbarie.com/wp-content/uploads/2014/09/format-cartons.pdf |
20 # Notes are read from right to left | 20 # Notes are read from right to left |
21 # Highest note is at the bottom (closest to the crank) | 21 # Highest note is at the bottom (closest to the crank) |
22 # fold fold | |
23 # in out | |
24 # V ^ | |
25 # +---+---+---+ lowest note | |
26 # | | | | | |
27 # +---+---+---+ highest note | |
28 # | |
22 m = Midi2PDF('notes', 120, 155, 5.5, 3.3, 6.0, 50, False, False, False, False, False, 0, 30, 0.9, 'Helvetica', 12) | 29 m = Midi2PDF('notes', 120, 155, 5.5, 3.3, 6.0, 50, False, False, False, False, False, 0, 30, 0.9, 'Helvetica', 12) |
23 base, ext = os.path.splitext(filename) | 30 base, ext = os.path.splitext(filename) |
24 base = os.path.basename(base) | 31 base = os.path.basename(base) |
25 m.processMidi(filename, base + '-%02d.pdf') | 32 m.processMidi(filename, base + '-%02d.pdf') |
26 | 33 |