Quantcast

Mixer (was Re: FW: Dither)

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Mixer (was Re: FW: Dither)

Martyn Shaw
OK, so I've had a read though the Mixer (Mix.cpp) code and can see a number  
of problems, including 'Mihail's dither issue'.  I don't want to cause any  
controversy here and consider these details rather than show-stoppers.  I  just
wish to agree a way forward so that I can implement it.

I propose  that during mixing we
Convert anything (any audio track,  no matter what it's format) to float (I
believe that is the most accurate  representation?)
Apply the envelope and track gain (which  is a float(?) and may not match up
with the format of the input/output, but as a  float we retain all/most of the
information)
Mix the  tracks together in the float format, not applying any  clipping.
Convert to whatever the output format should be,  including any clipping (I
think we should dither then convert, including  clipping, but I'm not sure
here.  Opinions?  Clip, dither, clip,  convert?)

My argument for this is:
Clipping is  currently applied at every stage (in MixBuffers), which I
believe is  wrong.  MM notes this for float (li 335 of Mix.cpp)
Consider this example:
Generate a  square wave, freq 2Hz, amp 0.8, length  1s
Create a new  track
Generate a sine wave, freq  2Hz, amp 0.8, length 1s
Create a  new track
Generate a sine wave,  freq 2Hz, amp 0.8, length 1s
Effect -> reverse (the last 3 operations should make a track that  
(approximately?) cancels out the previous one)
Now, if we  mix these together, the last two should cancel each other out,
right?  so...
Select all of  them
Tracks -> Mix and  Render
What do you get?  The  first mix (square and sine) is clipped internally, the
second one does not  involve clipping and the result is not what you might
expect.  That can't  be right.

Also, if my understanding of dither is correct (and  it's a number of years
since I had a PhD student looking at this) you should  keep the best
information you have about a sample until the last moment, and  then apply it - this way
you don't throw anything out until you really have  to.

So am I on the right track?

TTFN
Martyn

In a message  dated 06/09/2006 00:09:05 GMT Daylight Time,
[hidden email]  writes:
Here ya go Martyn...


------ Forwarded Message
From:  Mihail Zenkov <[hidden email]>
Reply-To:  "[hidden email]"
<[hidden email]>
Date:  Sat, 24 Jun 2006 09:41:50 +0300
To:  "[hidden email]"
<[hidden email]>
Subject:  Re: [Audacity-devel] Dither

> > Mixing should be before  dither.
> >
> > //Right
> > float out;
> >  int iout;
> > float track[];
> > out = track[0]*gain[0] +  track[0]*gain[0] + etc;
> > iout = out + dither;
>  >  
> I think it should be obvious to every Audacity  developer how it is done
> in principle.
Maybe, but why current  audacity do it vice-versa? ;)

>The problem is to find the problem in  the current Audacity
> code and devise a patch. You are welcome to do  this. Otherwise I may
> have a look at it later next week, but I can't  deliver any promises
> since there's lots of things to do these days.  Remember this is an open
> source project, so finding a bug is good, but  fixing it is better.... ;)
OK. I fix export PCM (no mp3 and other). I test it  only with float.
Using Tomcat but need to do more? Need to support web  services, security?
Get stuff done quickly with pre-integrated technology to  make your job
easier
Download IBM WebSphere Application Server v.1.0.1  based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel

------  End of Forwarded  Message



