sam icon indicating copy to clipboard operation
sam copied to clipboard

Comment: "Frequency" data is actually a stride value

Open dcuny opened this issue 4 years ago • 0 comments

The table frequencyData values are referred to in the comments frequency values, which isn't strictly true.

They're actually stride values. Per your comments in the rendering sections, the original version of SAM used a pre-calculated sine table instead of calling the sin() function.

By using a stride value, SAM is able to find the next sine value for each formant simply by adding the stride value to the table index (and, of course, wrapping at the end of the table).

dcuny avatar Jan 22 '21 18:01 dcuny