LISTSERV mailing list manager LISTSERV 16.5

Help for CSOUND Archives


CSOUND Archives

CSOUND Archives


CSOUND@LISTSERV.HEANET.IE


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CSOUND Home

CSOUND Home

CSOUND  March 2016

CSOUND March 2016

Subject:

Re: moogladder

From:

Steven Yi <[log in to unmask]>

Reply-To:

A discussion list for users of Csound <[log in to unmask]>

Date:

Wed, 30 Mar 2016 17:06:08 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (201 lines)

Is this implementation a replacement or an additional processing
method? I would prefer to have precision as an option, if possible.

On Wed, Mar 30, 2016 at 5:04 PM, jpff <[log in to unmask]> wrote:
> I tried a rational approx and it was the same speed
>
> Time for dinner now
>
> ==John
> PS I tried table look up and it did notin.
>
> On Wed, 30 Mar 2016, Anton Kholomiov wrote:
>
>> It's not faster with polynomial solution. Surprisingly it's even worse on
>> the
>> final chord.
>>
>> ~~~
>> 5,3    0,3   0:00.16 csound-mg-poly
>> 17,9  0,3   0:00.70 csound-mg-poly
>> 18,9  0,3   0:01.27 csound-mg-poly
>> 16,9  0,3   0:01.78 csound-mg-poly
>> 17,6  0,3   0:02.31 csound-mg-poly
>> 19,6  0,3   0:02.90 csound-mg-poly
>> 14,3  0,3   0:03.33 csound-mg-poly
>> 19,6  0,3   0:03.92 csound-mg-poly
>> 18,3  0,3   0:04.47 csound-mg-poly
>> 28,5  0,3   0:05.33 csound-mg-poly
>> ~~~
>>
>> 2016-03-30 23:44 GMT+03:00 Victor Lazzarini <[log in to unmask]>:
>>       Table lookup would be faster if we are removing the function call.
>>
>>       Victor LazzariniDean of Arts, Celtic Studies, and Philosophy
>>
>> Maynooth University
>> Ireland
>>
>> On 30 Mar 2016, at 21:39, Anton Kholomiov <[log in to unmask]>
>> wrote:
>>
>>       Someone have approximated it with polynomial in the Mapple:
>> ~~~
>>
>> The best rational approximation to tanh(x)tanh⁡(x) with numerator
>> and denominator of degree 3 on the interval [0,3.1][0,3.1] (as
>> provided by Maple's minimax function) is
>>
>>
>> (-.67436811832e-5+(.2468149110712040+(.583691066395175e-1+.3357335044280075e-
>>
>> 1*x)*x)*x)/(.2464845986383725+(.609347197060491e-1+(.1086202599228572+.287470
>>       7922475963e-1*x)*x)*x)
>>
>> This (call it f(x)f(x)) has maximum error .2735944241730870e-4,
>> which is considerably less than 2^(-8).
>> On the interval [−3.1,3.1][−3.1,3.1],
>> use sgn(x)f(|x|)sgn(x)f(|x|).
>>
>> ~~~
>>
>> Maybe we can try out this solution?  It should be much faster.
>> The author says that it's defined for interval [-3, 3]. It can
>> catch almost all signals for audio applications
>>
>> 2016-03-30 23:35 GMT+03:00 Anton Kholomiov
>> <[log in to unmask]>:
>>       I've found out a discussion on how to calculate tanh.
>>       Maybe it can be useful:
>>
>> http://math.stackexchange.com/questions/107292/rapid-approximation-of-tanhx
>>
>> 2016-03-30 23:22 GMT+03:00 Anton Kholomiov
>> <[log in to unmask]>:
>>
>>       Thank you for updates John!
>>
>>       I’ve tried the new version of the moogladder on
>>       my test it shows approximately 2 times speed up:
>>
>>       I’ve tried the moogladder on chord progression
>>       of pad sound. The single note contains two
>>       instances of the filter. The heaviest load is
>>       the final chord: 8 notes at the same time. So we
>>       get 16 of moogladders going on.
>>
>>       My results:
>>
>> ;moogladder ; final chord:  8 notes * 2 filters = 16 moogladders at the
>> same time
>>
>> ; 62% -- no-opt     (final chord)
>> ; 44%               (first chord)
>>
>> ; 24% -- new        (final chord) ; 20% -- new        (first chord)
>>
>>       Complete report of top | grep csound:
>>
>>       moogladder no-opt
>>
>> CPU   Mem  Time
>>
>> 39,5  0,3   0:01.41 csound 44,8  0,3   0:02.76 csound 37,5  0,3   0:03.89
>> csound 38,8  0,3   0:05.06 csound 43,8  0,3   0:06.38 csound 26,5  0,3
>> 0:07.18 csound 43,5  0,3   0:08.49 csound 32,9  0,3   0:09.48 csound 62,7
>> 0,3   0:11.37 csound 18,3  0,3   0:11.92 csound
>>
>>       moogladder new
>>
>> 11,3  0,3   0:00.34 csound-mg 20,9  0,3   0:00.97 csound-mg 13,9  0,3
>> 0:01.39 csound-mg 16,3  0,3   0:01.88 csound-mg 16,3  0,3   0:02.37
>> csound-mg 14,3  0,3   0:02.80 csound-mg 16,3  0,3   0:03.29 csound-mg 14,6
>> 0,3   0:03.73 csound-mg 24,2  0,3   0:04.46 csound-mg 19,6  0,3   0:05.05
>> csound-mg
>>  8,3  0,3   0:05.30 csound-mg
>>
>>       Links to rendered files so you can listen to how
>>       it sounds:
>>
>>       https://www.dropbox.com/s/cki05znt029ta8j/moogladder-sounds.zip?dl=0
>>
>>       I’ve attached the file is so you can reproduce
>>       the tests.
>>
>>
>>
>> 2016-03-30 20:23 GMT+03:00 Paul Batchelor
>> <[log in to unmask]>:
>>       I would love to see the code for it.
>> -P
>>
>> On Tue, Mar 29, 2016 at 9:30 AM, jpff
>> <[log in to unmask]> wrote:
>>       Really a -dev topic but as there was
>>       discussion of moogladder here
>>       recently.....
>>
>>       I have a version of moogladder that is
>>       much faster (manual example in
>>       0.48s as against 1.8s).  No tables but
>>       avoids tanh calls for small and
>>       large absolute arguments, as tanh is
>>       approx the same a x for |x|<0.5
>>       and for |x|>4 it is sign(x).
>>       comparing results for that test shows
>>       audio is the same.
>>
>>       Anyone wish to try?  Not yet committed to
>>       git
>>       ==John ffitch
>>
>>       Csound mailing list
>>       [log in to unmask]
>>       https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>       Send bugs reports to
>>
>>       https://github.com/csound/csound/issues
>>       Discussions of bugs and features can be
>>       posted here
>>
>>
>> Csound mailing list [log in to unmask]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send
>> bugs reports to
>> https://github.com/csound/csound/issues Discussions of
>> bugs and features can be posted here
>>
>>
>>
>>
>> Csound mailing list [log in to unmask]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features
>> can
>> be posted here Csound mailing list [log in to unmask]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features
>> can
>> be posted here
>>
>> Csound mailing list [log in to unmask]
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features
>> can
>> be posted here
>>
>
> Csound mailing list
> [log in to unmask]
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
[log in to unmask]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015

ATOM RSS1 RSS2



LISTSERV.HEANET.IE

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager