Fix rounding

This commit is contained in:
Matthias Neeracher 2008-04-05 18:58:16 +00:00
parent 6d7078e550
commit f9df0535de

View File

@ -343,7 +343,7 @@ if biab.sub!(/^.*?\xA0\xB0\xC1/m, '')
if channel==176 or channel==179 or channel==180 if channel==176 or channel==179 or channel==180
pitch = VL::NoPitch pitch = VL::NoPitch
end end
onset = (onset / 10.0).floor onset = ((onset+5) / 10.0).floor
RAWNOTES.push([onset, pitch]) RAWNOTES.push([onset, pitch])
end end
end end
@ -367,7 +367,7 @@ while RAWNOTES.size > 0 || CHORDS.size > 0
RAWNOTES.unshift(note) RAWNOTES.unshift(note)
if lastNote if lastNote
lastNote['tied'] ||= 0 lastNote['tied'] ||= 0
lastNote['tied'] = VL::TiedWithNext lastNote['tied'] |= VL::TiedWithNext
RAWNOTES.unshift([nextMeas, lastNote['pitch'], true]) RAWNOTES.unshift([nextMeas, lastNote['pitch'], true])
else else
RAWNOTES.unshift([nextMeas, VL::NoPitch]) RAWNOTES.unshift([nextMeas, VL::NoPitch])