[LAU] Need some programming help.

Will Godfrey willgodfrey at musically.me.uk
Sun Mar 2 23:18:30 UTC 2014


On Fri, 22 Nov 2013 01:33:08 +0100
Tito Latini <tito.01beta at gmail.com> wrote:

> On Thu, Nov 21, 2013 at 07:22:31PM +0000, Will Godfrey wrote:
> > Thank you both for your suggestions. I tried that bit of code, but as I rather
> > expected it behaved perfectly.
> > 
> > The problem seems to be that, for some reason FLTKs 'step' command is being
> > ignored. Not only is it failing to round the values but it is also failing to
> > truncate them. I even tried replacing the calculated value with a simple
> > integer - loads of trailing zeros after the decimal point.
> > 
> > Yoshi is derived from Zyn, and the section of code that sends values to FLTK
> > for display is identical, yet Zyn doesn't show this problem. I can only guess
> > there is some difference in the way yoshi links to FLTK but can't imagine what
> > it is! 
> 
> I'm noticing a possible bug generator in a diff between
> `ZynAddSubFX-2.4.3' and `yoshimi-1.1.0':
> 
> diff -u ZynAddSubFX-2.4.3/src/UI/ADnoteUI.fl \
>      yoshimi-1.1.0/src/UI/ADnoteUI.fl | grep lrintf
> +          callback {pars->VoicePar[nvoice].PVolume = lrintf(o->value());}
> +          callback {pars->VoicePar[nvoice].Presonance = lrintf(o->value());}
> [...]
> 
> !! | wc -l
> 72
> 
> The method `value' of Fl_Valuator returns a "double" and `lrintf'
> requires "float".
> 
> The implementation of `lrintf' depends on the machine (for example, in
> glibc-2.15, it uses the instruction CVTSD2SI for x86_64).
> 
> You could try `lrint' or the follow trick:

Sorry to be so incredibly slow responding... I'm now in the fortunate? position
of being able to devote a lot more time to bug hunting.

I tried your suggestion but unfortunately it made no difference.

What is even stranger is that if I compile and run the synth on an old
version of debian there is no problem. However *exactly* the same image run on
the same machine but with debian upgraded shows the fault.

A possibly significant difference is the change from FLTK V1.1 to V1.3 but
looking on their website I can find nothing that would give a clue.

-- 
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.


More information about the Linux-audio-user mailing list