From a42a7d6ef35ab56e871c1c7f1cff3571e82a1ec3 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 18 Oct 2001 00:07:11 +0200 Subject: [PATCH] patch::: 1.5.17.jcn6 1.5.17.jcn6 - aka: `pgwit! Ah, dacht dat-i zo wel aardig was.' --- CHANGES | 5 +++-- VERSION | 2 +- scripts/midi2ly.py | 14 ++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 8dc35c4df8..e10993120d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -1.5.17.jcn5 - aka: `pgwit! Ah, dacht dat-i zo wel aardig was.' +1.5.17.jcn6 - aka: `pgwit! Ah, dacht dat-i zo wel aardig was.' =========== * Some more hacking at midi2ly.py: @@ -13,7 +13,8 @@ - don't repeat duration by default - bugfix: allow 8th notes too - include new version of input/test/midi-scales.ly - - added barchecks + - added barchecks + fix + - bugfix for relative mode * Shorter MIDI creation texts. diff --git a/VERSION b/VERSION index 74e93a0f36..b8f2d2a038 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 PATCH_LEVEL=17 -MY_PATCH_LEVEL=jcn5 +MY_PATCH_LEVEL=jcn6 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py index aadc17f24d..3e29526add 100644 --- a/scripts/midi2ly.py +++ b/scripts/midi2ly.py @@ -216,9 +216,11 @@ class Note: else: delta = self.pitch - reference_note.pitch commas = sign (delta) * (abs (delta) / 12) - if (sign (delta) \ - * (self.notename - reference_note.notename) + 7) \ - % 7 >= 4: + if ((sign (delta) \ + * (self.notename - reference_note.notename) + 7) \ + % 7 >= 4) \ + or ((self.notename == reference_note.notename) \ + and (abs (delta) > 4) and (abs (delta) < 12)): commas = commas + sign (delta) if commas > 0: @@ -599,7 +601,11 @@ def dump_bar_line (last_bar_t, t, bar_count): if t - last_bar_t == bar_t: s = '|\n %% %d\n ' % bar_count - last_bar_t = t + last_bar_t = t + else: + # urg, this will barf at meter changes + last_bar_t = last_bar_t + (t - last_bar_t) / bar_t * bar_t + return (s, last_bar_t, bar_count) -- 2.39.5