1 # -*- coding: utf-8 -*-
3 formatage des événements
9 from events
import eventNames
11 self
= sys
.modules
[__name__
]
14 return '%3d %3d %3d' % (e
.chan
, e
.key
, e
.vel
)
17 return '%3d %3d' % (e
.chan
, e
.key
)
25 def log_COLSTATECHANGE(e
):
28 return u
'%2d %5s %3s %3s %s' % \
29 (col
.index
, e
.state
, tone
.midi
, tone
.name
, e
.syllabus
)
32 """ formate les événements de colonne COLDOWN, COLUP, COLOVER
36 - nom de la note /A-G[#b]?/
41 return u
'%2d %5s %3s %3s %r' % \
42 (col
.index
, col
.state
, tone
.midi
, tone
.name
, pos
)
44 log_COLDOWN
= log_COLUP
= log_COLOVER
= _log_col
50 for type, name
in eventNames
.items() :
51 f
= getattr(self
, 'log_%s' % name
, log_default
)
54 __all__
= ('pprinters')