Page 3 of 3

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 9:00 pm
by KG_is_back
tester wrote:

I'm using your schematic right now, nothing else. Fadeout is set to 3sec (via "fin" node, reused for different purpose as I can see). I changed the interval to 10 seconds, and restarted audio, and I can hear the thing all the time, pretty loud. Should be zero at 3 seconds after hit.

After 3 seconds it is -12dB, so the 12dB is no longer the midpoint.


on, you mean the normal envelope... when you set the time to 10seconds and midpoint to 12dB it will reach -12dB after 10seconds, -24dB after 20seconds etc. It never really reaches zero (it's exponential decay). it shoudn't suppose to work like that?

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 9:04 pm
by tester
Not exactly. I use this "ding" thing in some other projects, and while the signal reaches digital zero after specified time, midpoint is used to shape the curvature of the envelope. Just check the initial schematic (-6dB at the halfway = relatively linear fade out).

Merging it with proper anticlick - I should be able to add there phase randomizations as well at some point.

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 9:33 pm
by tester
I extracted (I guess correctly?) this from cyto's guts.
I think it can be simplified even more and then optimized.

I assume that this one will work (without hop) with the schematic too, so it's time to check it.

//edit: yep, it works.

So the problem was the 'hop' part mostly I guess?

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 9:48 pm
by tester
KG_is_back wrote:It works fine here. It may fail to reach zero perfectly in case the fade-out is not sample accurate (is not integer samples long). However, either case it should get so close to zero it's basically ducking.


So... when the anticlick may get in trouble due to that float/integer rounding ting? Which one would have to be too long and what are their maximum lengths? Initial delay, fade out, interval.

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 10:04 pm
by KG_is_back
tester wrote://edit: yep, it works.

So the problem was the 'hop' part mostly I guess?


Yes, the hop causes a lot of sync problems when sample-precise processing is expected.

tester wrote:So... when the anticlick may get in trouble due to that float/integer rounding ting? Which one would have to be too long and what are their maximum lengths? Initial delay, fade out, interval.


The fade out works like this:

Code: Select all

envelope=envelope-(1/length);

The envelope is 1 on start and slowly decreases. by 1/length, so at length'th sample it is zero. With sample by sample processing the code always runs integer number of times. Now you can imagine, that when the length is actually non-integer, the sample before the end the envelope is slightly above zero and one sample later it is below zero (the zero crossing happens in between samples).

It is not really an audible issue, but to make sure, round the fade-out length to closest integer-length in samples.

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 10:15 pm
by tester
I just wanted to know if it's audible or not.

BTW, I switched to that old re-extracted envelope (with midpoint) I just posted. I mention that, just in case of ASM optimizations. From what I hear and can confirm at the moment, this one seems to be (sound) better. :ugeek:

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 10:19 pm
by KG_is_back
tester wrote:I just wanted to know if it's audible or not.

BTW, I switched to that old re-extracted envelope (with midpoint) I just posted. I mention that, just in case of ASM optimizations. From what I hear and can confirm at the moment, this one seems to be (sound) better. :ugeek:


I may look into optimizing it later then. One little tip - sync the modules. Then later on, you can simply replace parts in one of the module and all get updated. I do that regularly when optimizing my schematics - Using less efficient easily editable code in development phase and optimizing it later.

Re: How to eliminate 'click' problem?

Posted: Thu Nov 27, 2014 10:33 pm
by tester
KG_is_back wrote:I may look into optimizing it later then. One little tip - sync the modules. Then later on, you can simply replace parts in one of the module and all get updated. I do that regularly when optimizing my schematics - Using less efficient easily editable code in development phase and optimizing it later.


I sync them. I just have issues with textual coding. :mrgreen: