Smoothing dynamic amplitude changes

Nov 5, 2008 at 1:24am

Smoothing dynamic amplitude changes

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.

#40673
Nov 5, 2008 at 4:15am

maybe have a look at line??

#144110
Nov 5, 2008 at 4:25am

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?

#144111
Nov 5, 2008 at 4:41am

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??

#144112
Nov 5, 2008 at 11:52am

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. –
#144113
Nov 10, 2008 at 4:04pm

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. –

>
>
>

#144114
Nov 10, 2008 at 6:46pm

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~]?

#144115

You must be logged in to reply to this topic.