bc5834de55a3367084f16860ece4ca54ad65b7a3
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
)
22 def log_COLSTATECHANGE(e
):
25 return u
'%2d %5s %3s %3s %s' % \
26 (col
.index
, e
.state
, tone
.midi
, tone
.name
, e
.syllabus
)
29 """ formate les événements de colonne COLDOWN, COLUP, COLOVER
33 - nom de la note /A-G[#b]?/
38 return u
'%2d %5s %3s %3s %r' % \
39 (col
.index
, col
.state
, tone
.midi
, tone
.name
, pos
)
41 log_COLDOWN
= log_COLUP
= log_COLOVER
= _log_col
47 for type, name
in eventNames
.items() :
48 f
= getattr(self
, 'log_%s' % name
, log_default
)
51 __all__
= ('pprinters')