import sys
self = sys.modules[__name__]
-def log_COLDOWN(e) :
- tone = e.column.tone
- return '%s (%s)' % (tone.midi, tone.nom)
+def log_NOTEON(e):
+ return ''
+
+def log_NOTEOFF(e):
+ return ''
+
+def log_NOTEEND(e):
+ return ''
+
+def log_COLSTATECHANGE(e):
+ col = e.column
+ tone = col.tone
+ return u'%2d %5s %3s %3s %s' % \
+ (col.index, col.state, tone.midi, tone.name, e.syllabus)
+
+def _log_col(e) :
+ """ formate l'événement
+ - etat
+ - index de colonne
+ - hauteur midi
+ - nom de la note /A-G[#b]?/
+ """
+ col = e.column
+ tone = col.tone
+ pos = e.pos
+ return u'%2d %5s %3s %3s %r' % \
+ (col.index, col.state, tone.midi, tone.name, pos)
-def log_COLSTATECHANGE(e) :
- return u'%5s %s' % (e.state, e.syllabus)
+log_COLDOWN = log_COLUP = log_COLOVER = _log_col
def log_default(e) :
return ''