#243: Possible distortion issue...
-------------------------------------+--------------------------------------
Reporter: MiiJaySung | Owner: admin
Type: Bugs | Status: new
Priority: 1 | Milestone:
Component: Liquidsoap | Version:
Keywords: distortion filter noise | Mac: 1
Linux: 1 | Netbsd: 1
Other: 1 | Freebsd: 1
-------------------------------------+--------------------------------------
Not sure entirely if this is a bug. Basically, as you might have saw on
the mailing list, I had a issue with a small amount of noise being
noticeable when the stream is supposed to be silent.
I did a very hacked filter (which I know distorts audio to some degree
because of the way it works) based on this...
amplify(2.0, add([
clip(min = 0.01, max = 1.0, stream),
clip(max = -0.01, min = -1.0, stream) ]))
Because I don't know how you can do a proper filter for white noise (i.e.
one where you do a FFT to get the freq-amplitude domain, trim off anything
that is below a the threshold where the noise stops, then do an inverse
FFT to get back to the amp-time domain) I took this approach which I know
will leave noise on when there is speech (it's not noticeable then), and I
know it clips a bit of the singal as it tends towards 0 amplitude.
Besides the fact the above code is a dirty ugly hack which probably will
find it's way on the "Daily WTF", the below code in theory shouldn't alter
the audio noticeably (in an ideal world the result should be the same as
the input, but obviously working in floats means there might be minimal
change, though it shouldn't be an in any way noticeable).
amplify(2.0, add([
clip(min = 0.0, max = 1.0, stream),
clip(max = -0.0, min = -1.0, stream) ]))
In the above, nothing is discarded, the signal just gets split into two
+'ive and -'ive sections. The add should join them together and the 2x amp
should just reverse the cancelling (well merging with 0) from the add
operation. However I found it often makes a noticeable degradation which
makes things sound quite metallic.
This isn't critical, as I should be doing my noise cancellation properly
for a start, however basic filters shouldn't be distorting streams like
this??? I'm not using raw buffering so I can't think it's int over/under
flows.
--
Ticket URL: <http://savonet.rastageeks.org/ticket/243>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac