Csound Csound-dev Csound-tekno Search About

[Csnd] rand and repetitions

Date2012-12-13 06:04
FromAlex Weiss
Subject[Csnd] rand and repetitions
Hi list

Does anybody know after how many samples rand repeats? I seem to be getting very consistent loops of about 65,000 samples length. Am I right in assuming that rand repeats after 65,536 samples? If so, are there other random number generators with a longer period?

Thanks,
Alex

Date2012-12-13 07:42
FromOeyvind Brandtsegg
SubjectRe: [Csnd] rand and repetitions
Perhaps rnd31 ?
Oeyvind


2012/12/13 Alex Weiss <alexweiss86@gmail.com>
Hi list

Does anybody know after how many samples rand repeats? I seem to be getting very consistent loops of about 65,000 samples length. Am I right in assuming that rand repeats after 65,536 samples? If so, are there other random number generators with a longer period?

Thanks,
Alex



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Date2012-12-13 09:44
Fromjoachim heintz
SubjectRe: [Csnd] rand and repetitions
yes. and there is also an optional parameter in rand. the manual says:
"isel (optional, default=0) -- if zero, a 16-bit number is generated. If 
non-zero, a 31-bit random number is generated. Default is 0."

	j

Am 13.12.2012 08:42, schrieb Oeyvind Brandtsegg:
> Perhaps rnd31 ?
> Oeyvind
>
>
> 2012/12/13 Alex Weiss >
>
>     Hi list
>
>     Does anybody know after how many samples rand repeats? I seem to be
>     getting very consistent loops of about 65,000 samples length. Am I
>     right in assuming that rand repeats after 65,536 samples? If so, are
>     there other random number generators with a longer period?
>
>     Thanks,
>     Alex
>
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://flyndresang.no/
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://soundcloud.com/t-emp

Date2012-12-13 20:28
FromAlex Weiss
SubjectRe: [Csnd] rand and repetitions

Could have sworn I read the manual... Oh well, another case of RTFM. Thanks, Joachim and Oeyvind!

Out of curiosity: why is it 31 instead of 32 bits?

Alex

On Dec 13, 2012 1:44 AM, "joachim heintz" <jh@joachimheintz.de> wrote:
yes. and there is also an optional parameter in rand. the manual says:
"isel (optional, default=0) -- if zero, a 16-bit number is generated. If non-zero, a 31-bit random number is generated. Default is 0."

        j

Am 13.12.2012 08:42, schrieb Oeyvind Brandtsegg:
Perhaps rnd31 ?
Oeyvind


2012/12/13 Alex Weiss <alexweiss86@gmail.com <mailto:alexweiss86@gmail.com>>

    Hi list

    Does anybody know after how many samples rand repeats? I seem to be
    getting very consistent loops of about 65,000 samples length. Am I
    right in assuming that rand repeats after 65,536 samples? If so, are
    there other random number generators with a longer period?

    Thanks,
    Alex




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2012-12-13 20:36
FromOeyvind Brandtsegg
SubjectRe: [Csnd] rand and repetitions
I never actually thought of asking, good question :-)
Oeyvind





2012/12/13 Alex Weiss <alexweiss86@gmail.com>

Could have sworn I read the manual... Oh well, another case of RTFM. Thanks, Joachim and Oeyvind!

Out of curiosity: why is it 31 instead of 32 bits?

Alex

On Dec 13, 2012 1:44 AM, "joachim heintz" <jh@joachimheintz.de> wrote:
yes. and there is also an optional parameter in rand. the manual says:
"isel (optional, default=0) -- if zero, a 16-bit number is generated. If non-zero, a 31-bit random number is generated. Default is 0."

        j

Am 13.12.2012 08:42, schrieb Oeyvind Brandtsegg:
Perhaps rnd31 ?
Oeyvind


2012/12/13 Alex Weiss <alexweiss86@gmail.com <mailto:alexweiss86@gmail.com>>

    Hi list

    Does anybody know after how many samples rand repeats? I seem to be
    getting very consistent loops of about 65,000 samples length. Am I
    right in assuming that rand repeats after 65,536 samples? If so, are
    there other random number generators with a longer period?

    Thanks,
    Alex




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp