Plugins: Markov chain sequencer / switch and 2G geometric transforms

During the past few days, I have been starting to develop some plugins for VCV rack. The main goal was to develop plugins for my own needs but now I am wondering whether these tools could be useful for the community and if they are worthwhile sharing.

Two plugins deals with 2D geometric transform. My main motivation was to use them with the “chaotic lfo” developed by Wiqid (Bennie De Groot). I often use a combination of 2 output that describe a curve in a 2D plane and often want to apply geometric transformation on these curves such as 2D rotation or even 2D affine transform. I was using “Formula” from Frank Buss to that end, but I thought that it would be useful to have a compact module for this task. So, I implemented 2 plugins: 2DRotation and 2DAffine.

2D%20Transforms

The inspiration for the third module comes from various discussions related to chord progression on the southpole website (I do not remember exactly where) and on some Reaktor forum (Playmodes and ColB users in particular). The idea is to implement a tool that would allow one to rather easily define chord progression graphs as this one.

Chord%20progression

So, I have worked toward the definition of a sequencer/8-1 switch based on simple Markov chains. It allows one to define 8 states and their associated transition probabilities. It can be used for chord progressions but it is also appropriate for any chain of events.

MarkovSeq

The code can be found at: GitHub - philippesalembier/SckitamVCV: Plugin for VCV Rack I can provide the Mac build: Dropbox - File Deleted - Simplify your life

I am sending this post to get some ideas on whether these plugins are useful for the VCV community (maybe tools with similar functionalities are already available) and also to get some feedback on how improve their design (these are my first plugins and I am not at all an expert on plugin development).

Thanks in advance.

16 Likes

Unless games do Mr Chainkov (though I’ve never managed to get interesting results from it, though othe people have). Also, more modules = better.

I was reading up on the Markov chain just the other day, so this would be interesting to me. :+1:

I can imagine the MarkovSeq easily sequencing my Meander module circle-of-fifths based harmonic progression generator. Meander takes the 7 white keys such as from Twelve-Key and converts those from keys 1-7 to harmonic degrees I-VII. Meander can then play the progression in any mode and root(key). The algorithmic melody and bass follow the harmony chords.

Meander is still in development but it is functional and on GitHub if you are interested. The Azure Pipelines builds for all the OS’s are also available. Let me know if you would like the links.

Meander does 1st order 7x7 Markov chord transition matrices, but they are currently hardcoded and can’t be edited.

So yes, I find this interesting.

1 Like

Ooohh… sounds interesting!

@dag2099, @down_of_hares, @LarsBjerregaard: Thanks a lot for the positive feedback!

@k-chaffin: I will have a closer look at Meander. It seems indeed that Meander and MarkovSeq could be a good combination. Thanks!

1 Like

Hi Philippe, I just tried running your 2D transform plugins into a couple of Fundamental Scopes. I understand the function from a 2D visual standpoint but I’m curious as to how you are using this in audio synthesis. I don’t doubt that it is useful, I’m just personally stumped in imagining how it would be used. :slight_smile:

Perhaps there are clever waveshaping applications?

Hi Owleyeyey,

My initial use of this was with the “chaotic lfo” developed by Wiqid. Here is an example of the Lorenz lfo. Assume for example that the output x and y are used to modulate two parameters, let us say the cutoff frequency (for X) and the resonance of a filter (for Y).

1

In this figure, you see that curve has a sort of orientation along the diagonal. This implies that both parameters have a tendency to be positive or negative at the same time. So, the filter resonance will be high for high values of the cutoff frequency. Maybe that is not what you want. The rotation allows you to create different relations between the two parameters. In the example below, the resonance will be high for intermediate values of the cutoff frequency.

2

Another potential application I have been playing with is to combine two different melodies. If two different pitch signals going to two different voices are combined with a slow rate rotation, two new inter-related melodies are generated. They may create interesting results.

Finally, more recently, I have also been experimenting with this kind of setting:

Here you see that two waveforms are mixed by the 2DRotation and the angle is modulated by a saw wave going from -5v to +5v to create a full 2pi rotation. The modulating saw is at audio rate. I have to think a little bit more about this setting but I think this has some relation to phase modulation and possibly phase distorsion if the modulating signal is not a saw. Anyway, the generated sounds have some type of FM of feeling.

