comparison musiccutter.py @ 40:5c47f9361d93

Use unpacked argument lists to make it easier to work out which parameters you're editing.
author Daniel O'Connor <darius@dons.net.au>
date Tue, 24 May 2016 11:12:20 +0930
parents 86622ba474e4
children 21da8af1cdd2
comparison
equal deleted inserted replaced
39:86622ba474e4 40:5c47f9361d93
32 # V ^ 32 # V ^
33 # +---+---+---+ lowest note 33 # +---+---+---+ lowest note
34 # | | | | 34 # | | | |
35 # +---+---+---+ highest note 35 # +---+---+---+ highest note
36 # 36 #
37 m = Midi2PDF('notes', 120, 155, 5.5, 3.3, 6.0, 50, False, True, False, False, False, shift, 1, 30, 0.9, 'Helvetica', 12) 37 m = Midi2PDF(**{
38 'notefile' : 'notes',
39 'pagewidth' : 120,
40 'pageheight' : 155,
41 'pitch' : 5.5,
42 'slotsize' : 3.3,
43 'heel' : 6.0,
44 'leadin' : 50,
45 'timemarks' : False,
46 'trytranspose' : True,
47 'drawrect' : False,
48 'notenames' : False,
49 'notelines' : False,
50 'noteoffset' : shift,
51 'pagesperpdf' : 1,
52 'timescale' : 30,
53 'notescale' : 0.9,
54 'fontname' : 'Helvetica',
55 'fontsize' : 12,
56 })
38 base, ext = os.path.splitext(filename) 57 base, ext = os.path.splitext(filename)
39 base = os.path.basename(base) 58 base = os.path.basename(base)
40 m.processMidi(filename, base + '-%02d.pdf') 59 m.processMidi(filename, base + '-%02d.pdf')
41 60
42 class Midi2PDF(object): 61 class Midi2PDF(object):