Request: Modulo Converter

To me the existence of the ‘switch’ function, with its input option of numeric to choose which layer to show, … screams for a modulo arithmetic function to riffle through a series of layers like a sprite, when a linear input is supplied. I wish someone would create one.

I think I have accomplished it 3 ways over the years: exploit the real-to-int conversion, or the “real to text” conversion, or use arcsin to give back a value between -180 and 180 from a linear input (and here usually runs into the Problem of another missing converter I’d request: there is no angle-to-real converter.)

Enclosed please find a monstrous network I once made using one of thgese to deliver something like a modulo out the other end to animate a really bad sprite (attached). some of the parameters can be tweaked to make it behave differently, A single modulo converter with a linear input would replace it (and work better)

Or, maybe I’m just missing some simpler way to hook one up.

sprite box.sifz (10.9 KB)

2 Likes

Yeah, modulo converter would be nice to have.
I also want absolute converter, you know, like ‘abs’ function in C++ because now I have to workaround it with vector length.

All of those are actually very easy to implement, I can even do it myself, but I don’t have enough time currently.

It was news a year ago(!): next development release will have a modulo converter :slight_smile:

2 Likes