uniform i

uniform distributed (white) noise, k-rate generation. Range 0..(n-1)
Author: Johannes Taelman
License: BSD
Github: rand/uniform i.axo

Inlets

bool32.rising trigger

Outlets

int32 random value

Parameters

int32 max

Declaration
int32_t val;
int ntrig;
Init
val = 0;
ntrig = 0;
Control Rate
if ((inlet_trig > 0) && !ntrig) {
  if (param_max)
    val = (int32_t)(GenerateRandomNumber() % (param_max));
  else
    val = 0;
  ntrig = 1;
} else if (!(inlet_trig > 0))
  ntrig = 0;
outlet_v = val;

Privacy

© 2024 Zrna Research