[Cs-dev] rnd text incorrect
Date | 2010-07-19 20:51 |
From | menno |
Subject | [Cs-dev] rnd text incorrect |
hi, some text in the manual regarding rnd is incorrect. rnd.csd produces the following output: instr 1: i1 = 0.974 instr 1: i1 = 0.139 and NOT like it is now: rnd at i-rate: 0.973500 rnd at k-rate: 0.139405 rnd at i-rate: 0.973500 rnd at k-rate: 0.040065 rnd at i-rate: 0.973500 rnd at k-rate: 0.412845 rnd at i-rate: 0.973500 rnd at k-rate: 0.440650 rnd at i-rate: 0.973500 rnd at k-rate: 0.663581 rnd at i-rate: 0.973500 rnd at k-rate: 0.876723 rnd at i-rate: 0.973500 rnd at k-rate: 0.302459 rnd at i-rate: 0.973500 rnd at k-rate: 0.398580 rnd at i-rate: 0.973500 rnd at k-rate: 0.448875 rnd at i-rate: 0.973500 rnd at k-rate: 0.907728 can somebody please rectify (if approved) ? Menno -- View this message in context: http://csound.1045644.n5.nabble.com/rnd-text-incorrect-tp1465863p1465863.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-20 17:27 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] rnd text incorrect |
Hi, I've just made a new example for rnd: |
Date | 2010-07-25 18:01 |
From | menno |
Subject | Re: [Cs-dev] rnd text incorrect |
i do not know if it is a bug, but i get the same results. Should instr 2 not produce a random number between 0 and 10? menno -- View this message in context: http://csound.1045644.n5.nabble.com/rnd-text-incorrect-tp1465863p2134999.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-25 18:09 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] rnd text incorrect |
No, only if you seed it differently every time. With the same seed all random number generators produce the same sequence. Victor On 25 Jul 2010, at 18:01, menno wrote: > > i do not know if it is a bug, but i get the same results. Should > instr 2 not > produce a random number between 0 and 10? > > menno > > -- > View this message in context: http://csound.1045644.n5.nabble.com/rnd-text-incorrect-tp1465863p2134999.html > Sent from the Csound - Dev mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-25 18:14 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] rnd text incorrect |
Just realized the problem, doing rnd(10) is interpreted as i-rate. You must do: klimit = 10 rnd(klimit) to force rnd to be k-rate. Cheers, Andrés On Sun, Jul 25, 2010 at 6:09 PM, Victor Lazzarini |
Date | 2010-07-25 18:23 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] rnd text incorrect |
Sorry, what I should have said is (quoting the manual): "Returns a random number in a unipolar range at the rate given by the input argument." hence krand = rnd(10) and krn = 10 krand = rnd(krn) will produce different results. The latter will produce new numbers at k-rate. Victor On 25 Jul 2010, at 18:09, Victor Lazzarini wrote: > No, only if you seed it differently every time. With the same seed all > random number generators produce the same sequence. > > Victor > On 25 Jul 2010, at 18:01, menno wrote: > >> >> i do not know if it is a bug, but i get the same results. Should >> instr 2 not >> produce a random number between 0 and 10? >> >> menno >> >> -- >> View this message in context: http://csound.1045644.n5.nabble.com/rnd-text-incorrect-tp1465863p2134999.html >> Sent from the Csound - Dev mailing list archive at Nabble.com. >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Csound-devel mailing list >> Csound-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/csound-devel > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-25 18:25 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] rnd text incorrect |
I should remember to RTFM more often... =) Cheers, Andrés On Sun, Jul 25, 2010 at 6:23 PM, Victor Lazzarini |
Date | 2010-07-25 19:05 |
From | menno |
Subject | Re: [Cs-dev] rnd text incorrect |
this is exactly why the manual needs good examples for every opcode! -- View this message in context: http://csound.1045644.n5.nabble.com/rnd-text-incorrect-tp1465863p2140211.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2010-07-25 19:34 |
From | andy fillebrown |
Subject | Re: [Cs-dev] rnd text incorrect |
laughing at the irony... ~ af > I should remember to RTFM more often... =) > > Cheers, > Andrés ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |