From 0840d64da12b9f782a0a444e5617076d5e77007e Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 1 Dec 2016 22:35:59 +0100 Subject: [PATCH] vidi-player.py: use a fixed width when printing the note names This improves alignment in the output and makes it slightly more readable. --- vidi-player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vidi-player.py b/vidi-player.py index 2b8613e..7cec441 100755 --- a/vidi-player.py +++ b/vidi-player.py @@ -62,7 +62,7 @@ def timeline_from_midi(midi_file, video_font_path): elif is_note_off(msg) and msg.channel == 0: note = vidi.MidiNote(msg.note) duration = elapsed_time - start_time - print("Note name: %s start_time: %f duration: %f" % + print("Note name: %3s start_time: %f duration: %f" % (note.name, start_time, duration)) video_sample_path = "%s/sample_%s.webm" % (video_font_path, note.name) -- 2.1.4