From f9df0535deaeb4daa5bfc47d050af721d5c2723f Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sat, 5 Apr 2008 18:58:16 +0000 Subject: [PATCH] Fix rounding --- Filters/VLBIABType.reader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Filters/VLBIABType.reader b/Filters/VLBIABType.reader index 2cbd520..1e5cf6e 100755 --- a/Filters/VLBIABType.reader +++ b/Filters/VLBIABType.reader @@ -343,7 +343,7 @@ if biab.sub!(/^.*?\xA0\xB0\xC1/m, '') if channel==176 or channel==179 or channel==180 pitch = VL::NoPitch end - onset = (onset / 10.0).floor + onset = ((onset+5) / 10.0).floor RAWNOTES.push([onset, pitch]) end end @@ -367,7 +367,7 @@ while RAWNOTES.size > 0 || CHORDS.size > 0 RAWNOTES.unshift(note) if lastNote lastNote['tied'] ||= 0 - lastNote['tied'] = VL::TiedWithNext + lastNote['tied'] |= VL::TiedWithNext RAWNOTES.unshift([nextMeas, lastNote['pitch'], true]) else RAWNOTES.unshift([nextMeas, VL::NoPitch])