Korg Poly800/EX800 Users group photo

Yahoo Groups archive

Korg Poly800/EX800 Users

Index last updated: 2026-04-05 20:10 UTC

Thread

256 random numbers

256 random numbers

2008-12-28 by Michael Hawkins

OK ppl,

I am tired of my awful random number generator.

Now it's time to get a little help from you all.

What I need is a table of 256 numbers in the range 0 to 255 that never repeats a single value.

So that I end up with a random number lookup table 256 bytes long.

Anyone want to help me with it?

Just 256 numbers in random order with values in the range 0-255, no repetitions.

Wake me up in the morning! :-)

Mike.




________________________________
Show quoted textHide quoted text
From: Alexandre Souza <alexandre-listas@...>
To: korgpolyex@yahoogroups.com
Sent: Saturday, December 27, 2008 10:34:24 PM
Subject: Re: [korgpolyex] HAWK-800 software update


> That would be in the "miracle" category. That is, sorry, aint gonna 
> happen.

Michael, this is VERY EASY to do, but I see no need for that. It would 
add only a FT-232 and a USB-B Female connector. But WHY? Better use a $17 
MIDI-USB cable :o)

Alexandre

RE: [korgpolyex] 256 random numbers

2008-12-28 by LARRY HAWKE

Okay, I'll just get the cable. ;^)

Gor

To: korgpolyex@yahoogroups.com
Show quoted textHide quoted text
From: korgpolyex800@yahoo.com
Date: Sat, 27 Dec 2008 20:24:40 -0800
Subject: [korgpolyex] 256 random numbers


OK ppl,

I am tired of my awful random number generator.

Now it's time to get a little help from you all.

What I need is a table of 256 numbers in the range 0 to 255 that never repeats a single value.

So that I end up with a random number lookup table 256 bytes long.

Anyone want to help me with it?

Just 256 numbers in random order with values in the range 0-255, no repetitions.

Wake me up in the morning! :-)

Mike.

From: Alexandre Souza e-secure.com.br>
To: korgpolyex@yahoogroups.com
Sent: Saturday, December 27, 2008 10:34:24 PM
Subject: Re: [korgpolyex] HAWK-800 software update

> That would be in the "miracle" category. That is, sorry, aint gonna
> happen.

Michael, this is VERY EASY to do, but I see no need for that. It would
add only a FT-232 and a USB-B Female connector. But WHY? Better use a $17
MIDI-USB cable :o)

Alexandre




Re: [korgpolyex] 256 random numbers

2008-12-28 by Atom Smasher

On Sat, 27 Dec 2008, Michael Hawkins wrote:

> Just 256 numbers in random order with values in the range 0-255, no 
> repetitions.
=======================

  http://smasher.org/tmp/shuffle-random.tgz
  http://smasher.org/tmp/random.tgz

each of those gzipped tarball files contains 100 TXT files.

the first TGZ contains what you're asking for; lists with a random 
"shuffle" of 0-255 with each value appearing only once per list.

the second TGZ contains what i think is more random; not a shuffle. so in 
each file a given value may appear more then once, or not at all, with a 
probability of... oh, what the hell am i talking about???

in any case, i suspect that a few files in each collection will stand out 
as being not so great, most will be OK, and *maybe* one or two will stand 
out as being better than the rest.

some crazy ideas to extend the period beyond 256 steps... done 
iteratively:
 	read 0-255
 	read 127-0, 255-128
 	read 0-255, odd only
 	read 0-255, even only
 	read 255-0, odd only
 	read 255-0, even only

or... maybe it would be better to set a counter (1-8?) every time the 
table is read, and use that value as a "skip". so the first time the table 
is read it reads every value, the second time it reads every 2nd value... 
the 8th time it reads every 8th value, the 9th time it reads the table it 
reads every value... bonus points if that can be combined with an offset 
start to make the period more than an order of magnitude larger than the 
list ;)

 	offset 0, skip 1
 	offset 0, skip 2
 	...
 	offset 0, skip 7
 	offset 0, skip 8
 	offset 3, skip 2
 	offset 3, skip 3
 	...
 	offset 3, skip 7
 	offset 3, skip 8
 	offest 5, skip 2
 	offset 5, skip 3
 	...

