square wave LFO, boolean output, frequency input Johannes Taelman BSD lfo.axh >2; } outlet_wave= ((Phase>>4)>(-param_PW))?1:0; } outlet_phase=Phase>>5;]]>
description 0)&&!gtrig){ gtrig=1; for(i=0;i
random generated pattern each time a trigger is received, positions of the pattern will be randomised or not, depending on the change parameter (in percentage, so 100 is randomising the whole pattern when triggered). Connect a control to the "length" input to set the total length of the incoming count (eg use my counter, where the max-control is controlled externally and use that max-control to control both modules' length). With the length-parameter you can set a division of the total length, repeating only a part of the random values. eg. set max to 8 and the length-knob to about 21.00 and you'll get a 1,2,3,1,2,3,1,2 repetition. The chance-parameter sets the chance that any position in the pattern will be randomised when a random-trigger is received. The pattern will be newly randomised each time you start up your axoloti. Remco van der Most BSD 100?100:chance; int trig=inlet_rndi+param_rnd; if(inlet_length>0){ length=___SMMUL((param_part+inlet_part)<<3,inlet_length<<2);} else length=param_part>>21; int TRIG=0; if ((trig>0) && !ntrig) { TRIG=1; for(i=0;i<64;i++){ get[i] = (int32_t)(GenerateRandomNumber()% (100)); if(get[i]<=chance){ val[i] = (int32_t)(GenerateRandomNumber()% (param_max));}} ntrig=1; } else if (!(trig>0)) ntrig=0; count=inlet_count-(inlet_count/length)*length; outlet_v = val[count]; if(on>0){ for(i=0;i<64;i++){ val[i] = (int32_t)(GenerateRandomNumber()% (param_max));} } on=0; outlet_rndo=TRIG;]]> no -8 -8 1696 1026