back to list

Re: Rothenberg Efficiency

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

10/2/2000 5:32:17 PM

Carl,

I've uploaded the pseudo_code to

http://www.robertwalker.f9.co.uk/rtet_pseudo_code.txt

It's not that easy to describe the method; lots ideas going on sort of in
parallel - do ask if anything is unclear.

+ c-code
http://www.robertwalker.f9.co.uk/rtet.c

.exe file (Windows 95/98 console app)
http://www.robertwalker.f9.co.uk/rtet.exe

My code doesn't give correct result for block repeating scales, or equal
temperament. It was just to show the idea. I'd need to check on correct def
of RE for those to complete it.

Works for n-tet for n up to number of bits in largest available int. So
usually 32, but Visual C++ has an integer type _int64 which is 64 bits,
which was used for the console app .exe file, and in the c code.

To compile the c-code if no _int64 type is available, comment out the line:

#define USE_int64_for_BIT_SEQ_TYPES

Requires a lot of memory for scales with large numbers of notes, e.g. 8 Mb
for 20 note scales. Memory needed doubles for every extra note - the prog
will say how much memory was allocated when it starts.

However it seems to be about O(2^n) in speed rather than O(n!) - ish, so is
fast for large numbers of notes.

Would be possible to extend to et scales with up to 128 notes, or more,
fairly easily (by replacing the relevant int variables by arrays), but can't
at present see how to extend to arbitrary non et scales. In fact, rather
hope Manuel might some day find a way to combine both methods...

Robert

🔗Robert Walker <robert_walker@rcwalker.freeserve.co.uk>

10/2/2000 7:35:13 PM

Apologies,

Last para. of message 13990 should read:

Would be possible to extend to scales in n-tet with n=128, or even more, ...

I.e. scales in n-tet with n large, not scales with 128 notes!

Robert

🔗Carl Lumma <CLUMMA@NNI.COM>

10/4/2000 8:52:55 PM

Robert Walker wrote...

>I've uploaded the pseudo_code to
>
>http://www.robertwalker.f9.co.uk/rtet_pseudo_code.txt
>
>It's not that easy to describe the method; lots ideas going on sort of in
>parallel - do ask if anything is unclear.

Thanks, that looks nicely annotated. I'm really busy until Saturday,
but I'll be sure and get back to you.

-Carl