i guess being a crypto-geek tends to make one a snob when it comes to 
random numbers.

the "random" LFO will *always* be free-running...?


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"I would say the best moment [of my presidency] was when I caught a
 	 seven-and-a-half pound large mouth bass on my lake."
 		-- George "dubya" Bush, 5 May 2006
 		http://www.whitehouse.gov/news/releases/2006/05/20060507-2.html

Re: [korgpolyex] 256 random numbers

2008-12-28 by Gordon JC Pearce MM3YEQ

Michael Hawkins wrote:

> So that I end up with a random number lookup table 256 bytes long.
> 

You could squeeze a good pseudo-random number generator into 256 bytes. 
  Is there a reason why you want a lookup table?

Gordon

Re: [korgpolyex] 256 random numbers

2008-12-28 by Atom Smasher

On Sun, 28 Dec 2008, Gordon JC Pearce MM3YEQ wrote:

> You could squeeze a good pseudo-random number generator into 256 bytes. 
> Is there a reason why you want a lookup table?
=====================

the CPU doesn't have a good way of generating random numbers... it takes 
several clock cycles (6? 8?) to generate a single random value and, IIRC, 
that's with a not-so-great period or quality.


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"I never gave them hell, I just tell the truth
 	 and they think it's hell."
 		-- President Harry Truman, 1956

Re: [korgpolyex] 256 random numbers

2008-12-28 by Michael Hawkins

Thanks Atom,

I chose the very first file. Any shuffle of 256 numbers is better than the little pitiful PSRN generator that I've been using.

All LFO sample and hold functions have free running or not free running modes.

At the moment, the sequencer must be running for the two sample and holds to work.

I am working on getting the sequencer clocked sample and hold to operate regardless of the mode of the sequencer.

Obviously the sequencer loop sample and hold requires that the sequencer be running.

Mike.

Show quoted textHide quoted text
From: Atom Smasher
To: korgpolyex@yahoogroups.com
Sent: Sunday, December 28, 2008 3:49:20 AM
Subject: Re: [korgpolyex] 256 random numbers

On Sat, 27 Dec 2008, Michael Hawkins wrote:

> Just 256 numbers in random order with values in the range 0-255, no
> repetitions.
============ ========= ==

http://smasher. org/tmp/shuffle- random.tgz
http://smasher. org/tmp/random. tgz

each of those gzipped tarball files contains 100 TXT files.

the first TGZ contains what you're asking for; lists with a random
"shuffle" of 0-255 with each value appearing only once per list.

the second TGZ contains what i think is more random; not a shuffle. so in
each file a given value may appear more then once, or not at all, with a
probability of... oh, what the hell am i talking about???

in any case, i suspect that a few files in each collection will stand out
as being not so great, most will be OK, and *maybe* one or two will stand
out as being better than the rest.

some crazy ideas to extend the period beyond 256 steps... done
iteratively:
read 0-255
read 127-0, 255-128
read 0-255, odd only
read 0-255, even only
read 255-0, odd only
read 255-0, even only

or... maybe it would be better to set a counter (1-8?) every time the
table is read, and use that value as a "skip". so the first time the table
is read it reads every value, the second time it reads every 2nd value...
the 8th time it reads every 8th value, the 9th time it reads the table it
reads every value... bonus points if that can be combined with an offset
start to make the period more than an order of magnitude larger than the
list ;)

offset 0, skip 1
offset 0, skip 2
...
offset 0, skip 7
offset 0, skip 8
offset 3, skip 2
offset 3, skip 3
...
offset 3, skip 7
offset 3, skip 8
offest 5, skip 2
offset 5, skip 3
...

i guess being a crypto-geek tends to make one a snob when it comes to
random numbers.

the "random" LFO will *always* be free-running. ..?

--
...atom

____________ _________ ___
http://atom. smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
------------ --------- --------- --------- --------- -

"I would say the best moment [of my presidency] was when I caught a
seven-and-a- half pound large mouth bass on my lake."
-- George "dubya" Bush, 5 May 2006
http://www.whitehou se.gov/news/ releases/ 2006/05/20060507 -2.html


Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.