| the random opcodes are affected by the seed value in instr 0. the
problem is, that this seed value has no effect on the first generated
value. when you try this example, you get always different results for
the second, third etc random value, but the starting value is always
the lower border:
seed 0
instr 1
k1 randomi 1, 10, 11
printk .1, k1
endin
r 5
i 1 0 .5
joachim
Am 27.09.2010 um 09:07 schrieb Oeyvind Brandtsegg:
> Could we add an optional argument for seed ?
> Oeyvind
>
>
> 2010/9/10 john ffitch :
>>>>>>> "joachim" == joachim heintz writes:
>>
>> joachim> shall the behaviour of randomi and randomh:
>> joachim> - first value is always kmin, instead of a random value
>> between kmin
>> joachim> and kmax -
>> joachim> also considered as a bug?
>>
>> I looked at the code and it is severely broken. It uses
>> uninitialised
>> variables all over and the first call always returns
>> (ARB1 + ARB2 * 0) * (max - min) + min;
>> The ARB1 and ARB2 are two different uninitialised but will often be
>> zero.
>>
>> Is this a bug? Well I am concerned that the result is odd but users
>> may rely on it. For that reason i am reluctant to change it to
>> something more sane. I am in the users' hands here.
>>
>> randomh is similar, returning
>> ARB1 * (max - min) + min;
>> The length of the first hold is arbitrary, depending on the ARB2
>> uninitialised value.
>>
>> ==John ffitch
>>
>> ------------------------------------------------------------------------------
>> Start uncovering the many advantages of virtual appliances
>> and start using them to simplify application deployment and
>> accelerate your shift to cloud computing.
>> http://p.sf.net/sfu/novell-sfdev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |