Csound Csound-dev Csound-tekno Search About

[Cs-dev] Uninitialised variable in max_k

Date2011-12-05 12:11
Fromjohn ffitch
Subject[Cs-dev] Uninitialised variable in max_k
The implementation of maxk/maxk in case when the itype in case 3
(average) is deeply flawed.  Actually the documentation and code do
not agree at all.  I think I can fix the uninitialised variable, but
the mismatch is worrying....

Documentation:
  itype determinates [sic] the behaviour of max_k: 
  1 - absolute maximum (sign of negative values is changed to positive
      before evaluation) 
  2 - actual maximum 
  3 - actual minimum
  4 - calculate average value of asig in the time interval 

code: this type runs from 0-3 and 4 would generate an error

Has anyone ever used this opcode?  The code implement the type at
k-rate which is rather silly -- either it ought to be calculated once
and saved, or made available to the users at k-rate

==John ffitch

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-12-05 14:09
FromTito Latini
SubjectRe: [Cs-dev] Uninitialised variable in max_k
AttachmentsNone  

Date2011-12-05 22:51
Fromjoachim heintz
SubjectRe: [Cs-dev] Uninitialised variable in max_k
i use it a lot, but i always wanted to file the strange behaviour of
itypes 2-4. if i recall correctly, it didn't work at all.
itype=1 is ok and i use it frequently.

	joachim



Am 05.12.2011 13:11, schrieb john ffitch:
> The implementation of maxk/maxk in case when the itype in case 3
> (average) is deeply flawed.  Actually the documentation and code do
> not agree at all.  I think I can fix the uninitialised variable, but
> the mismatch is worrying....
> 
> Documentation:
>   itype determinates [sic] the behaviour of max_k: 
>   1 - absolute maximum (sign of negative values is changed to positive
>       before evaluation) 
>   2 - actual maximum 
>   3 - actual minimum
>   4 - calculate average value of asig in the time interval 
> 
> code: this type runs from 0-3 and 4 would generate an error
> 
> Has anyone ever used this opcode?  The code implement the type at
> k-rate which is rather silly -- either it ought to be calculated once
> and saved, or made available to the users at k-rate
> 
> ==John ffitch
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net