Csound Csound-dev Csound-tekno Search About

[Cs-dev] Bug in follow2

Date2012-08-07 14:41
FromSigurd Saue
Subject[Cs-dev] Bug in follow2
I guess this one is for John:

Thanks to some messy fumbling by my colleague Øyvind, I ended up studying the source code for the follow2 opcode. There seems to be one bug with at least some performance impact:

In the function envext the line:
if (p->lastrel!=*p->attack) {
should be
if (p->lastatt!=*p->attack) {

Secondly I wonder why the constants used in calculating ga and ge are different in envset and envext. Only the former seems to match the original algorithm posted on music-dsp.

Sigurd

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-08-07 15:32
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Bug in follow2
My immediate reactio was who wrote that opcode?


> I guess this one is for John:
>

Oh it was I!

> Thanks to some messy fumbling by my colleague Øyvind, I ended up studying
> the source code for the follow2 opcode. There seems to be one bug with at
> least some performance impact:
>
> In the function envext the line:
> if (p->lastrel!=*p->attack) {
> should be
> if (p->lastatt!=*p->attack) {
>

Yes looks silly

> Secondly I wonder why the constants used in calculating ga and ge are
> different in envset and envext. Only the former seems to match the
> original algorithm posted on music-dsp.

Absolutely no idea.  Can you point me at the original musiv-dsp posting?
==John




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-08-07 20:16
FromSigurd Saue
SubjectRe: [Cs-dev] Bug in follow2
Well, I found some reference here in a code archive:

http://kczx.gzhu.edu.cn/course_center/files_upload/061d985a-bd02-480c-b4a3-495383c58a23/content/c3d69712-4e35-4260-a771-014b5aeb82c1/COLUMN_10/file.files/file_4.pdf

Select the link "Envelope follower with different attack and release" near the top of the first page.

Good luck :-)

Sigurd
________________________________________
Fra: jpff@cs.bath.ac.uk [jpff@cs.bath.ac.uk]
Sendt: 7. august 2012 16:32
Til: Developer discussions
Emne: Re: [Cs-dev] Bug in follow2

My immediate reactio was who wrote that opcode?


> I guess this one is for John:
>

Oh it was I!

> Thanks to some messy fumbling by my colleague Øyvind, I ended up studying
> the source code for the follow2 opcode. There seems to be one bug with at
> least some performance impact:
>
> In the function envext the line:
> if (p->lastrel!=*p->attack) {
> should be
> if (p->lastatt!=*p->attack) {
>

Yes looks silly

> Secondly I wonder why the constants used in calculating ga and ge are
> different in envset and envext. Only the former seems to match the
> original algorithm posted on music-dsp.

Absolutely no idea.  Can you point me at the original musiv-dsp posting?
==John




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-08-08 14:21
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] Bug in follow2
Thanks; I have changed the sources to easier code and to reflect the
algorithm.  Will commit to GIT soon; need the check some other changes
first
==John ff

> Well, I found some reference here in a code archive:
>
> http://kczx.gzhu.edu.cn/course_center/files_upload/061d985a-bd02-480c-b4a3-495383c58a23/content/c3d69712-4e35-4260-a771-014b5aeb82c1/COLUMN_10/file.files/file_4.pdf
>
> Select the link "Envelope follower with different attack and release" near
> the top of the first page.
>
> Good luck :-)
>
> Sigurd
> ________________________________________
> Fra: jpff@cs.bath.ac.uk [jpff@cs.bath.ac.uk]
> Sendt: 7. august 2012 16:32
> Til: Developer discussions
> Emne: Re: [Cs-dev] Bug in follow2
>
> My immediate reactio was who wrote that opcode?
>
>
>> I guess this one is for John:
>>
>
> Oh it was I!
>
>> Thanks to some messy fumbling by my colleague Øyvind, I ended up
>> studying
>> the source code for the follow2 opcode. There seems to be one bug with
>> at
>> least some performance impact:
>>
>> In the function envext the line:
>> if (p->lastrel!=*p->attack) {
>> should be
>> if (p->lastatt!=*p->attack) {
>>
>
> Yes looks silly
>
>> Secondly I wonder why the constants used in calculating ga and ge are
>> different in envset and envext. Only the former seems to match the
>> original algorithm posted on music-dsp.
>
> Absolutely no idea.  Can you point me at the original musiv-dsp posting?
> ==John
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net