[PD] Vanilla replacement for tanh~

Alexandre Torres Porres porres at gmail.com
Fri Jul 3 17:27:39 CEST 2015


well, I was someone who did it, and I wonder and ask you why don't you just
use [expr~ tanh($v1)] like I also suggested. It does the same thing and is
way simpler.

I don't know about the poles and zeros from an 8 pole cheby filter with
cuttoff at 20000Hz, but a filter guru would easilly find that out, then you
could implement it with 4 biquads, which seems to be the simpler solution

2015-07-03 12:22 GMT-03:00 Pagano, Patrick <pat at digitalworlds.ufl.edu>:

>  Thanks for the tip! Someone attached a tanh~ abstraction that basically
> does what you suggested and it's working great.
>
>  When I drill down in the patch from
> lp8_cheb~
> |
> lpc2
> |
> filter~ lpc2 does not create
>
> Sent from my iPhone
>
> On Jul 3, 2015, at 11:14 AM, Alexandre Torres Porres <porres at gmail.com>
> wrote:
>
>   > The tanh~.pd is working swell.
>
>  Are you using mine? why not just use [expr~ tanh($v1)]?
>
>  for the cheby filter, you'd need to know where are all the poles and
> zeros, then you could do it with vanilla raw filters or maybe even a few
> biquad~ in cascade
>
> 2015-07-03 11:55 GMT-03:00 Pagano, Patrick <pat at digitalworlds.ufl.edu>:
>
>>  The tanh~.pd is working swell.
>> Would you all be able to suggest a replacement for the lp8_cheb~? I
>> needed to replace three non-vanilla items
>> 1.) tanh~
>> 2.) make symbol [zexy]
>> 3.) lp8_cheb~
>>
>>  I am trying to convert an algorithmic patch by a gentleman named Scott
>> Norlund and these are the only problems from a rather couple patch.
>>
>>  Also, is there a work-around for "inits"?
>> Thank you all very much for the wonderful help
>>
>> Sent from my iPhone
>>
>> On Jul 3, 2015, at 2:44 AM, i go bananas <hard.off at gmail.com> wrote:
>>
>>   yes, you need to use a [clip~ -3 3] to restrict the input.  But the
>> function converges to +0.999999 and -0.999999 or whatever by then anyway,
>> so for all practical purposes it is fine.
>>
>> On Fri, Jul 3, 2015 at 2:26 PM, Miller Puckette <msp at ucsd.edu> wrote:
>>
>>> I've never seen that approximation before but there must be some
>>> restriction on the allowable values of X since the expression diverges
>>> for large positive or negative values of x, while tanh(x) converges to
>>> +1 nad -1, respectively.
>>>
>>> cheers
>>> Miller
>>>  On Fri, Jul 03, 2015 at 01:23:29PM +0900, i go bananas wrote:
>>> > there's a good approximation for tanh that can be made using just a
>>> couple
>>> > of simple arithmetic objects:
>>> >
>>> > formula is:  tanh(x) ~= x*(27+x*x) / (27+9*x*x)
>>> >
>>> > it's close enough for every application i've ever come across, it's
>>> cheap
>>> > cos it only uses simple arithmetic, and it doesn't degrade the
>>> resolution
>>> > of your signal like a table lookup does.
>>> >
>>> >
>>> >
>>> > On Fri, Jul 3, 2015 at 12:56 PM, Chris McCormick <chris at mccormick.cx>
>>> wrote:
>>> >
>>> > > On 03/07/15 03:06, Pagano, Patrick wrote:
>>> > > > Is there a way i can replace something for tanh~
>>> > > > and inits in Vanilla 46?
>>> > >
>>> > > Using a pre-computed table for speed:
>>> > >
>>> > > https://github.com/chr15m/blockhead/blob/master/e_tanh.pd
>>> > > https://github.com/chr15m/blockhead/blob/master/e_tanh-help.pd
>>> > >
>>> > > Or install "blockhead" using deken. :)
>>> > >
>>> > > Cheers,
>>> > >
>>> > > Chris.
>>> > >
>>> > > --
>>> > > http://mccormick.cx/
>>> > >
>>> > > _______________________________________________
>>> > > Pd-list at lists.iem.at mailing list
>>> > > UNSUBSCRIBE and account-management ->
>>> > > http://lists.puredata.info/listinfo/pd-list
>>> > >
>>>
>>>
>>> > _______________________________________________
>>> > Pd-list at lists.iem.at mailing list
>>> > UNSUBSCRIBE and account-management ->
>>> http://lists.puredata.info/listinfo/pd-list
>>>
>>>
>>   _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150703/fef643e7/attachment.html>


More information about the Pd-list mailing list