Let's talk random LFO's

Started by Ripthorn, January 07, 2021, 03:49:47 PM

Previous topic - Next topic

Ripthorn

With micro controllers and other digital chips proliferating, we are seeing more random LFOs appearing, like in Tom's tapLFO chip. My question is regarding just how they tend to be created, because not all randomness is equal, at least in the context of an LFO for something like a chorus. The way I see it, there are three primary ways of doing it.

1. True random, where a random voltage value is created each time through the loop. This can be bounded, but letting it go over the full PWM range allows for better step resolution.

2. Random looped: where a sequence of N samples is created randomly, then saved to flash and each time through the loop, the next value is read.

3. Mathematical Pseudorandom: using something like a maximal length sequence or quadratic residue series of N samples and used like option 2.

I guess one question is "just how random can it be before it sounds like garbage?" I plan to experiment, but I'm wondering if you guys have any thoughts?

Another thought I've had is letting it be constrained random, where each subsequent sample is randomly selected from a bounded range that can be chosen by the user. This could be fun to play with. Our it could be a sine with an added random component. Hmm... time to think more and play.
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

ElectricDruid

I've done *loads* of experiments with different ways of making "random" LFOs.

A totally random signal just sounds like white noise. But even then, there are a few varieties. You can generate 1-bit digital white noise just by spitting out random bits really fast. Which sounds white, and is, but isn't much use fed to a sample-and-hold! You can make analog-style white noise by outputting random values to a DAC (or by filtering the 1-bit noise stream, essentially a 1-bit DAC). And then you can have either a flat or a Gaussian distribution of values. Again, both sound white, but the results when fed to a sample-and-hold are different. A Gaussian distribution tends to clump around the centre, with further away values coming up more rarely. A flat distribution is..well, flat..so all values are equally likely.

I've also experimented with what I called "glitch waveforms" where you randomly output (or not) a short signal. You can change the rate/frequency of the output, but you don't know whether a signal will appear at a particular moment. At audio rates this produces a selection of speckle, splattery textures.

Another interesting route is to generate a typical LFO waveform, but to randomly vary the amplitude of it. I did this either every wavecycle or every half-wavecycle depending on what's appropriate for the waveform, but you could do it continuously. This makes for an interesting modulation waveform, since it retains some obvious character of both underlying rate and shape, but has more variation. I find these sort of "in-between" waveforms fascinating, and if you can do this sort of stuff at audio rates, you get a wide variety of noise sounds, beyond broad categories like "pink", "brown", "blue", whatever, and into more descriptive words like "gritty", "spluttery", "crunchy", etc.

There's some example images in this paper I wrote about some of these experiments:

https://electricdruid.net/AdvancedModulationGenerator.pdf


Mark Hammer

Random LFOs, as a source of sampled voltages that are constantly different and unpredictable, is one thing.  LFOs that are aperiodic enough to not draw our attention to a particular expected sweep, is quite another.

I think one needs to begin by asking the question regarding what purpose the "randomness" is supposed to serve, as well as what sort of time-frame one is intending to insert randomness into.

For instance, if I had a mix of 4 independent ultra-low-frequency oscillators - let's say under .01hz - mixing them together would certainly yield something aperiodic and pretty darn "random".  But would you, could you, notice?

ElectricDruid

Quote from: Mark Hammer on January 07, 2021, 05:13:43 PM
For instance, if I had a mix of 4 independent ultra-low-frequency oscillators - let's say under .01hz - mixing them together would certainly yield something aperiodic and pretty darn "random".  But would you, could you, notice?

Yeah, I reckon I could! But I think I might have spent more time than the average person *actually listening* to madness like that!!

What I don't think you could tell is whether what you were hearing was one wandering random signal or several periodic signals mixed together. As you say, it rapidly gets pretty darn random and outside of ranges where our pitch perception can distinguish the frequencies, it's impossible to tell.

the other place this happens is up at the top end of our hearing. The early Roland/Boss drum machines used a group of CMOS square wave oscillators to make a "cymbal noise" signal. It's not a pitched sound (or at least, the ear can;'t detect the pitches), but it's not white noise either and has more "sizzle" than normal white noise.

iainpunk

Quote
The early Roland/Boss drum machines used a group of CMOS square wave oscillators to make a "cymbal noise" signal. It's not a pitched sound (or at least, the ear can;'t detect the pitches), but it's not white noise either and has more "sizzle" than normal white noise.
you can do that too with a relative diferential amplefier (analog version of the Xor) and analog signals, it gives weird metallic noises as well, but analog, i guess you could put an LFO into the inputs.
you can also cheat and not make a TRUE relative differential amplefier and stack as many inputs as you want, but the cumulative chaos gets high really fast and the amplitude gets smaller with some hard spikes, pops and crackle, so adding more than 4 is not recommended, here are schematics of 2 and 4 inputs (only the 2 input version as a true RDA)


the 2 input takes the difference between in1 and in2 and subtracts the diference from Vcc, independent of polarity,
the 4 input version looks at how much higher in1 is than in2, how much higher in2 is than in3 etc ant adds up the total and subtracts that from Vcc.
quite a cool modulation/chaos thing since its kind of like an Xor, matter of fact, the 2 input one is actually a TTL Xor with extra's to make it work in the linear region.


some output waves and the input waves that generate them.

cheers, Iain
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

