X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/62d5191553d75c84d63ace49f6f5173a35773c88..f930cbccef5ed34b7b17b9e738458b048d93d1da:/src/app/event_pprinters.py?ds=inline diff --git a/src/app/event_pprinters.py b/src/app/event_pprinters.py index 2f77809..679924e 100755 --- a/src/app/event_pprinters.py +++ b/src/app/event_pprinters.py @@ -1,11 +1,47 @@ +# -*- coding: utf-8 -*- +""" +formatage des événements + +$Id$ +$URL$ +""" + from events import eventNames import sys self = sys.modules[__name__] -def log_COLDOWN(e) : - return '%s' % e.column.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) + +log_COLDOWN = log_COLUP = log_COLOVER = _log_col def log_default(e) : + return '' return str(e) pprinters = {}