Skip to content

Commit

Permalink
docs: keep mostly as-is
Browse files Browse the repository at this point in the history
  • Loading branch information
mxdvl committed Oct 25, 2024
1 parent 16dffbf commit 8a8baa7
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { useId, useMemo } from 'react';

/**
* Create a [`Generator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator) for deterministic series of numbers
* which are guaranteed to be contained inside a specific range.
*
* Based on a pseudo random number generator generator ([linear congruential
* Pseudo random number generator generator ([linear congruential
* generator](https://en.wikipedia.org/wiki/Linear_congruential_generator)).
* Seeding with an audio file URL ensures that a specific file always
* returns the same (fake) series of bars.
*
* I'll be honest, I don't fully understand it, but it creates a pseudo random
* number generator based on a seed, in this case a string.
*
* It's deterministic, so calls to the function it returns will always return
* the same results, given the same seed.
*
* Copilot helped me with it...
*
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator
*/
function* waveformGenerator(
/** the URL of the audio source file */
Expand Down

0 comments on commit 8a8baa7

Please sign in to comment.