Suggestion for a "voltage wrapper" module! (For developers)

Hey :slight_smile:

I have a suggestion for a module that I’ve thought about. I did make a few modules in the past, but it’s been a while and my dev environment is on an old computer, that doesn’t work too well anymore.

So I thought that I’d suggest it to some of the developers who are currently active, maybe they would like to try make something :slight_smile:

I looked in the library and did not find any modules that does this and I also made a post about it on Facebook, in the VCV group. There were some good suggestions, but none of them worked well and would require a lot of patching. Here is the post from Facebook:

I do think the code can be fairly simple. I tried this out in Pure Data and it works pretty well, here is an image of the basic concept: Screenshot 2022-10-15 at 18.38.36

The algorithm is: ((float input * 1.000.000) % (float wrap value input * 1.000.000)) / 1.000.000 = Result

The reason to multiply with a million, is so we get integers, which we can then apply modulo operation to. It should work, as floats have 7 digits resolution, right?

There should probably also be some conversion to and from volts, but never really got into that side of it, but I’d assume that wouldn’t be too hard.

If anyone feels like having a go at this idea and feel like adding it to their library, I would be grateful :slight_smile:

Thanks in advance!

I think Fence does this :

modulomagic too

Fence gives some kind of weird output. When fed a linear ramp going from 0V tol 10V I get this output:

It seems like it doesn’t wrap all the way to zero. I tried the different modes, but none of them wraps as I hoped for.

Or maybe I am just using it wrong, that’s also a pretty likely reason…

You’re right it does not do what you want, it should fall back to zero but AFAIKT it does not. :man_shrugging: :thinking:

1 Like

For the Modulo Magic, I am also not getting the right results.

You have to set numerous parameters to get a single useful value. Then if you want to change it to another meaningful setting, you have to change several parameters. I’d like to set different values on the fly, for example by a random input.

It would just be a lot easier to be able to set a wrap/modulo value and then wrap it every time it reaches that value, with a single knob/input.

Out of interest what was wrong with the ShapeMaster solution I posted for this? You can map any input voltage to any output voltage.

In CV playhead mode, the X axis is input voltage and the Y axis is output voltage. You can create whatever maps you want with a high degree of accuracy. You can right click on nodes to enter their positions precisely.

This was the solution to original post on FB

There’s little to no patching required other than a signal in and a signal out. You can add more of these slope shapes in series to make it work throughout the range.

EDIT: I can see how this would not work if you want to randomise your wrap value on the fly though. What you could do is save some different wrap values as shapes then sequence them.


Yes, that’s the issue, I’d like to wrap values at different stages. Let’s say I’d like to have 16 wraps out of 10v, which I’d like to be able to access at any given time: 10 / 16 = 0.625

The 16 wrap values, by 0.625 increments would then be these values: 0.00 0.625 1.25 1.875 2.5 3.125 3.75 4.375 5.0 5.625 6.25 6.875 7.5 8.125 8.75 9.375

What I did now was just set up 16 knobs, with those exact values, then fed into a switch and then I use mod source to select any of the 16 sweet spots.

But yeah, it’s ridiculously complicated setting this up in VCV, because of a lack of phase/voltage addressed modules. In Pure Data and any other code language this is super easy to do.

If at least Prototype would be fixed to work with VCV2, then I could try making it in PD and just use Prototype.

Back to the drawing board again.

@ soundismovement

This is the closest yet!

I did make something almost work last night. It might look good in the scope, but it’s does not sound like it’s precise. I will do more research on this module today. Actually really a great module, have not heard or seen that before, I can see many use cases for it :slight_smile:

ShapeMaster in CV playhead mode is voltage addressed.

When you say you want 16 wrap values “0.00 0.625 1.25 1.875 2.5 3.125 3.75 4.375 5.0 5.625 6.25 6.875 7.5 8.125 8.75 9.375” - are they separate, such that if the wrap is 0.625, then any input voltage above that outputs zero, or is this more of a ‘sawtooth’ pattern where the voltage wraps at 0.625v intervals throughout the 10V range?

ShapeMaster can do both. In the first scenario you can save out the 16 different wrap settings as shapes. You can then sequence them but only as prev/next, not random addressed.

In the second scenario you can set up all 16 wraps in a single shape.

We’ve actually just made a change in ShapeMaster based on your original request so that horizontal values of nodes in CV playhead mode can be entered in volts (so you could enter 0.625 or 6.875 etc - let me know if you want a build of that.

Another option that would allow randomisation might be to use 2 ShapeMasters, have each of your 16 wraps set up on a separate ShapeMaster channel (8 per instance) and then put the 16 CV outs into a randomly addressed switch. Perhaps not the most economical solution though and maybe similar to what you are doing with knobs already.

1 Like

I mean when the phasor reaches 0.625 it wraps around to zero, When it reaches 1.25, it wraps around again to zero and so on. Which would be kind of the same as setting the sequencer length to 1 step, 2 steps, etc.

I also kind of would like the random addressing, it’s a big part of what I am trying to do with the voltage addressed sequencer from Nysthi. Spend a lot of time of figuring that one out lately. It seems like it’s one of the only “classic style” sequencer in VCV that takes voltage, with standard sequencer layout, triggers and 3 voltage rows.

Wow, cool that you implemented it. Now I have to try it out. If you make an update I’ll happily try it out, but I’d have to rely fully on your images here, cause I am not 100% how to approach it.

I love Shapemaster, but I do also find it a bit complicated, not ment in a bad way, it can do so much. I use it mostly as an envelope.

After playing with the Formula One module a bit, I managed to get pretty much the result I was looking for. Also found solutions for other issues I was trying to solve.

I need to look more into both of these modules, I guess. Always nice to try different ways of doing the same thing :slight_smile:

Thanks for chiming in :slight_smile:


OK - well if I understand right that’s what I showed in the lower image in my post above. Horizontal axis is (input voltage) 0V on left up to 10V on right, divided into a grid of 16. From 0 to 0.625V it follows the input voltage then wraps to 0. Then when input voltage is between 0.625V and 1.25V, output voltage is between 0 and 1.25V, then it wraps to 0 again and so on.

I can send you a build - what platform are you on and do you have the free ShapeMaster or the Pro?

Agree that if you have a formula for what you want, Formula One is probably a good route to go though! :slight_smile:

1 Like

Yes that’s about it :slight_smile:

Thanks, I’d like to try. I use free Shapemaster for now. I am on M1 Macbook, Big Sur 10.6.5.