Forums > MaxMSP

Smoothing dynamic amplitude changes

November 5, 2008 | 1:24 am

Hi,
I am using fiddle~ to read a soundfile and output the amplitude which then feeds a *~ object. As the amplitude amount is constantly changing I am getting clicks in my audio. How do I smooth this so it does not click. I have searched the forums already but can not find the answer I am looking for,. Any help is much appreciated.
Thanks in advance, Mike.



MIB
November 5, 2008 | 4:15 am

maybe have a look at line??


November 5, 2008 | 4:25 am

Fiddle~ is outputting amplitude values taken from a soundfile therefore often jumping between extreme numbers so I can’t see how line would work in this situation? Unless I am missing something obvious?



MIB
November 5, 2008 | 4:41 am

I guess it all depends what you actually want to achieve…
line will probably get rid of clicks but since you need a ramp-time you will loose definition.

can you post part of your patch or explain what you hope to do with this??


November 5, 2008 | 11:52 am

Have a look at [lbyl] from CNMAT. With it you can ignore large jumps unless the value reached after the jump is maintained. You could also try averaging your values. [line] will definitely be useful, try out different ramp times to get the balance between efficiency and responsiveness. I would suggest starting with a message like "$1 20" going into [line]. Here’s a patch for creating an average of the last n numbers and an example of using [line].

lh

– Pasted Max Patch, click to expand. –

November 10, 2008 | 4:04 pm

If your getting jumping values try using the [gain~] object as it
interpolates values. with the line object you can be more precise but there
is more potential for bugs

On Wed, Nov 5, 2008 at 6:52 AM, Luke wrote:

>
>
> Have a look at [lbyl] from CNMAT. With it you can ignore large jumps unless
> the value reached after the jump is maintained. You could also try averaging
> your values. [line] will definitely be useful, try out different ramp times
> to get the balance between efficiency and responsiveness. I would suggest
> starting with a message like "$1 20" going into [line]. Here’s a patch for
> creating an average of the last n numbers and an example of using [line].
>
> lh
>
>
>

– Pasted Max Patch, click to expand. –

>
>
>


November 10, 2008 | 6:46 pm

This [lbyl] objects sounds interesting, I’ll have to check it out.

I have used [line~] in those situations with mixed success if I recall (it has been a few years).

How about convert it to a signal (with [sig~]) and smooth it with [rampsooth~] or [slide~]?


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