MODULO bespoke unit please

Hello dear 301ers,
i’m working at an LFSR noise generator suitable for both pseudo random gates and pseudotonal noise voices.
it sounds great already but for some reason my implementation has flaws: on each octave some of the tunings mess the circuit and freezes it, you have to change key and send another gate to reset it.
not an enormous problem but it is preventing the playability of the instrument.

i’d like to try a different implementation based on Salamander Anagram’s nintendo noise oscillator on reaktor (primary level), but to try that i’d need a Modulo unit.
@odevices stated that a wavefolder performs modulo operations on signals but i have no idea how to set it and wether or not it will work in my system. I’d really love something on the lines of Brian’s Rational VCA or @Joe’s Maths and Logics units.
by the way Joe i found a bug in Logics: it doesn’t remember the chosen logic operator when you load up a preset\CU containing it.

thanks to anyone that might come up with suggestions or actual solutions!

Did I say that? :thinking: Seems more likely that I would say modulo operations yield a certain type of wavefolding.

FYI, the Fold Unit does not use or implement the modulo operation. It only folds a signal once (at the the threshold).

1 Like

I thought about trying to add a % op to the Maths bespoke unit in Accents more than once. Seems to me like there are challenges and quirks with doing so.

There’s no Divide DSP object in the SDK. Why? In a continuous (sampled) bipolar system running at 48 or 96kHz, you’re likely to encounter zeros in the divisor quite often. Since anything divided by zero is undefined, what do you do with that?

Ignoring that for now, the other thing is that a % op is going to return a whole number. Generally audio signals have values in the range of -1.0 to 1.0. If you send anything greater than 1.0 to a hardware output it will get limited (clipped), and then the AC coupling will ultimately try to zero it out. That’s not to say the 301 can’t handle a value > 1 internally. It can. But it could be a pretty confusing unit, even if you could somehow get around problem #1.

So I’ve kind of concluded a generic % op is not a good middle layer candidate. Probably something you’d want to implement inside a DSP object itself, and with a more specific use case that limits the ranges of inputs it deals with, and conditions the output to something more sensible.

The bug in Logics has already been reported. On my list. Thanks! :slight_smile:

1 Like

I think this was the source of the confusion here.

1 Like

aaaaah, ok, now i get where i was mistaken, thanks @Joe and @odevices , i was in the middle of analyzing every possible combination to see if i could use the Fold unit for modulo eheheheh, you saved me a couple of hours of banging my head on the walls for nothing :smiley: meanwhile i made friend with the Fold unit and i’m surely gonna explore what i can conjure up with that in my pursue for chaotic systems :slight_smile:

i get what you are saying @Joe about the divide operation.
i’m now used to think in terms of numbers inside the 301 so i wouldn’t mind but i can see how perhaps new users might get confused by stuff like that.
thing is i’m knee deep into using simple unipolar pulses as source for complex systems (i’m working also on a synth voice inspired by Mangrove, using your comparator to extract triggers from a tri core and using that to trigger short envelopes\skewed sine, already got some formant action going on), trying to understand more and more how can i treat them as bits in primitive digital circuits, like i did on the Bengiolino…and division\modulo is often important… division by integer i can do with the rational VCA (great addition Brian!!!) but i cannot think of a way to calculate modulo with what i have,

anyway, thanks both for the infos!

p.s.: @odevices is there a way to impose execution order in a chain other that with delays? i wanted to check wether i can improve the registers efficiency given that i use them for a lot of different things nowadays… (anyway i know: i have to study lua and start making those tools in the middle layer :slight_smile: )