JMSL tutorial: Weighted Integer Sequence @doctornerve
JMSL tutorial: Weighted Integer Sequence  @doctornerve
Uploaded December 2024 | Updated December 2026, 3 hours ago
The WeightedIntegerSequence is a SequenceGenerator whose next() method returns a randomly chosen integer 0..N-1 whose probabilities of being chosen are weighted by an array of length N. So with an array { 1, 1 } would
return 0 roughly half the time, and 1 roughly half the time. The array { 2, 0, 1 } would return 0 roughly 2/3 of the time, would never return 1, and would return 2 roughly 1/3 of the time.

This example uses a WeightedIntegerSequence to generate a random walk, where the intervals -1, 0, and 1 are weighted. The user can control the
weighting by entering new relative weights in the TextFields and clicking the "apply" button.

Thanks to Larry Polansky for suggesting that WeightedIntegerSequence be part of JMSL.
JMSL tutorial: Weighted Integer SequenceLed Zeppelin - The Rover - guitar solo play-throughLarry Polansky - intro to Giacomo Fiores guitar performanceAlice Cooper B.B. on Mars performed by Pretties For You NYCQuit Without Saving - Kathleen Supové, Dafna Naphtali, Nick Didkovsky100 Duets for Piano and Electric Guitar, No 83Vomit Fist - live at El Bunker Del Diablo, Mar 1, 2025Asystole at Subterranean Dissonance 2024-02-09JMSL tutorial: Equal Tempered TuningAlgoMusic lecture 3 recap part 1: Syntonas Double, Fader, 4x16Grid, rand, comparePROFANE RIDDLES - What Is Revealed... (visualization video)100 Duets for Piano and Electric Guitar, No 1
doctornerve |

JMSL tutorial: Weighted Integer Sequence

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER