Here's my pseudo random number generator.
It is by no means very random.
; my pseudo random number generator - used for the LFO randomiser
; returns a random number in A
RANDOMIZE:pushh ; save HL
lxih, M_RANDOM ; point at the previous value (seed)
mova, m ; put the seed value into A
cpi0 ; check for seed equals zero
jnzRANDOMIZEA ; if seed is zero jump to randomizea
cma ; compliment A
movm, a ; put A back into seed
RANDOMIZEA:rlc ; rotate left through carry
adi43 ; add 43 offset
movm, a ; save in seed
poph ; load HL
ret ; return with pseudo random in A
I would be more than happy for you to suggest something better as long
as it doesn't add any CPU cycles. :-)
Mike
--- In korgpolyex@yahoogroups.com, Atom Smasher <atom@...> wrote:
>
> On Wed, 17 Sep 2008, korgpolyex800 wrote:
>
> > I knew someone would eventually suggest over clocking the CPU.
> ===============
>
> i didn't mean to imply that. i'm not eager to cook anything in my old
> gear.
>
>
> > The only problem with that is that those old CPU's had a maximum
clock
> > rate that really was the maximum clock rate. And that is the
principle
> > that applies to the old 80C85.
> =================
>
> maximum clock rate is, too a point, a function of temperature. but
no, i
> don't want to have a liquid nitrogen cooled EX800.
>
>
> > Look up tables are used for the sine wave. But I found that the fast
> > code for triangle, saw, random and PWM was to use real code.
> ==================
>
> i would still think that it would be feasible to use a distorted
wave in a
> lookup table and get "ohmygod" fast LFOs, without burdening the
CPU... but
> i'll take your word for it if that's not the case.
>
> as a crypto geek, i'm still curious how you're calculating the random
> wave, and what the period is.
>
>
> --
> ...atom
>
> ________________________
> http://atom.smasher.org/
> 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
> -------------------------------------------------
>
> "Never have the armies of the North brought peace,
> prosperity, or democracy to the peoples of Asia,
> Africa, or Latin America. In the future, as in the
> past five centuries, they can only bring to these
> peoples further servitude, the exploitation of their
> labor, the expropriation of their riches, and the denial
> of their rights. It is of the utmost importance that the
> progressive forces of the West understand this."
> -- Samir Amin,
> director of Forum du Tiers Monde in Dakar, Senegal
>