Mark Hammer

Then there's always things like this:

Ripthorn

Appreciate the thoughts, guys. Mark, do you know of any wifi demos where that psycho LFO is used?
Exact science is not an exact science - Nikola Tesla in The Prestige
https://scientificguitarist.wixsite.com/home

garcho

^ there's a bunch of Ken Stone builds out there, but there's another site hosting his stuff here. TONS of great stuff!

here's a simple google search, a bunch came up

I really like LFOs controlling other LFOs, rate, depth, offset, it's not random, but it's more that you hear it at random points in the listening experience because it's a more complex pattern. The changes happen when you're not paying attention. I use Renoise, it's really easy to have a million LFO controlling LFO connections, enough sine wave LFOs doing different parameters and it does sound like some kind of random. Tom's LFO IC is good for that, as is PJRC's Audio Design Tool for the Teensy. And of course, that's kind of the point of modular synth rigs. Interesting topic!
  • SUPPORTER
"...and weird on top!"

Mark Hammer

The reason why Tom came up with the brilliant One-shot generator is because I pestered him about what could be done by having one LFO controlling another.

garcho

^ I'm slowly putting together a table top analog bass synth, basic, fat sounds, nothing radical. But there's going to be a big red "alarm" button that will trigger the one shot, probably cut off. Great idea for an IC! Maybe a future Druid deluxe LFO release can have a one shot option. Seems like it would take 2 pins though. Or it could be at the end of the waveform pot and use the sync pin? Thinking out loud sorry...

Random one shots, that would be a humorous kind of random. It would get annoying quickly I imagine.  ;D
  • SUPPORTER
"...and weird on top!"

amz-fx

TR606 noise source. The frequencies are chosen to have a somewhat metallic sound for use as cymbal synths.



regards, Jack

Digital Larry

Quote from: amz-fx on January 08, 2021, 07:33:27 AM
TR606 noise source. The frequencies are chosen to have a somewhat metallic sound for use as cymbal synths.



regards, Jack
for heaven's sake, the minute I see any mention of old Roland drum machines I just GOTTA bossa nova!  Boy I also have too many memories of OPL-2/3 FM drum sounds of the early 90's video games.  tinka-tinka-dooka-dooka-dooka-pshhh
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

ElectricDruid

Quote from: amz-fx on January 08, 2021, 07:33:27 AM
TR606 noise source. The frequencies are chosen to have a somewhat metallic sound for use as cymbal synths.



regards, Jack

Thanks Jack! That's the thing!

You can do this "random" stuff (which is actually just mixing enough periodic sources that you can't tell it's periodic any more) at any frequency, not just for LFOs - that was my original point. How *hard* that is depends on the frequency range involved, because our pitch perception is so much better around the "speech" range than at the extreme low or high ends.

I agree with Garcho too - making things more random by controlling some other parameter of the LFO (rate, depth, shape, whatever) with something else is a great way to liven things up. In some ways I think this sort of stuff is the best of all, because it still has *something* that the ear can hang onto. There's a underlying pattern of some type, but then there are unexpected variations that keep it interesting. That's where you need to be, in my view. Totally random is just noise, but odd variations is music!




iainpunk

i wonder if there are LFO's that are input frequency dependent, which i would love to use. almost like an MXR bluebox, but with way more oct down stages, and some way to change it in to different wave shapes, maybe by use of a wave table...

does that exist yet?

cheers, Iain
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

garcho

#14
Quotealmost like an MXR bluebox

hahahaha i just now, a few seconds ago mentioned that pedal in a different thread. Must be listening to the same radio station  ;)

Quotei wonder if there are LFO's that are input frequency dependent

I love that kind of thing. In a way, it reminds me of old sampling playback, different speed / playback rate depending on which key you hit a la Casio SK-1, mellotron, etc. I bet you could do that kind of LFO fairly easily with a Teensy. The "audio design tool" PJRC has for their audio shield library has fft and some other audio analysis (C++) objects, I could try something out in a few days, proof of concept kind of thing. Every equal tempered step a different LFO rate? Or try to make it more linear, less stepwise? Maybe you could do it with something less beefy but I don't have enough experience, I'm in coding diapers.
  • SUPPORTER
"...and weird on top!"

iainpunk

Quote from: garcho on January 08, 2021, 06:05:44 PM
Quotealmost like an MXR bluebox

hahahaha i just now, a few seconds ago mentioned that pedal in a different thread. Must be listening to the same radio station  ;)
that's one of the funny perks of being a time traveler
haha, funny coincidence that has nothing to do with time travel at all

cheers, Iain
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

garcho

of course I forgot, er, I mean konechno, ya zabyl, your highness

вся ваша база принадлежит нам
  • SUPPORTER
"...and weird on top!"

iainpunk

haha, nice
sorry, don't speak/read Russian

cheers, Iain
friendly reminder: all holes are positive and have negative weight, despite not being there.

cheers

garcho

i wonder if there is something to the math of noise, similar to how cartographers determine what to measure along a coast. If you measure the twist and turn of every rock along the seaboard, you end up with a length that isn't relevant to humans. The length of a 10ft rocky beach would be a mile. But if you go too far out to sea, you just draw a straight line, that's not very useful either. Somewhere in between, the data is useful. 
  • SUPPORTER
"...and weird on top!"

PRR

  • SUPPORTER