Csound Csound-dev Csound-tekno Search About

[Csnd] max_k minimum bug?

Date2013-11-14 14:47
Fromzohar argaman
Subject[Csnd] max_k minimum bug?
AttachmentsNone  None  

Date2013-11-14 14:57
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: max_k
AttachmentsNone  

Date2013-11-14 19:44
Fromjoachim heintz
SubjectRe: [Csnd] Re: max_k
i think writing max_k2 is the best solution indeed.
thanks -
	joachim


Am 14.11.2013 15:57, schrieb jpff@cs.bath.ac.uk:
> The code is badly written.  It assumes an answer of zero in all cases
> and max or min as against previous value.
>
> This is a problem as the code has existed in this form for a long
> time.  If we fix it may break ond code.  Esy to create a max_k2 that
> does what the documentation says.....
>
> I need advice
>
> ==John ff
>
> Quoting zohar argaman :
>
>> Hi all
>> ive tried using the minimum option in max_k opcode and it doesn't
>> seem to work.
>> here is my code
>>
>> 
>>
>> instr 1
>> a1=0.5
>> ktrig metro 1
>> kout max_k a1, ktrig, 3
>> printk 0.5, kout
>> endin
>> 
>> 
>> i1 0 5
>> 
>>
>> and this what came out
>>
>>  i 1 time 0.00023: 0.00000
>> i 1 time 0.50000: 0.00000
>> i 1 time 1.00000: 0.00000
>> i 1 time 1.50000: 0.00000
>> i 1 time 2.00000: 0.00000
>> i 1 time 2.50000: 0.00000
>> i 1 time 3.00000: 0.00000
>> i 1 time 3.50000: 0.00000
>> i 1 time 4.00000: 0.00000
>> i 1 time 4.50000: 0.00000
>> i 1 time 5.00000: 0.00000
>>
>> so… what am i missing? its only the minimum option that gives this
>> behaviour, the rest is fine.
>>
>> thanks
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug trackers
>> csound6:
>>             https://sourceforge.net/p/csound/tickets/
>> csound5:
>>             https://sourceforge.net/p/csound/bugs/
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>
>
>
>
>
> Send bugs reports to the Sourceforge bug trackers
> csound6:
>             https://sourceforge.net/p/csound/tickets/
> csound5:
>             https://sourceforge.net/p/csound/bugs/
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>

Date2013-11-14 19:50
FromAndres Cabrera
SubjectRe: [Csnd] Re: max_k
But if the opcode is not working according to the docs, maybe it should be considered a bug and the opcode should be fixed... I don't like polluting the language with version 2 of opcode because of a bug in one...

Cheers,
Andrés


On Thu, Nov 14, 2013 at 11:44 AM, joachim heintz <jh@joachimheintz.de> wrote:
i think writing max_k2 is the best solution indeed.
thanks -
        joachim


Am 14.11.2013 15:57, schrieb jpff@cs.bath.ac.uk:

The code is badly written.  It assumes an answer of zero in all cases
and max or min as against previous value.

This is a problem as the code has existed in this form for a long
time.  If we fix it may break ond code.  Esy to create a max_k2 that
does what the documentation says.....

I need advice

==John ff

Quoting zohar argaman <zoharargaman@gmail.com>:

Hi all
ive tried using the minimum option in max_k opcode and it doesn't
seem to work.
here is my code

<CsInstruments>

instr 1
a1=0.5
ktrig metro 1
kout max_k a1, ktrig, 3
printk 0.5, kout
endin
</CsInstruments>
<CsScore>
i1 0 5
</CsScore>

and this what came out

 i 1 time 0.00023: 0.00000
i 1 time 0.50000: 0.00000
i 1 time 1.00000: 0.00000
i 1 time 1.50000: 0.00000
i 1 time 2.00000: 0.00000
i 1 time 2.50000: 0.00000
i 1 time 3.00000: 0.00000
i 1 time 3.50000: 0.00000
i 1 time 4.00000: 0.00000
i 1 time 4.50000: 0.00000
i 1 time 5.00000: 0.00000

so… what am i missing? its only the minimum option that gives this
behaviour, the rest is fine.

thanks




Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body
"unsubscribe csound"





Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
csound"





Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-11-14 20:04
FromMichael Gogins
SubjectRe: [Csnd] Re: max_k
I agree with Andres. The code should agree with the documentation that was written for it, if that documentation makes sense. If there are a lot of pieces that break then the documentation should be changed, but only if the actual behavior itself makes sense.
 
We should probably be maintaining a "compatibility notes" wiki for issues like this.
 
Regards,
Mike


-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Thu, Nov 14, 2013 at 2:50 PM, Andres Cabrera <mantaraya36@gmail.com> wrote:
But if the opcode is not working according to the docs, maybe it should be considered a bug and the opcode should be fixed... I don't like polluting the language with version 2 of opcode because of a bug in one...

Cheers,
Andrés


On Thu, Nov 14, 2013 at 11:44 AM, joachim heintz <jh@joachimheintz.de> wrote:
i think writing max_k2 is the best solution indeed.
thanks -
        joachim


Am 14.11.2013 15:57, schrieb jpff@cs.bath.ac.uk:

The code is badly written.  It assumes an answer of zero in all cases
and max or min as against previous value.

This is a problem as the code has existed in this form for a long
time.  If we fix it may break ond code.  Esy to create a max_k2 that
does what the documentation says.....

I need advice

==John ff

Quoting zohar argaman <zoharargaman@gmail.com>:

Hi all
ive tried using the minimum option in max_k opcode and it doesn't
seem to work.
here is my code

<CsInstruments>

instr 1
a1=0.5
ktrig metro 1
kout max_k a1, ktrig, 3
printk 0.5, kout
endin
</CsInstruments>
<CsScore>
i1 0 5
</CsScore>

and this what came out

 i 1 time 0.00023: 0.00000
i 1 time 0.50000: 0.00000
i 1 time 1.00000: 0.00000
i 1 time 1.50000: 0.00000
i 1 time 2.00000: 0.00000
i 1 time 2.50000: 0.00000
i 1 time 3.00000: 0.00000
i 1 time 3.50000: 0.00000
i 1 time 4.00000: 0.00000
i 1 time 4.50000: 0.00000
i 1 time 5.00000: 0.00000

so… what am i missing? its only the minimum option that gives this
behaviour, the rest is fine.

thanks




Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body
"unsubscribe csound"





Send bugs reports to the Sourceforge bug trackers
csound6:
            https://sourceforge.net/p/csound/tickets/
csound5:
            https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
csound"





Send bugs reports to the Sourceforge bug trackers
csound6:
           https://sourceforge.net/p/csound/tickets/
csound5:
           https://sourceforge.net/p/csound/bugs/
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"