Hi Csounders,
I would like to make control signals that emulate somewhat how (I think) human pitch deviations work. I haven’t measured, but I’m pretty sure when I play a saxophone, my intonation does a kind of “idling” as one does on a unicycle. I think I go up and down around the target pitch, where the distribution is somewhat gaussian I guess? As in, mostly it’s pretty centered, sometimes it’s too high or low, and the variance around those is clustered around good. And further, it does some kind of an lfo like vibrato, but the speed and depth of the vibrato varies, and I imagine does so in a kind of drunken walk.
I suspect this has been implemented many times, so figured I’d check for examples, plugins, or opcodes I missed.
For vocal sounds, I tend to use a mix of randi and oscili for a jittery vibrato. It works well particularly if you use doubling and get a chorus effect.
Prof. Victor Lazzarini
Maynooth University
Ireland
Hi Iain,
I haven't implemented that precise kind of LFO, but I have implemented a kind of drifting, in the way of what some synthesizers might offer as "analogue feel".
You can certainly apply varying speed and depth to an LFO (some kind of oscil or table based). Using one of the table opcode (table, tablei, table3) you use a phasor to move through the LFO waveform. You can vary its frequency and depth easily with a slowly changing noise value. randh and randomh followed by a port/portk statement will work well. You can apply another slow and minimal noise value as a frequency offset, perhaps even using gauss, triggered every time the phasor reaches 1. Or you use one of the random generators with a cps parameter (like randh or randomh) again and pass it through a port. This value can be added to your LFO signal.
Depending on how you want to apply it to your frequency you must scale the LFO right. If you plan to multiply the LFO value, you should add 1 to a 0-centred waveform, like a normal sine or triangle.
I know, it's no code, but unless something ready-made turns up, I hope that it will help.
P.S.: I just saw Victor's mail and that reminded me that you also have rspline as a one stop shop solution. It can be temperamental and perhaps a bit too random.
Also, for that acoustic effect a simple envelope that goes from no vibrato to full might help. A bit of an LFO delay. possibly a kind of delay, attack or delay attack sustain release envelope, easily done with linseg or linenr for live playing.
Great, I didn’t know about rspline or jspline. I think those will get me going and I can make a plugin opcode out of them later to enforce some constraints.
As I’ve never used them, one thing I’m not clear on… if the range is -xamp to +xamp, can we be sure with either of them that the generated curve will cross zero on each random point? (or does anyone know a way to do that).
Hi Iain, not sure I completely understand the question. If I do then yes, the rspline creates a “drunken sine” type of shape that will vary between positive and negative values. It behaves quite like Perlin noise.
Hi Iaian!
Nov 30 2024, Iain Duncan has written:
...
As I've never used them, one thing I'm not clear on... if the range is
-xamp to +xamp, can we be sure with either of them that the generated curve
will cross zero on each random point? (or does anyone know a way to do
that).
I am not quite sure about jspline, but it looks like it. With rspline, I
can only say this: I'm sure it will get close to min and max
alternatively. so if they are about equidistant, I suppose that rspline
will cross 0 a lot of the time at least. Sorry...
In case you use Cabbage, I have written an example that explores a range of opcodes that explore this sort of thing, both sonically and visually. The opcodes it covers are: randomi randomh rspline jspline jitter jitter2 vibr vibrato gaussi trandom cauchyi exprandi gendy gendyc gendyx
All worth exploring!
Best,
Iain
Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here
Hi Iain (wow that feels weird), I do not normally use Cabbage, but I’d love to check out the example if you can share the link. Being able to visualize the results would be very helpful.
It’s one of the bundled examples with Cabbage, called ‘Random Function Generators’ or something like that. I’ve have attached a more recent version.
Best,
Iain
Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here Csound mailing list Send bugs reports to Discussions of bugs and features can be posted here