This results in a pseudo-random bit sequence, 32767 steps long when Mode flag is clear, otherwise 93 steps long (the particular 93-step sequence depends on where in the 32767-step sequence the shift register was when Mode flag was set).

I did a brute force checking of this fact, using the algorithms supplied on the wiki. It seems there are 31 "seed values" that result in a 31 step sequence instead of 93.

The code can be found here. I'm just making sure this is correct. If so, the wiki should be adjusted to mention it.

Does that mean that there's precisely one 31-period loop, and all the other possible states of the LFSR are the null state (period 1) and 352 different 93-period loops?

Hm. Yes, that does seem to be the case.There is one 31-period sequence that contains the 31 states (in decimal) 10519 12211 13190 13602 14442 16078 1700 17234 17910 18622 19994 21039 21643 22979 24423 25001 26381 27205 27873 28884 30320 3052 31544 32156 3400 4477 6105 6801 7221 8955 9311, and the FFT of same implies that the resultant waveform is just an impulse train (since the 3rd, 6th, 9th, &c harmonics are all the same magnitude and all others are 0)

There are 209 total different tone colors the tonal noise can make (including the silent null state) :$ ./tonal | cut -f 1 -d : | sort -n | uniq | wc -l 209The 352 different 93-period loops break down into 207 tone colors; of those 62 are unique, and the other 145 exist twice (forwards and backwards bitstreams?) There seems to be no obvious correlation between volume of fundamental or presence/absence of 31st harmonic (whose presence is, notably, boolean)

I'm not sure this is necessary to have on the wiki like that, because it is canonically 93 steps, with the 31 step sequence being more of an artifact of having a weird seed (especially moreso because only one seed generates it, it just feels like more attention is being brought to it than necessary). Maybe put it as a sidenote instead?

Technically speaking, there are 31 seed values that jump you into the 31-step loop.

Drag wrote:

Maybe put it as a sidenote instead?

I agree that it should be mentioned as a quirk, since only ~0.09% of the seed values send you along the 31-step path. I'll be whipping up a little test later to make sure this does indeed happen on hardware in the mean time (It almost certainly does).

Well, from a musical point of view, the 31-period doesn't matter, but the largely unpredictable ratio of harmonics does. Even just among the 93-period sounds there's a wide variety of different strengths of each of the first three harmonics:

Attachment:

graph-of-tonal-noise-harmonics.png [ 8.91 KiB | Viewed 2544 times ]

Legend: Purple: the period 31 defective case, right next to some of Green: the set of period 93 that only occur once, producing an outline around Blue: the set of period 93 that occur twice, making a wavy surface. Red: the set of period 93 that have a loud 31st harmonic

I made this graph using gnuplot, source files attached. In the actual program you can drag around the camera to actually be able to visualize the surface.

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum