New modules by CV funk

run it under address sanitizer. It’s easy to use and finds things.

1 Like

Here’s my Windows stack trace:

Thread 35 received signal SIGFPE, Arithmetic exception.
[Switching to Thread 11360.0x1c68]
0x00007ffedb2c5bdc in Syncro::process (this=0x12b31d60, args=...) at src/Syncro.cpp:290
290                                 if (masterClockCycle % lcmWithMaster[j] == 0) {
(gdb) bt
#0  0x00007ffedb2c5bdc in Syncro::process (this=0x12b31d60, args=...) at src/Syncro.cpp:290
#1  0x00007ffee41a6684 in rack::engine::Module::doProcess (this=0x12b31d60, args=...) at src/engine/Module.cpp:345
#2  0x00007ffee41a2201 in rack::engine::Engine_stepWorker (that=0x7fff13c787f0, threadId=0) at src/engine/Engine.cpp:316
#3  rack::engine::Engine_stepFrame (that=<optimized out>) at src/engine/Engine.cpp:350
#4  rack::engine::Engine::stepBlock (this=<optimized out>, frames=<optimized out>) at src/engine/Engine.cpp:509
#5  0x00007ffee4132340 in rack::audio::Device::processBuffer (this=this@entry=0x71ac040, input=input@entry=0x0, inputStride=1967223890, output=output@entry=0x67529f0,
    outputStride=2, frames=frames@entry=256) at src/audio.cpp:45
#6  0x00007ffee4600d5c in rack::RtAudioDevice::rtAudioCallback (outputBuffer=0x67529f0, inputBuffer=0x0, nFrames=256, streamTime=<optimized out>,
    status=status@entry=0, userData=userData@entry=0x71ac040) at src/rtaudio.cpp:213
#7  0x00007ffee45cce75 in RtApiWasapi::wasapiThread (this=0x71ac1b0) at C:/_Projects/VCVRack/V2/Rack_250/dep/rtaudio/RtAudio.cpp:5374
#8  0x00007ffee45cee6e in RtApiWasapi::runWasapiThread (wasapiPtr=<optimized out>) at C:/_Projects/VCVRack/V2/Rack_250/dep/rtaudio/RtAudio.cpp:4982
#9  0x00007fff21d07344 in KERNEL32!BaseThreadInitThunk () from C:\WINDOWS\System32\kernel32.dll
#10 0x00007fff21ee26b1 in ntdll!RtlUserThreadStart () from C:\WINDOWS\SYSTEM32\ntdll.dll
#11 0x0000000000000000 in ?? ()

Indeed a div by 0 exception, using a DEBUG line I get:

[337.742 debug src/Syncro.cpp:290 process] lcmWithMaster[1] = 0

Something like this perhaps?

