Re: [LAU] Clipping as a 64-bit issue?

From: Ken Restivo <ken@email-addr-hidden>
Date: Sun May 27 2007 - 07:12:21 EEST

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, May 26, 2007 at 05:14:21PM -0400, Dave Robillard wrote:
> On Sat, 2007-05-26 at 12:25 -0700, Ken Restivo wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I've noticed the same strange behaviour in two completely different peices of software/hardware, and have to wonder if it's a integer-size issue.
> >
> > First of all, the AZR3 LV2 softsynth clips on my 64-bit machine. Really bad. Lars looked at it, and gave me the action item to go digging through the source and test the sound at various points in the processing chain, to try to isolate it further. Which I am still going to do.
>
> The horrible noise on 64-bit from AZR3 (for me) comes from the key
> click. Turn the click control all the way down and it works fine.
>

I just discovered this a few hours ago. And came up with a hack to fix it... AZR3 now works on my 64-bit machine, including the click!

I sent the patch below to larsl but he appears to be AFK right now.

Still not sure what's up with the Audiophile.

- -ken
- -------------

Index: plugins/azr3/voice_classes.cpp
===================================================================
RCS file: /sources/ll-plugins/ll-plugins/plugins/azr3/voice_classes.cpp,v
retrieving revision 1.7
diff -u -b -B -w -p -u -b -B -w -p -r1.7 voice_classes.cpp
- --- plugins/azr3/voice_classes.cpp 16 May 2007 10:10:05 -0000 1.7
+++ plugins/azr3/voice_classes.cpp 27 May 2007 00:50:23 -0000
@@ -229,7 +229,7 @@ float voice::clock()
                                 static unsigned long randSeed = 22222;
                                 float rand=0;
                                 randSeed = (randSeed * 196314165) + 907633515;
- - rand=(float)randSeed/0xffffffff;
+ rand=(float)randSeed/0xfffffffffffffff;
                                 clicklp.clock(click*rand*.3f);
                                 noise=clicklp.bp()*clickvol*.7f;
                                 output+=noise;
@@ -286,7 +286,7 @@ float voice::clock()
                 if(mattack>1)
                         mattack=1;
                 randSeed = (randSeed * 196314165) + 907633515;
- - rand=(float)randSeed/0xffffffff;
+ rand=(float)randSeed/0xfffffffffffffff;
                 clicklp.clock(click*rand*.3f);
                 noise=clicklp.bp();
                 noise*=clickvol;

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGWQUle8HF+6xeOIcRAhb6AKDc1UlTxbvWVrq8K0unY5GZGA9gJACeLkXP
lWRe8efQIDN52dFCJu/JBi4=
=mwFx
-----END PGP SIGNATURE-----
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user
Received on Sun May 27 08:15:02 2007

This archive was generated by hypermail 2.1.8 : Sun May 27 2007 - 08:15:02 EEST