Re: misplaced-note-head bug (issue 5303)

2019-07-06 Thread James Lowe
Hello On Fri, 5 Jul 2019 16:55:03 +0200, Lukas-Fabian Moser wrote: .. > > @James, I attach the updated complete patch set; could you integrate the > second patch? (Assuming incremental patch sets are ok?). Sorry for > bothering you again with this! > No problem. I'll get to it some time th

Re: misplaced-note-head bug (issue 5303)

2019-07-05 Thread Lukas-Fabian Moser
ew file mode 100644 index 00..2a645f2a57 --- /dev/null +++ b/input/regression/misplaced-note-head-bug.ly @@ -0,0 +1,15 @@ +\version "2.19.16" + +\header { + + texidoc = "Misplaced note head bug (issue 5303) should be fixed." + +} + +\layout { + #(layout-set-staff-size 19) +} +

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread David Kastrup
Lukas-Fabian Moser writes: > To me, this would seem to suggest that the "less invasive" bugfix I > proposed (by rounding) would in fact preserve the incompleteness in > the move from int to float calculations that Han-Wen probably > introduced by accident (unless (*) is motivated in a way I do no

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread Lukas-Fabian Moser
I would think that rounding the int and keeping lastpos as an integer would be less invasive and I would do that. It would be less invasive, the question is what the right thing would be. Anybody have an idea whether non-integer positions can sensibly be employed here for, say, chromatic notat

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread Benkő Pál
David Kastrup ezt írta (időpont: 2019. júl. 4., Cs, 18:16): > > "Phil Holmes" writes: > > > - Original Message - > > From: "Lukas-Fabian Moser" > >> > >> Questions: > >> > >> a) How to decide which fix is "better"? (My guess that using floats > >> might pose the danger of rounding errors

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread David Kastrup
"Phil Holmes" writes: > - Original Message - > From: "Lukas-Fabian Moser" >> >> Questions: >> >> a) How to decide which fix is "better"? (My guess that using floats >> might pose the danger of rounding errors adding up until something bad >> happens - probably only for huge chords compr

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread Phil Holmes
- Original Message - From: "Lukas-Fabian Moser" Questions: a) How to decide which fix is "better"? (My guess that using floats might pose the danger of rounding errors adding up until something bad happens - probably only for huge chords comprising hundreds of notes, but I'd tend to

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread Lukas-Fabian Moser
..2a645f2a57 --- /dev/null +++ b/input/regression/misplaced-note-head-bug.ly @@ -0,0 +1,15 @@ +\version "2.19.16" + +\header { + + texidoc = "Misplaced note head bug (issue 5303) should be fixed." + +} + +\layout { + #(layout-set-staff-size 19) +} + + +{ 2 \clef bass } + dif

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread James Lowe
Hello On Thu, 4 Jul 2019 12:31:46 +0200, Lukas-Fabian Moser wrote: > Folks, > > only now was I able to do regression tests regarding my proposed fix(es) > of the misplaced-note-head-bug (issue 5303): > > The bug is caused by the integer-cast > > lastpos = int (p);

Re: misplaced-note-head bug (issue 5303)

2019-07-04 Thread Lukas-Fabian Moser
Folks, only now was I able to do regression tests regarding my proposed fix(es) of the misplaced-note-head-bug (issue 5303): The bug is caused by the integer-cast lastpos = int (p); in lily/stem.cc:629. Replacing it by either i) lastpos = p; // use float value or ii) lastpos = int (round

Re: misplaced-note-head bug (issue 5303)

2019-06-29 Thread Lukas-Fabian Moser
Hi David, Aah, I'm sorry - I was not aware that casting to int works by /truncating/. Then it's quite obvious what's happening here. Which code do you think has a problem related to your example? Compile \version "2.19" \score {   {     4 \clef bass   }   \layout {     #(layout-set-staff-s

Re: misplaced-note-head bug (issue 5303)

2019-06-29 Thread David Kastrup
Lukas-Fabian Moser writes: > Folks, >> >> I think I isolated the rounding (?) issue leading to the misplaced >> note head in https://sourceforge.net/p/testlilyissues/issues/5303/ >> >> Please forgive the horrible C/C++ jumble - it's been quite long >> since I did this kind of stuff and usually on

Re: misplaced-note-head bug (issue 5303)

2019-06-29 Thread Lukas-Fabian Moser
Folks, I think I isolated the rounding (?) issue leading to the misplaced note head in https://sourceforge.net/p/testlilyissues/issues/5303/ Please forgive the horrible C/C++ jumble - it's been quite long since I did this kind of stuff and usually only ever wrote vanilla C: #include doub

misplaced-note-head bug (issue 5303)

2019-06-29 Thread Lukas-Fabian Moser
Folks, I think I isolated the rounding (?) issue leading to the misplaced note head in https://sourceforge.net/p/testlilyissues/issues/5303/ Please forgive the horrible C/C++ jumble - it's been quite long since I did this kind of stuff and usually only ever wrote vanilla C: #include doubl