if (lcmWithMaster[j] != 0 && (masterClockCycle % lcmWithMaster[j] == 0)) {

Additional thing to note is the first time (after adding the module to rack) the values are all 0

[301.851 debug src/Syncro.cpp:290 process] lcmWithMaster[1] = 0
[301.851 debug src/Syncro.cpp:290 process] lcmWithMaster[2] = 0
[301.852 debug src/Syncro.cpp:290 process] lcmWithMaster[3] = 0
[301.852 debug src/Syncro.cpp:290 process] lcmWithMaster[4] = 0
[301.853 debug src/Syncro.cpp:290 process] lcmWithMaster[5] = 0
[301.853 debug src/Syncro.cpp:290 process] lcmWithMaster[6] = 0
[301.853 debug src/Syncro.cpp:290 process] lcmWithMaster[7] = 0
[301.854 debug src/Syncro.cpp:290 process] lcmWithMaster[8] = 0
[302.350 debug src/Syncro.cpp:290 process] lcmWithMaster[1] = 1
[302.351 debug src/Syncro.cpp:290 process] lcmWithMaster[2] = 2
[302.352 debug src/Syncro.cpp:290 process] lcmWithMaster[3] = 4
[302.352 debug src/Syncro.cpp:290 process] lcmWithMaster[4] = 8
[302.352 debug src/Syncro.cpp:290 process] lcmWithMaster[5] = 16
[302.352 debug src/Syncro.cpp:290 process] lcmWithMaster[6] = 32
[302.353 debug src/Syncro.cpp:290 process] lcmWithMaster[7] = 64
[302.353 debug src/Syncro.cpp:290 process] lcmWithMaster[8] = 128
2 Likes

Ah ha! I think this might be it. I think you found it! I checked very carefully through each division and each array address, but I totally forgot about modulo.

I also moved all the display logic and string logic into draw, something about avoiding ‘priority inversion’. Seems to use less CPU, so hopefully it does’t add a new problem from code rearrangement.

Thanks so much everyone for your help @Steve_Russell @Squinky @Bloodbat @pachde and others!

5 Likes

I didn’t actually notice anything about a crash. I am using windows 7 and I have tested this module thoroughly. That was your first version “CVfunk-2.0.6-d7e4d54-win-x64.vcvplugin” 611KB. Your patch “CV funk Syncro Clock” also ran smoothly. In any case a great module. Thank you.

1 Like

CV funk v2.0.7

New set of utility modules:

Nona:

A 9-channel CV gain/offset utility mixer.

Decima:

A 10-channel gate sequencer with per-step probability.

Morta:

A single-knob macro-controller utility with 16 simultaneous outputs in different ranges. A CV to the input animates the knob.

7 Likes

CV control on Decima probability would be cool

2 Likes

Hey I love Signals, its a great mini scope that has so many inputs.

I just upgraded or whatever you call 2.5.2 , but Signals now draws so lightly that I cant read it without zooming in on just the Signals module.

No biggie, I’m on Win 10 VCV Pro 2.5.2

1 Like

Thanks for the feedback @cubistguitar

I changed a couple things in the recent Signals (v2.0.6). One change was to make it handle changing sample rates properly, another was to make it refresh the window much more smoothly.

Then I thinned out the lines a bit because higher frequency stuff turns into a solid block with such fat lines. But I guess I went too far! It looked fine on my laptop, and once it was deployed to Library I tried it out in full-screen mode for the first time – I could barely see the scope, as you described. Sorry about that! I should really start using VCV in full-screen, but I usually have it half-screen while I try to dev.

I have 3 new modules in the pipeline (v2.0.7), and Signals will once again have nice fat lines in the next Library update.

4 Likes

You are really on a roll, best of luck with your move.

2 Likes

@auxmux Thanks for the suggestion! I had considered adding CV to everything, but adding another 16 input jacks took up a lot of space and made it too cluttered.

You can use the stoermelder CV-MAP module to CV those parameters pretty easily, however: VCV Library - stoermelder CV-MAP

Or another option that is kinda useful is the stoermelder Transit module: VCV Library - stoermelder TRANSIT With this you can set different clock divisons/multiples as presets on the Transit, and then CV to switch between them. This would allow you to sequence different rhythms on Syncro.

2 Likes

All good @codyge . Using Syncro with CVMap is great. It’s my new favorite clock generator / divider. Awesome work.

Need to work my way through the rest of the suite.

1 Like

@codyge It would be cool if Morta supported polyphonic inputs and outputs.

3 Likes

I’ve been having a ton of fun with Pressed Duck lately, it’s great for daft punk-esque drums. Would it be possible to maybe get an expanded version with 8 channels and a send/return? I currently have to use a janky setup with mixmaster to get reverb on each drum channel.

2 Likes

Super useful stuff. Big thanks! :slight_smile:

1 Like

Thanks for the suggestions! @auxmux and @officialdjglitch :slight_smile:

If you want more channels of mixing, I can suggest chaining one Pressed Duck into the next via the Duck input. You can then duck your sub-mix into a main mix.

As for send/returns. I’m not sure how to implement that for so many channels without making a giant thing. But I’ll think on it! If I could somehow figure out how to resize the module via the right-click menu, it would be cool to pop out a drawer that had all the send/returns… or something like that.

Re: Polyphony. None of my modules are polyphonic at the moment. But it would be nice if I could get my mixer to do what the BogAudio and others do, which is to take a poly-input and set them automagically to the respective channels. Likewise for my Strings… etc patching out a poly should take the whole chord ideally. I know that @Squinky has implemented this type of poly in many of his modules in a nice way, and I should just study his code for that and figure it out… but right now I have a bunch of other projects on my plate, so I’ll leave it as a future goal.

Why not add an expander?

CV funk v2.0.8 prerelease

Hi all! I have been working on an update to my plugin. The update contains many new features, as well as a new module!

I would really appreciate any feedback or testing you can offer. This update has a lot of new features, and thus possibility of new issues arising.

New Module! Step Wave

StepWave is an experimental 8 step sequencer with variable shapes and beats per step and something I’m calling rhythmic displacement. The rhythmic displacement allows you to shift the edges of a stage forwards/backwards by up to 50% of a stage length. Since it does this, it has to first measure the length of a clock interval before playing the first stage (a minor drawback), but it allows you to make very interesting shapes.

The SHAPE knobs smoothly transitions between a bunch of different preset shapes, with the standard sequencer step as the default. The BEATS knobs lets you set a number of subdivisions for each stage. By default BEATS outputs to the GATE output, and the SHAPE outputs to the CV output. On the left there is an option to link the two, this will then repeat a shape within a stage by the number of beats specified.

Each stage has a dedicated CV input that overrides and animates the slider. If you select the TRACK option, the output CV will track with the inputted CV for each stage, otherwise it samples at the beginning of the stage.

On the right there is a SLEW knob, this allows you to apply slew to the wave. The maximum slew-time is scaled based on the stage length.

If you clock the module faster than 20Hz it automatically engages 8x supersampling and antialiasing. The CPU usage will jump a bit as a result.

The display at the top outputs in realtime the shape, slewed output, and gate patterns, making it easier to fine-tune what you want.

Ouros in poly

Ouros has a big update and now supports polyphony. To cut down on its CPU hogging, I implemented some Simd vectorization. It seems to work! The CV inputs support poly, and also mono-CV inputs will control all the channels.

Morta in poly

Morta now supports polyphony. The knob and display reflect the top channel. Also, I added a pass-through output to the right of the display, making it easier to use.

Penta Sequencer

Penta Sequencer gets a new CV input, right in the middle of the SLEW knob. It’s perhaps controversial! But with no space on the panel, this was where it had to go. If enough people hate it I can remove it. :wink:

Hex Mod

I really like Hex Mod, but after using it a bunch I found sometimes I don’t want -5…5V. Now it has a Range knob and CV, so you can dynamically adjust the output range of all the 6 outputs at once. This has a cool side effect as it’s another way it can self-modulate to get interesting CVs.

Decima

New is a context menu option to have the individual gate outputs reflect the sub-output of the main sequencer. In some contexts you want a gate per step, but sometimes it’s nice to have the probability pass through to this output.

Pressed Duck

This module has a new context menu option to let you use the DUCK input as a ducking signal even while it is muted. Then you can use the module for side-chaining but have the side-chain processed somewhere else.

Syncro

The Multiplication can now be set to 0 for each channel. This will have the effect of turning off that stage of the clock, which can be interesting in combination with the clock rotation.

Collatz

I fixed a bug with the reset function.

Envelope Array

I added a push button to the left most stage. This lets you manually trigger the envelopes for tuning, or to interact with you patch.

Nona

I added a context menu to let to topmost channel act as a VCA for all the other channels. This lets you use the top row as a master controller for the other rows.

You can find the latest release here:

21 Likes

Wow, you’re on a roll! Appreciate your work!

Ouros in poly :star_struck:

And that new module step wave looks excellent! Reminds me a little of native instruments massive. Nice addition to the library.

2 Likes

STEP WAVE is so fun…I love it!

my brain would like the colors on the display to be different, or at least a context menu to hide the one that is not reflecting the real output :broccoli:

very nice job!

2 Likes

New updates.

Thanks to everyone that provided so much helpful feedback! I fixed some issues and there’s an updated version on Git, same v2.0.8.

Step Wave

Fixed clocking issues. It might need a reset pulse occasionally to avoid getting out of phase with your clock however.

Fixed display colors to cause less brain pain. The input shape is now dark grey, and the output signal is blue, so it should look better when you apply slew.

Added labels to the inputs and outputs.

Strings

Polyphonic outputs if you put a single cable in the first output.

Poly mute outputs as well.

Pressed Duck

Polyphonic inputs if you put a poly cable into the first input.

Pan, Level CV and Mute CV also poly in the first input.

Added mute CV inputs for the main channels, also poly, so it links to Strings nicely.

Thank you for your attention! Cheers.

3 Likes