uniform trig fp

uniform distributed (white) noise, triggered generation. Range 0-64
Author: Johannes Taelman
License: BSD
Github: phi/rand/uniform trig fp.axo

Inlets

bool32.rising trigger

Outlets

frac32.positive rand

Declaration
uint32_t val;
int ntrig;
Init
val = (int32_t)(GenerateRandomNumber()) >> 4;
ntrig = 0;
Control Rate
if ((inlet_trig > 0) && !ntrig) {
  val = (uint32_t)(GenerateRandomNumber()) >> 5;
  ntrig = 1;
} else if (!(inlet_trig > 0))
  ntrig = 0;
outlet_rand = val;

Privacy

© 2024 Zrna Research