Thanks for looking! Were you using the full polyphony? I usually only get 3% CPU or so (at least according to the Rack meter) but I don’t go past 3 voices much unless I’m testing the polyphony specifically. I’m not sure how to make it more CPU efficient in its current form.
I realized my detune feature wasn’t working as intended, so I am going to change it; it will be considerably more subtle. I think I’ll also put an attenuator on the random input following augment’s suggestion.
As far as the algorithm, the main idea is pretty simple: I am thinking of sines and cosines as solutions to the ODE x’’ = -k^2 x. Numerically solving this ODE (currently with Euler’s Method) as a system of first order equations (with y=x’/k as a second variable) allows some random and external perturbations to be added in. I’m doing that 8 times in parallel. I suppose 8 might be overkill but I wanted a really rich sound.
EDIT: oops I forgot an important piece when writing this originally. In the x-y plane I also add a cubic term which in polar coordinates is r*(1-r^2), which creates a strong pull to the unit circle. This tends to damp out extreme variations.
I’d like to also advocate for an attenuator on the external gain in particular (and everywhere if possible). I was playing with it some more last night, and was getting some really interesting rumbly bass (a perennial favorite) with the gain fluctuating around the maximum this time. Attenuators do take up precious space on a faceplate, but they’re great for dialing in sweet spots. This module has plenty of them.
Likely a bigger ask; is there any way to smooth the transition between harmonics levels? I find modulation between a limited range of them to be really interesting & a rare feature, but it entails a very noticeable jump as you cross those thresholds. I appreciate that this may be difficult or even impossible to achieve (audio koan: what is the sound of 3 1/2 harmonics?). My amateur imagining would be that it might involve calculating the audio signal for both of the levels and fading between them, but that’s obvi a brute-force solution (and likely not a great idea if you’ve already got CPU issues to keep in check). At any rate, I think it would sound interesting and you’re wearing the laurels, so I figured I’d mention it.
All requests aside, thanks again for a really cool module. It’s not only conceptually interesting, but also quite musical in a variety of applications. I’ll be interested to hear what it can do in more capable hands. (whispers Omri’s name in mirror three times…)
Yeah I was trying to think of an efficient way to morph the harmonics more smoothly. It would definitely make it more CPU intensive but maybe not that much more, I’ll give it a try.
As a quick, no-extra-CPU fix I doubled the number of harmonic variations, with smaller changes in between them, so it should be a bit smoother. This is in release 1.1.10 now.
Edit after playing some more:
This is actually quite interesting. In a patch with a lot going on (playing full chords, modulating detune & ext. gain) the additional harmonic variations do cause the transitions between them to be much less noticeable (to my ear anyway). In a cleaner patch with fewer notes and modulations, the transitions can sound like little runs of grace notes, or even a slapback echo. Another musically interesting aspect to your module.
OK, I’ve added some attenuators to everything. I also changed the way the detune works a little; I think this one is better. I’m inclined to release this (version 1.1.11) to the library.
Retested all of my patches and was able to dial in all of the same effects using the new attenuators, obviating the need for external voltage processing.
I didn’t really spend enough time with the old detune to honestly mark the difference, but I can still use it to get a pulsing supersaw (with the attenuator open just a tetch), so LGTM!
Thanks for such a cool module & for being so gracious about feedback. I can’t wait to see what folks do with it (especially the Y Out, which I have yet to put to good use).
I had fun this morning setting up 3 WeebleWarblers as the three voices for Meander… harmony. melody and bass. I can get some very interesting organ sounds out, especially when I add quite a lot of reverb. Great job!
I have a rough draft of a small (2 state 2 emission) Hidden Markov Model (HMM) that I am calling Rosenchance. Its functionality is pretty much a subset of the excellent SckitamMarkovSeq but the differences in conception and control may make it useful. Its in-between the MarkovSeq and the Audible Instruments Bernoulli Gate in what it can do.
There are 2 hidden states (A and B) which transition with some probability either to themselves or to each other upon a trigger. Each state has 2 possible emissions, which have a modulatable probability. The hidden states are also not really hidden as there are dedicated outputs for the present state and their transitions.
If anyone has any high level comments I’m interested in hearing them before I finalize the implementation.
OK, I think the Rosenchance module is more or less done. I am hoping to do some more elaborate HMM modules in the future, but its difficult to make a nice interface for models with many parameters.
I downloaded Rosenchance from the library this morning and played with it for a while. Feeding the state values into Meander degree inputs is very interesting, even with just two states. Stochastically switching between I-ii (major,minor) chords can produce some interesting patterns, especially with Meander melody and bass following those chords.
Thanks! Rosenchance is now in the library. I am adding a companion, Guilden’s Turn. It is a 4-state Markovian router. There are many modules that offer somewhat similar capabilities but it is a little different I think.
Each of the four states (A,B,C,D) can transition to its neighbors; so for example A can transition to B or D or to itself. Modulatable controls are given for 2 of the three transition probabilities for each state, and the self-transition probability is derived from the relation that P_i,j + P_i,k + P_i,i = 1 for each state i. If the forward and backward transition probabilities add up to more than 1, the self-transition probability is zero. There are four signal inputs corresponding to each state, and the one corresponding to the active state is routed to the Out output.
OK module #7 is taking final form; its called the Rossler Rustler, its a combination oscillator/effect/distortion based on a dynamical system. The dynamical system is the Rossler Attractor, a 3D chaotic dynamical system with a strange attractor.
The differential equations are:
x’ = k(- y - z)
y’ = k(x + A y)
z’ = k(B + z (x-C))
The attractor (for the parameters a=0.2,b=0.2,c=5.7) looks like this:
The module provides controls for A,B, and C, as well as the ability to perturb the system with an external signal and modify the internal pitch through the parameter k.
Here’s a small example of it in action distorting a triangle wave:
Thanks for these modules, very nice sources of controlled chaos!
One thing I noticed, which I think was unintentional is that some of the ports have different colored shapes beneath them. They are only visible when you drag a cable and Rack lowers the opacity on of port widgets.
I’m interested in comments and suggestions on a new module I am developing. It is called Firefly. It is an oscillator based on the Kuramoto model of phase-coupled oscillator systems, which has been extensively studied as a model for synchronization in biological systems including neurons in the brain and firefly flashing. Firefly has 4 internal oscillators, whose phases evolve according to the ODE
T_i’ = w_i + K sum(sin(T_j - T_i))
The output of the module is the sum of sin(T_i) for each oscillator, multiplied by a gain.
The Kuramoto model has mostly been studied for positive coupling; just for fun the option to have negative coupling has been included.
I’m once again looking for feedback on my phase-coupled oscillator system, a new module called Firefly. I’ve changed quite a lot about it over the past week.
I’ve increased the number of internal oscillators to 5, and I’ve added a separate wavetable output for each one. The “charm” parameter for each oscillator controls both its volume in the mix and its influence over the phase of the other oscillators; if the coupling strength is zero this means the “charm” is just a volume control. The wavetable control pans from a simple sine wave to things richer in harmonics. I could easily change the wavetables, so I am particularly interested in what people think about those.
I have also added an exponential FM input, which affects all 5 of the oscillators equally.