abcMIDI-2013-11-05

November 4 2013

abc2midi bug: A bug was detected when abc2midi is run with the Barfly
stress model (-BF 1). For the following file t.abc

X: 1
T: Barfly implementation bug
R: jig
M: 6/8
L: 1/8
K: G
  |:  "C"c3 "G/B"B3 | "D7/A"AGF "G"GBd :|

abc2midi t.abc -BF 1
the note c3 or B3 may be inaudible in some instances.

Analysis: the local variable vel in the function noteon() may end
up being undefined. In certain cases stress_factors() called
by noteon() may not set the variable vel, in which case
we expect note_beat() to be called. Unfortunately, if vel
was initally nonzero note_beat is note called and vel
has a random value.

Fix: initialize vel to 0 in noteon().

yaps fix: On January 16 2006 an option to display the notes in
red was introduced. This code did not work well because the
other musical components were also colored red. The problem
was fixed by maintaining the color in black and temporarily
switching the color to red when a note, beam or rest is
drawn. A new variable redcolor was introduced in drawtune.c
and set by the !red! command and reset to zero by !black!.
The functions drawnote(), drawrest, and drawbeam() test this
variable and switch the color to red on a temporary basis in
order to draw the object.