Thank you Dirk; that's great!
I made a small, easy and quick test with C version musixflx 0.83.2.
Replacing
if ((x-eff_linewidth)<(lastbar/2)){
into
if ((x-eff_linewidth)<(lastbar/1.2)){
eliminates the error message *in this case*.
The value 1.2 has no mathematical basis. Further careful
investigation must be done. At least 1.0 is nonsense
because stuff length may be shrinked to zero.
Perhaps this value shall be computed from \musicsize,
the width of clefs, noteskip, and all the other
corresponding elements.
Perhaps the same hack can be done in Lua version.
But I cannot judge whether this hack is correct or incorrect.
It might cause any further influences or any incompatibilities.
In addition, Microsoft C++ compiler complains warning C4701
for the variable "lastbar" with compiler option /W4.
(C4701: potentially uninitialized local variable)
(/W4: warning detection level 4,
partially equivalent to gcc -Wall -Wuninitialized)
Maybe further research will be needed.
Best regards,
Hiroaki
----- Original Message -----
> From: Dirk Laurie <[email protected]>
> Date: Sun, 19 May 2019 11:29:00 +0200
> To: Werner Icking Music Archive <[email protected]>
> Subject: Re: [Tex-music] Another one for the TeXperts
>
>
> Op So. 19 Mei 2019 om 10:56 het Hiroaki MORIMOTO <[email protected]> geskryf:
> >
> > Thank you Don.
> > I think this is a problem on musixflx.
> >
> > Unfortunately, I do not have enough knowledge about musixflx yet.
> > All I did in this morning is to search the string "error_exit(2)"
> > and to trace "if-then-else-endif" statement, both Lua version and C
> > version.
> > I know current version musixflx.exe is only a stub which launches
> > musixflx.lua; i.e. current musixflx.exe is something like a copy
> > or a symbolic/hard link to lua.exe. Editing musixflx.lua will be
> > the way.
> > In contrast, C version musixflx.exe (built from musixflx.c)
> > contains all the calculation process.
> >
> > Musixflx is not so large program, but it seems to have a bit
> > complicated algorithm deeply related to musixtex.tex.
> > At least C version might be understandable for me but it may
> > take quite a long time...
>
> I am fluent in Lua and once I understand the mistake in logic, I shall
> fix it in musixflx.lua.
>
> Lua is in theory a library designed to be embedded in a host program,
> such as luatex (which expects Lua rather than TeX when called as
> "texlua"). On Un*x systems, Lua scripts can be executed directly by
> the system via the "shebang" comment.
>
> -- Dirk
> -------------------------------
> [email protected] mailing list
> If you want to unsubscribe or look at the archives, go to
> https://tug.org/mailman/listinfo/tex-music
-------------------------------
[email protected] mailing list
If you want to unsubscribe or look at the archives, go to
https://tug.org/mailman/listinfo/tex-music