Forums > MaxMSP

I can't remove clicks

October 4, 2010 | 1:05 pm

Hi, forum

I couldn’t find a solution to remove clicks while using short, percussive envelope with function editor.
I learned that one can use line to make slow ramp but it doesn’t work since function outputs already line format and if I add another line than it kills the attack time significantly even if I put 10ms.

is it possible to use function with short env without click? or I should go for vst~??

thank you very much.

– Pasted Max Patch, click to expand. –

October 4, 2010 | 1:50 pm

Beginning a lineramp with function at any value other that 0. can cause clicks as the signal output will go to that value immediately; if you need a very short attack from [function], send a number to a [setdomain $1] message into [function], and you can ‘zoom in’ to very short time values.
Brendan


October 4, 2010 | 2:25 pm

alright,

so it’s a constant battle between desired env and clicks.
start env from 0 isn’t a solution at all. it gets clicks anyway, it depends on other factors. (if one triggers env before it gets to the end, or even immediately it gets to the end. it depends on sounds, but for the percussive sounds, you bet it will get clicks even if you start after the env is finished, unless it’s more than 50ms or something…)
so it seems that the only way is to do the battle, while adjusting setdomain and various function editing…until one gets the less click and the more similar to the desired envelop…

this is very disappointing though..one of the thing that attracted me to buy max was function editor…how could I know that it was click generator!!?

anyway, thanks for the help…


October 4, 2010 | 4:06 pm

Amongst other things that Max does, signal processing is one of the things it’s GOOD at. There are objects such as [slide~] and [rampsmooth], and envelope generators such as [trapezoid~] and [curve~] which can allow you to impose user-defined shapes at the signal output stage – don’t be downhearted. If you say you are still getting clicks even with the envelope beginning at 0. then your patch may need re-examined; if you can describe what you want your patch or algorithm to achieve then i (and others) will do our best to suggest better patch design.

Brendan


October 4, 2010 | 4:30 pm

Here’s a suggestion, although it uses [curve~] on its own without a function generator so I guess that doesn’t solve your problem about [function]

– Pasted Max Patch, click to expand. –

Brendan


October 4, 2010 | 7:01 pm

i like to cheat and just use a quick ramp to 0 using ramp-time of 0.1ms(line~/curve~/etc. can use floating point times, remember, which means it will get ‘closer’ to sample-rate accuracy if you need it… but whatever you do is still dependent on scheduler’s overdrive/audio-interrupt and signal-vector settings in DSP Status… window)

here’s how i cheat with your function patch:

– Pasted Max Patch, click to expand. –

but it’s true, sometimes you don’t want even 0.1ms of latency or any latency even shorter than that. in which case, you might try reading Miller’s book here, ‘Theory and Techniques…’:
http://www-crca.ucsd.edu/~msp/
in it, he refers to a switch-and-ramp technique which might be of some help(i don’t know for sure, but it’s worth a try if you use function/envelope generator for synthesis in particular):

http://crca.ucsd.edu/~msp/techniques/latest/book-html/node63.html

It’s a ‘bit’ advanced but shouldn’t be too much so to figure out. Anyways, hope something here helps.

________________________________
*Never fear, Noob4Life was never here!*


October 5, 2010 | 9:42 am

thanks for the sincere helps, both noobs.

~slide and rampsmooth were the first thing I’ve tried for click problem but it dramatically reduces the global gain of sound, thus change the timbre character of sounds. noob4life’s "cheat" is indeed super clever, but it does the same thing: change the character of sound.

If you’re curious, use preset number 3 of tutorial synth (simple FM from tuto 11) then just bang it with various solutions that have been thought. you will hear not only it changes the envelope character of the triggered sound but changes timbre of the sound. those solutions are not better than just use various filter setting, spending lots of time to edit your filter setting to remove clicks and get the timbre right…but then it’s whole another story…

The only thing that I can think of now, as noobmeister suggested, is to use audio rate envelops. well, then the function editor is gone…but it’s life.

If you say you are still getting clicks even with the envelope beginning at 0. then your patch may need re-examined; if you can describe what you want your patch or algorithm to achieve then i (and others) will do our best to suggest better patch design.

however, it’s very encouraging to hear above comment. my idea is just to make simple FM percussion (not more than this simpleFM~ from tutorial) instruments to use alongside a sequencer that I wish to design using JSUI. I love the FM percussion sounds because of this digital sharpness/harshness/crystal cleanness of timbre, so that’s why precise and sharp envelope editing is so important. And also I want to learn how to generate "fm-feedback" to make my percussion sounds even better. But f**king clicks are getting on my way. so I’m a bit lost. Speaking of audio rate env gen, I could use supercollider but then all my plan to use my FM sounds along with custom JSUI sequencer gets complicated. (I hate OSC) anyway, I’ll check out curve~ and trapeziod~ this afternoon and shall we overcome.

thanks


October 5, 2010 | 10:03 am

It’s strange that [function] should exhibit this behaviour, as you would imagine that the audio-rate [line~] envelope it generates should help avoid initialization clicks – I think that’s what’s happening in your patch, so I was wrong to blame the clicks on ‘poor’ patch design: it IS the [function] object that is creating the clicks, I tried a few solutions ([trapezoid~] [curve~] [rampsmooth~] etc) and you’re right, they either change the timbre or don’t cover the clicks. I would have thought that using the [setdomain] message to zoom in should fix this, kind of like noob4life’s suggestion. I’ll look at this later.

Best
Brendan


October 5, 2010 | 10:22 am

here comes the first solution, for now, very satisfying.

it’s nothing more than using slide~ and rampsmoothy~ with curve~, instead of troublesome line~ and function editor. as you can compare changing the option form umenu, you don’t hear timbre changes (depends on sound, but not really perceptible) and clicks removed or become smoother. (ramp time should over 20ms though..) and the most important thing is, there is NO global gain reduction! so…now the question is how to use curve~ effectively and dynamically as one can expect by using graphical function editor. anyway, sound is ok. thanks.

– Pasted Max Patch, click to expand. –

October 5, 2010 | 10:33 am

‘sorry, it works with function and line~ too.

I made mistake of connecting object when I tested slide~ with line~.
what a shame! ‘sorry..

so it seems that [slide~] with < 50ms ramp setting is the way to go.
clicks are there, but it’s quite o.k. kind of clicks.
for the better, perfect solution, I have no idea.
for my purpose, it is ok. thanks for helps and ‘sorry again to confuse you on gain reduction with line~/slide~ matter.


October 5, 2010 | 8:03 pm

I made one small change to your patch above, with the following curve coefficients in the message:

[0., 1. 5 -X 0. 100(arbitrary value) X]

where X is a value between 0. and 0.5, the greater the value the steeper the curve;
I like how you turned the [curve~] object into its own little metro or pulse, nice one.
Brendan


Viewing 11 posts - 1 through 11 (of 11 total)