-------------------------------------------------------------------------
Using  Tomcat but need to do more? Need to support web services, security?
Get stuff  done quickly with pre-integrated technology to make your job easier
Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Richard Ash (audacity-help)
[hidden email] wrote:
> OK, so I've had a read though the Mixer (Mix.cpp) code and can see a
> number of problems, including 'Mihail's dither issue'.  I don't want to
> cause any controversy here and consider these details rather than
> show-stoppers.  I just
> wish to agree a way forward so that I can implement it.
>
> I propose  that during mixing we
> Convert anything (any audio track,  no matter what it's format) to float
> (I believe that is the most accurate  representation?)
IEEE 754 floats have 23 bits of mantissa, so conceivably converting 24bit
PCM to float could loose one bit of precision in high amplitude samples
(signals above -3dB FS in 24bit PCM contains 24 bits on information, in
the float only 23 bits can be stored. Once we get below -3dB the top bit
of the 24bit PCM is off, the float can move the decimal point down one
place and all the 23 bits of information (one less because we known the
top bit is off) in the PCM value can be stored).
  http://en.wikipedia.org/wiki/IEEE_754

> Apply the envelope and track gain (which  is a float(?) and may not match
> up with the format of the input/output, but as a  float we retain all/most
> of the information)
Again, seems valid - we don't get any of the range issues that PCM systems
have (I've used production systems that clip in very odd ways due to PCM
range limits within the mixer). Using float pretty much garuntees that we
don't get clipping or information loss in the mixer.

> Mix the  tracks together in the float format, not applying any  clipping.
Certainly we shouldn't clip in the mixing process, for exactly the reason
you describe below. There is no good reason to do the processing, so it
might even speed up a touch.

> Convert to whatever the output format should be,  including any clipping
> (I
> think we should dither then convert, including  clipping, but I'm not sure
> here.  Opinions?  Clip, dither, clip,  convert?)
Clipping is needed because we can only save floating point values in the
range -1.0 to 1.0 to file, or the equivalent as PCM. Essentially clipping
here is a fix to avoid crashing audacity with an out of range error, but
not (I think) something that would ever be desireable in a finished
recording. Therfore we dither first (to get the exact sample values we
want write to file), and then clip. Whilst we are there, people keep
asking about clipping indicators for the mix process, so it's worth
bearing in mind we might want a hook in here in the future.

Finally, another thought on dither. The code we use is taken from Steve
Harris's libgdither
  http://plugin.org.uk/libgdither/
http://www.music.columbia.edu/pipermail/linux-audio-announce/2005-July/000621.html

but currently our copy is out of date. I would suggest we put the contents
of the tarball in the libsrc directory, and then link to it from there.
This makes it easy to keep up with Steve's releases, and if we change
anything pass a patch back upstream.

> Also, if my understanding of dither is correct (and  it's a number of
> years
> since I had a PhD student looking at this) you should  keep the best
> information you have about a sample until the last moment, and  then apply
> it - this way
> you don't throw anything out until you really have  to.
Exactly.

Richard


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
Richard Ash schrieb:
> IEEE 754 floats have 23 bits of mantissa, so conceivably converting 24bit
> PCM to float could loose one bit of precision in high amplitude samples
>  
IIRC there was a discussion on the Portaudio list about this a long time
ago with a lot of technical nitpicking, but the end result was that
converting 24bit to float and back does NOT change the result, despite
the fact that the mantissa is one bit shorter.

> Clipping is needed because we can only save floating point values in the
> range -1.0 to 1.0 to file, or the equivalent as PCM. Essentially clipping
> here is a fix to avoid crashing audacity with an out of range error, but
> not (I think) something that would ever be desireable in a finished
> recording. Therfore we dither first (to get the exact sample values we
> want write to file), and then clip. Whilst we are there, people keep
> asking about clipping indicators for the mix process, so it's worth
> bearing in mind we might want a hook in here in the future.
>  
Now, C being a language where overflows don't throw exceptions, not
clipping does not really crash Audacity. But I agree we have to clip
before making the data persistent or outputting it.

> Finally, another thought on dither. The code we use is taken from Steve
> Harris's libgdither
>   http://plugin.org.uk/libgdither/
> http://www.music.columbia.edu/pipermail/linux-audio-announce/2005-July/000621.html
>
> but currently our copy is out of date. I would suggest we put the contents
> of the tarball in the libsrc directory, and then link to it from there.
>  

We cannot just copy the code, because we don't use libgdither directly,
but only use part of Steve's algorithms in Dither.cpp. The code, though,
is completely different. I know that as the "official maintainer" of the
dither code I'd probably in charge to do this...


Markus


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Richard Ash (audacity-help)
Markus Meyer wrote:
> Richard Ash schrieb:
> IIRC there was a discussion on the Portaudio list about this a long time
> ago with a lot of technical nitpicking, but the end result was that
> converting 24bit to float and back does NOT change the result, despite
> the fact that the mantissa is one bit shorter.
Which was really what I was hoping would be the case. Either way, we have
a situation where any audio we have inside audacity can be represented as
a 32-bit float.

>> Clipping is needed because we can only save floating point values in the
>> range -1.0 to 1.0 to file, or the equivalent as PCM. Essentially
>> clipping
>> here is a fix to avoid crashing audacity with an out of range error, but
>> not (I think) something that would ever be desireable in a finished
>> recording. Therfore we dither first (to get the exact sample values we
>> want write to file), and then clip. Whilst we are there, people keep
>> asking about clipping indicators for the mix process, so it's worth
>> bearing in mind we might want a hook in here in the future.
>>
> Now, C being a language where overflows don't throw exceptions, not
> clipping does not really crash Audacity. But I agree we have to clip
> before making the data persistent or outputting it.
Hmm, I wonder what libsndfile would do, asked to write an overscale value
to a PCM or encoded file type. Anyhow, it's necessary for safety, but not
really a "desired" behaviour, because if you clip you usually end up
dumping the export and doing it again so it doesn't clip.

>> Finally, another thought on dither. The code we use is taken from Steve
>> Harris's libgdither
> We cannot just copy the code, because we don't use libgdither directly,
> but only use part of Steve's algorithms in Dither.cpp. The code, though,
> is completely different. I know that as the "official maintainer" of the
> dither code I'd probably in charge to do this...
Put another way, why don't we use the library? It seems a bit like
reinventing the wheel, unless there is a good reason not to use his
implementation.

Richard


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
Richard Ash (audacity-help) schrieb:
> Put another way, why don't we use the library? It seems a bit like
> reinventing the wheel, unless there is a good reason not to use his
> implementation.
>  
IIRC, the library wasn't there when I wrote the Dither code. Also, the
dither code in Audacity is highly optimized for the way Audacity
represents audio data internally.


Markus


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Guys, thanks for the input; I appear to be  heading in the right direction.  
I will continue to work on a  minimally-invasive fix and am starting to
understand some of the unfinished work  that has gone on here - I'll do my best not
to destroy it.  I think I can  see what's going on and will post a fix soon
(well, soon for my slow pace,  perhaps!)

Is the shaped dithering really broken (line 70 of  SampleFormat.cpp)?

TTFN
Martyn

PS I have no intention of  fiddling with the dither code itself - I could
never get my head around code  written in macros - too many sub-plots (perhaps
that's why I don't read  novels).

In a message dated 11/09/2006 13:17:58 GMT Daylight Time,  [hidden email]
writes:
Richard Ash (audacity-help) schrieb:
> Put  another way, why don't we use the library? It seems a bit like
>  reinventing the wheel, unless there is a good reason not to use his
>  implementation.
>  
IIRC, the library wasn't there when I  wrote the Dither code. Also, the
dither code in Audacity is highly optimized  for the way Audacity
represents audio data  internally.


Markus


-------------------------------------------------------------------------
Using  Tomcat but need to do more? Need to support web services, security?
Get stuff  done quickly with pre-integrated technology to make your job easier
Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
[hidden email] schrieb:
> Is the shaped dithering really broken (line 70 of  SampleFormat.cpp)?
>  
Yes! That's also the reason triangle dither is default for high quality
dithering. Actually, I think the shaped dithering is the one that should
be fixed (by reading and understanding libgdither). The others just work
fine.


Markus


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Hi
 
I have fixed the mixer and tested it as much as I could think of.   Mihail's
dither problem does not happen any more and what you would expect  does.  The
strange internal clipping no longer happens and the test case I  put forward
before now does what I expect.
 
I tested using 'Mix and Render' and by exporting as wav (2 waveforms into a  
mono file).  I tested the MixSameRate and MixVariableRates functions (the  
extra silence added to the end of a track still happens, but it always  did).
 
However I don't want to break anything and would like some expert opinion  on
if it's right, hence I attach a patch, rather than committing it.
 
Opinions?
 
Martyn
 
In a message dated 12/09/2006 01:23:34 GMT Daylight Time,  [hidden email]
writes:
Guys, thanks for the input; I appear to be   heading in the right direction.  
I will continue to work on a   minimally-invasive fix and am starting to
understand some of the unfinished  work  that has gone on here - I'll do my
best not
to destroy it.   I think I can  see what's going on and will post a fix soon
(well, soon  for my slow pace,  perhaps!)

Is the shaped dithering really broken  (line 70 of  SampleFormat.cpp)?

TTFN
Martyn

PS I have no  intention of  fiddling with the dither code itself - I could
never get  my head around code  written in macros - too many sub-plots
(perhaps  
that's why I don't read  novels).

In a message dated 11/09/2006  13:17:58 GMT Daylight Time,  [hidden email]
writes:
Richard Ash  (audacity-help) schrieb:
> Put  another way, why don't we use the  library? It seems a bit like
>  reinventing the wheel, unless there  is a good reason not to use his
>   implementation.
>  
IIRC, the library wasn't there when  I  wrote the Dither code. Also, the
dither code in Audacity is highly  optimized  for the way Audacity
represents audio data   internally.


Markus


-------------------------------------------------------------------------
Using   Tomcat but need to do more? Need to support web services, security?
Get  stuff  done quickly with pre-integrated technology to make your job  
easier
Download  IBM WebSphere Application Server v.1.0.1 based on  Apache   Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel   mailing   list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel   


-------------------------------------------------------------------------
Using  Tomcat but need to do more? Need to support web services, security?
Get stuff  done quickly with pre-integrated technology to make your job easier
Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel

Mix.patch (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Hi Markus
 
Had a (quick) look at libgdither but couldn't make a lot of sense of it -  it
would take me a little longer (and on paper, not screen).
 
Had a look at Dither.cpp (on paper) and can mostly see what you (?)  are up
to with those dammed macros.
 
Had a look at
_http://www.soundslogical.com/support/resample/documentation/english/documentparts/resamplehelp-29.html_
(http://www.soundslogical.com/support/resample/documentation/english/documentparts/resamplehelp-29.html)  and  
would welcome your opinion of it - I don't know if this is a reliable source,  
but it seems to use all the right terms.
 
If it is reliable,
_http://www.soundslogical.com/support/resample/documentation/english/documentparts/resamplehelp-29.html#P535_42341_
(http://www.soundslogical.com/support/resample/documentation/english/documentparts/resamplehelp-29.
html#P535_42341)  seems  to say that we are not doing triangular dithering
correctly, even  though what we are doing is better than rectangular.
 
Do you want to discuss this further, or shall I just continue alone?   Do you
know any better internet sources (my books have let me down on this one,  but
I could probably borrow some more).
 
TTFN
Martyn
 
In a message dated 12/09/2006 07:58:57 GMT Daylight Time, [hidden email]  
writes:
[hidden email] schrieb:
> Is the shaped dithering really  broken (line 70 of  SampleFormat.cpp)?
>  
Yes! That's  also the reason triangle dither is default for high quality
dithering.  Actually, I think the shaped dithering is the one that should
be fixed (by  reading and understanding libgdither). The others just  work
fine.


Markus


-------------------------------------------------------------------------
Using  Tomcat but need to do more? Need to support web services, security?
Get stuff  done quickly with pre-integrated technology to make your job easier
Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
[hidden email] schrieb:
> Do you want to discuss this further, or shall I just continue alone?   Do you
> know any better internet sources (my books have let me down on this one,  but
> I could probably borrow some more).
>  
Martyn,

thanks for putting all the work into this. Naturally I'd love to discuss
this, but I'm afraid I don't have much time at the moment. Also, I
frankly have to say that I don't really have a clue about the math
involved, either :-/ So if you are interested, feel free to fix
Dither.cpp yourself. It should only be a matter of changing a few lines
inside the TriangleDither() and ShapedDither() functions (no need to
change the macros at all). If not, just drop me a note, then I'll add it
to my todo list here, and I'll do it as soon as possible.


Markus


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Markus
 
No worries, the maths of dither was always impenetrable to me - the proof has something to do with the FFT of a pdf???
 
Anyway, what makes you say the shaped dithering is broken?  I have had a little look and listen to it's functionality and can't see the problem.  I don't currently have access to the Lipshitz paper so can't check the noise shaping curves exactly but they look right to me against what I can find on the net.
 
Triangular dither fix has a trivial solution, like you say, macros look great to me (but still hard to read!).
 
Martyn
 
In a message dated 14/09/2006 07:26:41 GMT Daylight Time, [hidden email] writes:
[hidden email] schrieb:
> Do you want to discuss this further, or shall I just continue alone?   Do you
> know any better internet sources (my books have let me down on this one,  but
> I could probably borrow some more).
>  
Martyn,

thanks for putting all the work into this. Naturally I'd love to discuss
this, but I'm afraid I don't have much time at the moment. Also, I
frankly have to say that I don't really have a clue about the math
involved, either :-/ So if you are interested, feel free to fix
Dither.cpp yourself. It should only be a matter of changing a few lines
inside the TriangleDither() and ShapedDither() functions (no need to
change the macros at all). If not, just drop me a note, then I'll add it
to my todo list here, and I'll do it as soon as possible.


Markus


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
Martyn,

[hidden email] schrieb:
> Anyway, what makes you say the shaped dithering is broken?  I have had
> a little look and listen to it's functionality and can't see the
> problem.  I don't currently have access to the Lipshitz paper so can't
> check the noise shaping curves exactly but they look right to me
> against what I can find on the net.
Steve Harris, from whom I borrowed the dither algorithms in the first
place, said that:

http://article.gmane.org/gmane.comp.audio.audacity.devel/8758/
http://article.gmane.org/gmane.comp.audio.audacity.devel/8760/


Markus


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Committed this after getting no comments.  Did I leave any memory leaks?
 
I am on top of the shaped dither possible incorrectness also, finalising details.
 
Martyn
PS I did send this last night, but only to myself!
 
In a message dated 13/09/2006 00:03:47 GMT Daylight Time, MartynShaw writes:
Hi
 
I have fixed the mixer and tested it as much as I could think of.  Mihail's dither problem does not happen any more and what you would expect does.  The strange internal clipping no longer happens and the test case I put forward before now does what I expect.
 
I tested using 'Mix and Render' and by exporting as wav (2 waveforms into a mono file).  I tested the MixSameRate and MixVariableRates functions (the extra silence added to the end of a track still happens, but it always did).
 
However I don't want to break anything and would like some expert opinion on if it's right, hence I attach a patch, rather than committing it.
 
Opinions?
 
Martyn
 
In a message dated 12/09/2006 01:23:34 GMT Daylight Time, [hidden email] writes:
Guys, thanks for the input; I appear to be  heading in the right direction. 
I will continue to work on a  minimally-invasive fix and am starting to
understand some of the unfinished work  that has gone on here - I'll do my best not
to destroy it.  I think I can  see what's going on and will post a fix soon
(well, soon for my slow pace,  perhaps!)

Is the shaped dithering really broken (line 70 of  SampleFormat.cpp)?

TTFN
Martyn

PS I have no intention of  fiddling with the dither code itself - I could
never get my head around code  written in macros - too many sub-plots (perhaps
that's why I don't read  novels).

In a message dated 11/09/2006 13:17:58 GMT Daylight Time,  [hidden email]
writes:
Richard Ash (audacity-help) schrieb:
> Put  another way, why don't we use the library? It seems a bit like
>  reinventing the wheel, unless there is a good reason not to use his
>  implementation.
>  
IIRC, the library wasn't there when I  wrote the Dither code. Also, the
dither code in Audacity is highly optimized  for the way Audacity
represents audio data  internally.


Markus


-------------------------------------------------------------------------
Using  Tomcat but need to do more? Need to support web services, security?
Get stuff  done quickly with pre-integrated technology to make your job easier
Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel  


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Hi
 
I just committed a fix to Dither.cpp which I believe improves on the  
previous version, and follows the literature, for both the triangular and shaped  
routines.  The noise floors are better than previously, see
_http://members.aol.com/martynshaw/triangle_old_and_new.gif_
(http://members.aol.com/martynshaw/triangle_old_and_new.gif)
_http://members.aol.com/martynshaw/shaped_old_and_new.gif_
(http://members.aol.com/martynshaw/shaped_old_and_new.gif)
which were done by setting the Default Sample Format to 16-bit, dither to  
shaped or triangular, generating a sine wave, amplitude 0.00002, length 0.5s,  
Amplify twice and then Plot spectrum. (Incidentally, Amplify does not display  
the gain correctly, will fix that later.)
 
I have also generated an audio file by similar methods which to my ears  says
that shaped dither is superior so I think it should become the default for  
'high quality'; what does anybody think? (shaped dither comes first)
_http://members.aol.com/martynshaw/shaped_triangular.wav_
(http://members.aol.com/martynshaw/shaped_triangular.wav)
 
I have looked at libgdither and it appears that up to version 0.5 it does  
(almost) what I have done here and follows the literature.  Version 0.6  
corrupts the code; I tried modifying Audacity code to follow it and the noise is  
worse at most frequencies than the new triangular one.
 
TTFN
Martyn
 
In a message dated 15/09/2006 07:40:00 GMT Daylight Time, [hidden email]  
writes:
Martyn,

[hidden email] schrieb:
> Anyway, what makes  you say the shaped dithering is broken?  I have had
> a little look  and listen to it's functionality and can't see the
> problem.  I  don't currently have access to the Lipshitz paper so can't
> check the  noise shaping curves exactly but they look right to me
> against what I  can find on the net.
Steve Harris, from whom I borrowed the dither algorithms  in the first
place, said  that:

http://article.gmane.org/gmane.comp.audio.audacity.devel/8758/
http://article.gmane.org/gmane.comp.audio.audacity.devel/8760/


Markus


-------------------------------------------------------------------------
Using  Tomcat but need to do more? Need to support web services, security?
Get stuff  done quickly with pre-integrated technology to make your job easier
Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
Martyn,

thanks! As I said I'm not really able to verify if it's better now than
before, but I'd definitely vote for making shaped dither the default for
"high-quality dither" if it now works correctly.


Markus

[hidden email] schrieb:

> Hi
>  
> I just committed a fix to Dither.cpp which I believe improves on the  
> previous version, and follows the literature, for both the triangular and shaped  
> routines.  The noise floors are better than previously, see
> _http://members.aol.com/martynshaw/triangle_old_and_new.gif_
> (http://members.aol.com/martynshaw/triangle_old_and_new.gif)
> _http://members.aol.com/martynshaw/shaped_old_and_new.gif_
> (http://members.aol.com/martynshaw/shaped_old_and_new.gif)
> which were done by setting the Default Sample Format to 16-bit, dither to  
> shaped or triangular, generating a sine wave, amplitude 0.00002, length 0.5s,  
> Amplify twice and then Plot spectrum. (Incidentally, Amplify does not display  
> the gain correctly, will fix that later.)
>  
> I have also generated an audio file by similar methods which to my ears  says
> that shaped dither is superior so I think it should become the default for  
> 'high quality'; what does anybody think? (shaped dither comes first)
> _http://members.aol.com/martynshaw/shaped_triangular.wav_
> (http://members.aol.com/martynshaw/shaped_triangular.wav)
>  
> I have looked at libgdither and it appears that up to version 0.5 it does  
> (almost) what I have done here and follows the literature.  Version 0.6  
> corrupts the code; I tried modifying Audacity code to follow it and the noise is  
> worse at most frequencies than the new triangular one.
>  
> TTFN
> Martyn
>  
> In a message dated 15/09/2006 07:40:00 GMT Daylight Time, [hidden email]  
> writes:
> Martyn,
>
> [hidden email] schrieb:
>  
>> Anyway, what makes  you say the shaped dithering is broken?  I have had
>> a little look  and listen to it's functionality and can't see the
>> problem.  I  don't currently have access to the Lipshitz paper so can't
>> check the  noise shaping curves exactly but they look right to me
>> against what I  can find on the net.
>>    
> Steve Harris, from whom I borrowed the dither algorithms  in the first
> place, said  that:
>
> http://article.gmane.org/gmane.comp.audio.audacity.devel/8758/
> http://article.gmane.org/gmane.comp.audio.audacity.devel/8760/
>
>
> Markus
>
>
> -------------------------------------------------------------------------
> Using  Tomcat but need to do more? Need to support web services, security?
> Get stuff  done quickly with pre-integrated technology to make your job easier
> Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Audacity-devel  mailing  list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>  
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>
>  


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Any more votes or verifications anybody?
 
In a message dated 20/09/2006 06:52:34 GMT Daylight Time, [hidden email] writes:
Martyn,

thanks! As I said I'm not really able to verify if it's better now than
before, but I'd definitely vote for making shaped dither the default for
"high-quality dither" if it now works correctly.


Markus

[hidden email] schrieb:

> Hi

> I just committed a fix to Dither.cpp which I believe improves on the 
> previous version, and follows the literature, for both the triangular and shaped 
> routines.  The noise floors are better than previously, see
> _http://members.aol.com/martynshaw/triangle_old_and_new.gif_
> (http://members.aol.com/martynshaw/triangle_old_and_new.gif)
> _http://members.aol.com/martynshaw/shaped_old_and_new.gif_
> (http://members.aol.com/martynshaw/shaped_old_and_new.gif)
> which were done by setting the Default Sample Format to 16-bit, dither to 
> shaped or triangular, generating a sine wave, amplitude 0.00002, length 0.5s, 
> Amplify twice and then Plot spectrum. (Incidentally, Amplify does not display 
> the gain correctly, will fix that later.)

> I have also generated an audio file by similar methods which to my ears  says
> that shaped dither is superior so I think it should become the default for 
> 'high quality'; what does anybody think? (shaped dither comes first)
> _http://members.aol.com/martynshaw/shaped_triangular.wav_
> (http://members.aol.com/martynshaw/shaped_triangular.wav)

> I have looked at libgdither and it appears that up to version 0.5 it does 
> (almost) what I have done here and follows the literature.  Version 0.6 
> corrupts the code; I tried modifying Audacity code to follow it and the noise is 
> worse at most frequencies than the new triangular one.

> TTFN
> Martyn

> In a message dated 15/09/2006 07:40:00 GMT Daylight Time, [hidden email] 
> writes:
> Martyn,
>
> [hidden email] schrieb:
>  
>> Anyway, what makes  you say the shaped dithering is broken?  I have had
>> a little look  and listen to it's functionality and can't see the
>> problem.  I  don't currently have access to the Lipshitz paper so can't
>> check the  noise shaping curves exactly but they look right to me
>> against what I  can find on the net.
>>    
> Steve Harris, from whom I borrowed the dither algorithms  in the first
> place, said  that:
>
> http://article.gmane.org/gmane.comp.audio.audacity.devel/8758/
> http://article.gmane.org/gmane.comp.audio.audacity.devel/8760/
>
>
> Markus
>
>
> -------------------------------------------------------------------------
> Using  Tomcat but need to do more? Need to support web services, security?
> Get stuff  done quickly with pre-integrated technology to make your job easier
> Download  IBM WebSphere Application Server v.1.0.1 based on Apache  Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Audacity-devel  mailing  list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel

>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Audacity-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/audacity-devel
>
>  


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Richard Ash (audacity-help)
>  As I said I'm not really able to verify if it's  better now than
> before, but I'd definitely vote for making shaped dither  the default for
> "high-quality dither" if it now works  correctly.

So high quality dither is what is used when doing non-realtime mixing for
quick mix / file export, and the other one is used for playback?
In that case I see no reason not to default to shaped dither when
exporting, it shoudln't cost much in CPU load, and is better than the
alternatives in terms of signal to noise ratio.

Can we close off bug 200 now?
http://limpet.net/audacity/bugzilla/show_bug.cgi?id=200

Richard

> [hidden email] schrieb:
>>  Hi
>>
>> I just committed a fix to Dither.cpp which I believe  improves on the
>> previous version, and follows the literature,  for both the triangular
>> and
> shaped
>> routines.  The noise  floors are better than previously, see
>>  _http://members.aol.com/martynshaw/triangle_old_and_new.gif_
>>  (http://members.aol.com/martynshaw/triangle_old_and_new.gif)
>>  _http://members.aol.com/martynshaw/shaped_old_and_new.gif_
>>  (http://members.aol.com/martynshaw/shaped_old_and_new.gif)
>> which were  done by setting the Default Sample Format to 16-bit, dither
>> to
>>  shaped or triangular, generating a sine wave, amplitude 0.00002, length
> 0.5s,
>> Amplify twice and then Plot spectrum. (Incidentally,  Amplify does not
> display
>> the gain correctly, will fix that  later.)
>>
>> I have also generated an audio file by similar  methods which to my ears
> says
>> that shaped dither is superior so  I think it should become the default
>> for
>
>> 'high quality'; what  does anybody think? (shaped dither comes first)
>>  _http://members.aol.com/martynshaw/shaped_triangular.wav_
>>  (http://members.aol.com/martynshaw/shaped_triangular.wav)
>>
>> I have looked at libgdither and it appears that up to version 0.5 it
>> does
>> (almost) what I have done here and follows the  literature.  Version 0.6
>> corrupts the code; I tried  modifying Audacity code to follow it and the
> noise is
>> worse at  most frequencies than the new triangular one.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Martyn Shaw
In reply to this post by Martyn Shaw
Richard

I never looked at the real-time  code, I'm not even sure where it is, and it
was also reported as 'broken' if I  recall correctly.  I don't have the sound
card/headphone amp/quiet  environment to try it!  The 'High-quality' option is
certainly used for mix  / export and that's what I looked at.

That's 2 votes now so can somebody  change the default option for  
Prefs->Quality->Conversion->High-quality->Dither to Shaped  please?  I don't know where
to look for it.

Bug 200 I have read  through, read the thread on audacity-devel, tried the
examples and can't see the  problem reported by Matt at the end of the bug
report.  I will think more  about this and find a solution; I think I know where my
remaining query lies -  clipping after dither.  I'm surprised that this never
got resolved back in  Nov 04!

TTFN
Martyn

In a message dated 21/09/2006 08:20:52 GMT  Daylight Time,
[hidden email] writes:
>  As I said I'm not  really able to verify if it's  better now than
> before, but I'd  definitely vote for making shaped dither  the default for
>  "high-quality dither" if it now works  correctly.

So high quality  dither is what is used when doing non-realtime mixing for
quick mix / file  export, and the other one is used for playback?
In that case I see no reason  not to default to shaped dither when
exporting, it shoudln't cost much in CPU  load, and is better than the
alternatives in terms of signal to noise  ratio.

Can we close off bug 200  now?
http://limpet.net/audacity/bugzilla/show_bug.cgi?id=200

Richard

>  [hidden email] schrieb:
>>  Hi
>>
>> I just  committed a fix to Dither.cpp which I believe  improves on the
>>  previous version, and follows the literature,  for both the  triangular
>> and
> shaped
>> routines.  The  noise  floors are better than previously, see
>>   _http://members.aol.com/martynshaw/triangle_old_and_new.gif_
>>   (http://members.aol.com/martynshaw/triangle_old_and_new.gif)
>>   _http://members.aol.com/martynshaw/shaped_old_and_new.gif_
>>   (http://members.aol.com/martynshaw/shaped_old_and_new.gif)
>> which  were  done by setting the Default Sample Format to 16-bit,  dither
>> to
>>  shaped or triangular, generating a sine  wave, amplitude 0.00002, length
> 0.5s,
>> Amplify twice and then  Plot spectrum. (Incidentally,  Amplify does not
> display
>>  the gain correctly, will fix that  later.)
>>
>> I have  also generated an audio file by similar  methods which to my ears
>  says
>> that shaped dither is superior so  I think it should  become the default
>> for
>
>> 'high quality';  what  does anybody think? (shaped dither comes first)
>>   _http://members.aol.com/martynshaw/shaped_triangular.wav_
>>   (http://members.aol.com/martynshaw/shaped_triangular.wav)
>>
>>  I have looked at libgdither and it appears that up to version 0.5 it
>>  does
>> (almost) what I have done here and follows the   literature.  Version 0.6
>> corrupts the code; I tried   modifying Audacity code to follow it and the
> noise is
>> worse  at  most frequencies than the new triangular  one.

-------------------------------------------------------------------------
Take  Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay  panel and you'll get the chance to share your
opinions on IT & business  topics through brief surveys -- and earn  cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel   


Richard
 
I never looked at the real-time code, I'm not even sure where it is, and it  
was also reported as 'broken' if I recall correctly.  I don't have the  sound
card/headphone amp/quiet environment to try it!  The  'High-quality' option is
certainly used for mix / export and that's what I  looked at.
 
That's 2 votes now so can somebody change the default option for  
Prefs->Quality->Conversion->High-quality->Dither to Shaped  please?  I don't know where
to look for it.
 
Bug 200 I have read through, read the thread on audacity-devel, tried the  
examples and can't see the problem reported by Matt at the end of the bug  
report.  I will think more about this and find a solution; I think I know  where my
remaining query lies - clipping after dither.  I'm surprised that  this never
got resolved back in Nov 04!
 
TTFN
Martyn
 
In a message dated 21/09/2006 08:20:52 GMT Daylight Time,  
[hidden email] writes:
>  As I said I'm not really able to  verify if it's  better now than
> before, but I'd definitely vote for  making shaped dither  the default for
> "high-quality dither" if it  now works  correctly.

So high quality dither is what is used when  doing non-realtime mixing for
quick mix / file export, and the other one is  used for playback?
In that case I see no reason not to default to shaped  dither when
exporting, it shoudln't cost much in CPU load, and is better than  the
alternatives in terms of signal to noise ratio.

Can we close off  bug 200  now?
http://limpet.net/audacity/bugzilla/show_bug.cgi?id=200

Richard

>  [hidden email] schrieb:
>>  Hi
>>
>> I just  committed a fix to Dither.cpp which I believe  improves on the
>>  previous version, and follows the literature,  for both the  triangular
>> and
> shaped
>> routines.  The  noise  floors are better than previously, see
>>   _http://members.aol.com/martynshaw/triangle_old_and_new.gif_
>>   (http://members.aol.com/martynshaw/triangle_old_and_new.gif)
>>   _http://members.aol.com/martynshaw/shaped_old_and_new.gif_
>>   (http://members.aol.com/martynshaw/shaped_old_and_new.gif)
>> which  were  done by setting the Default Sample Format to 16-bit,  dither
>> to
>>  shaped or triangular, generating a sine  wave, amplitude 0.00002, length
> 0.5s,
>> Amplify twice and then  Plot spectrum. (Incidentally,  Amplify does not
> display
>>  the gain correctly, will fix that  later.)
>>
>> I have  also generated an audio file by similar  methods which to my ears
>  says
>> that shaped dither is superior so  I think it should  become the default
>> for
>
>> 'high quality';  what  does anybody think? (shaped dither comes first)
>>   _http://members.aol.com/martynshaw/shaped_triangular.wav_
>>   (http://members.aol.com/martynshaw/shaped_triangular.wav)
>>
>>  I have looked at libgdither and it appears that up to version 0.5 it
>>  does
>> (almost) what I have done here and follows the   literature.  Version 0.6
>> corrupts the code; I tried   modifying Audacity code to follow it and the
> noise is
>> worse  at  most frequencies than the new triangular  one.

-------------------------------------------------------------------------
Take  Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay  panel and you'll get the chance to share your
opinions on IT & business  topics through brief surveys -- and earn  cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel  mailing  list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Leland Lucius
On 9/21/06 6:43 PM, "[hidden email]" <[hidden email]> wrote:

> That's 2 votes now so can somebody  change the default option for
> Prefs->Quality->Conversion->High-quality->Dither to Shaped  please?  I don't
> know where
> to look for it.
>
It looks like the default is actually "None":

      S.TieChoice(wxT(""),
         wxT("/Quality/HQDitherAlgorithm"),
         Dither::none, mmDitherNames, mmDitherLabels );
 
Did you want to change it to:

      S.TieChoice(wxT(""),
         wxT("/Quality/HQDitherAlgorithm"),
         Dither::shaped, mmDitherNames, mmDitherLabels );
 
Leland



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Mixer (was Re: FW: Dither)

Markus Meyer
Leland schrieb:
> Did you want to change it to:
>
>       S.TieChoice(wxT(""),
>          wxT("/Quality/HQDitherAlgorithm"),
>          Dither::shaped, mmDitherNames, mmDitherLabels );
>  
I changed it now to "shaped" in all three places it occurs. Again,
thanks for all your work on this, Martyn!


Markus


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/audacity-devel
Loading...