9 Likes

Proper

Very cool @philippe.salembier! I look forward to trying some of these, especially the dual melody transform.

Also, I just realised it could be useful in a quadrophonic setting :slight_smile:

Great indeed,I need to try it!

Are the inputs/output polyphonic so that we can feed them with chords? Thanks!

Thanks for the feedback.

These modules are currently monophonic. I will submit them soon to the VCV Library. In the future, I will see how I can improve them and, in particular, make a polyphonic version.

Merci ! :+1:

Based on the manual, this module uses 8 nodes holding any voltage values and “playheads” can jump between those 8 nodes based on the probabilities set for each node, and output where they are currently. So each is connected to all the others (and itself), and you got 8 outputs or separate “playheads”, that can all be at any of the 8 nodes set by the knobs (or cv), and output it’s value. This value can be any voltage, even modulated while playing.

On the other hand, my module builds up a map based on what you play for it, like some improvisation on a keyboard and connects them according to the order of the notes you play. Then when you’ve done, you have 1 “playhead” that goes around the nodes and connections that got built. Usually this result in an irregular map, such that it will only have notes you’ve played and not every node will connect to all the others (you could do similar with this new module if you zeroed some probabilities), but ultimately Mr Chainkov thinks only in equal temperament midi-style notes (so 128 discrete nodes tops) and their value can’t be modulated. It is also 1 “voice” or “playhead” only.

MarkovSeq is more for versatile in terms of mutable node values and modular functionality, and multiple parallel playheads, while Mr.Chainkov is focused only on generating tuned melody lines similar to what you played for him on a keyboard.

Hope this clears up something about both! Can’t wait to use them together in some meta-markov patch! :smiley:

1 Like

Thanks for your analysis of both plugins. I am not sure I correctly interpret your sentence:

Note that the MarkovSeq has just one output that can indeed be associated to any of the 8 nodes of the graph. The output value is the sum of the signal at the input port and the value of the knob associated to the node. In this sense, the module can be considered as an 8-to-1 switch. The idea of adding multiple output is something I am considering for the polyphonic version of the plugin.

I would also be very interested in exploring combinations of both modules and seeing what people come up with in this area!

Gotcha! Sorry, shouldn’t have guessed like that! Now that I downloaded and tried the module, I see how it is. Thought the ports in the right column were outputs but instead they are input triggers that take the playhead to the corresponding node by force! Cool!

One handy upgrade (that might be easy to implement) is to be able to deacticvate nodes entirely (maybe by clicking the blue “next up” leds) so that users could easily get to less-than-8-noded chains, which take some time now. Or maybe some factory presets for probabilities with such configurations (eg. 5 node setup or linear chain etc.) those could be useful as starting points.

1 Like

I think you just have to be careful of which “next step” you chose. It would be handy to have a way of limiting it to 3 or whatever but if you never select 4 as the next step then it’s not that big a problem.

There are quite a few different ways to use this thing. I just slam my mind against it in an attempt to understand what the hell it was doing and, like a lot of these modules when you actually get to grips with it it’s much less complicated than the description seems to imply.

The problem with limiting number of nodes as it is now is that for example if you want to exclude node S0 from ever occuring, you have to do it in all the other 7 nodes.

Yeah, writing manuals for modules can sometimes be more challenging than creating the modules themselves x) I guess a good tutorial video is more approachable for most people (demonstrated by the popularity of “what this module do” type of videos on youtube), but that has it’s own challenges as well, like keeping it short but still covering everything. In the end, users can’t escape having to actually try stuff, so maybe the most important in any form of manual is to spark the curiousity to do so.

1 Like

In this first version of MarkovSeq, the definition of the plugin parameters is indeed cumbersome. 8 Transition probabilities for 8 states involves 64 parameters. Using preset is an option, but I think that the design has to be improved so that the parameters specification could be more easily done.

One option would be to add buttons to automatically set to zero all probabilities to go from one given state to all states. Or maybe the other way around: setting to zero all probabilities to come from any node to a given node (maybe both options are also useful).

Anyway, do not hesitate to suggest ideas on how the design could be improved for your use case.