MusicTheory Docs API Toolbox GitHub NuGet
Contents

API / MusicTheory.Training

SeededRandom class

A deterministic random source (SplitMix64). The same seed always yields the same sequence, on every runtime, which Random does not guarantee.

Constructors

SeededRandom(UInt64 seed)
A deterministic random source (SplitMix64). The same seed always yields the same sequence, on every runtime, which Random does not guarantee.

Methods

int Next(int maxExclusive)
A number in 0..maxExclusive-1. maxExclusive must be at least 1.
UInt64 NextUInt64()
The next 64 random bits.
T? Pick(IReadOnlyList<T?> items)
A uniformly drawn element. Throws ArgumentException on an empty list.