# Faster LFO using Formula (faster than 1 LPC)

Didn’t figure out how to make sample and hold yet, but got other shapes
Custom LFO.xrdp (1.8 KB)

2 Likes

very fucking cool. Nicely done. Can do some interesting pseudo FM and Filter FM with this through macro automation

yeah, it’s cool, but sadly doesn’t work properly with extreme LPC (like 0.01 etc)

right. modulation rate and audio rate are not the same, but still it can yield some interesting sonic results, which is all I really care about

a couple of questions. One, how to implement a square function? I copy and paste the formula, but I’m not sure how/where to add the 1 or 0 so that it compiles successfully. Two, any chance of a triangle wave? I’m useless beyond basic math, lol

about square function, it’s not 1 or 0 :D, it’s “((x*2)%2>1) and 0 or 1” (you copy this whole thing. Lua is strange, lol)

1 Like

Ah, ok, thanks! Definitely post if you figure out the triangle. It’s a great one for FM

got the triangle, thanks to wikipedia

1 Like

ok, dope. did you update the device, or, what is the formula?

nvm, I see you updated it

2*abs((x-4)%1-1/2)

thanks!!!

Here’s an instrument using this formula device for some tasty, crunchy, unpredictable pseudo FM. The macros should be fairly self explanatory, but comments pop up to explain further.

cheers

PSEUDO BEAST.xrni (8.2 KB)

2 Likes

Wow, that’s very cool

1 Like

Thanks! I’ll probably mostly be using it as a sample generator, but it’s potentially playable with certain settings, or if you like the chaos/grit/noise

The rate of the formula device is limited by the tick rate of the song. Try using high song speed and you can get higher frequency LFO action.

Lol I actually once made fm synthesis oscillator formula device patches…you could make one osc modulate another…it worked, but it took a high amount of CPU power, and the formula device time resolution is too low for it to sound any good. I made it work with extremely high tickrate (like crank up lpb, bpm, tpl), and could get audio rate effects, but still very coarse, maybe 3-5khz. I tried to make a song with it, and it crashed renoise on Linux! This song makes renoise crash after a while

didn’t crash but showed an error message hah
so, are you saying that lfo changes it’s value every tick and not continuosly (every sample)?
edit: just checked with low bpm and lpb and yeah, it’s discrete ;(

It showed an error message, what kind of error message? Heh heh I just tried loading it and playing back, seems like the bug is still not fixed, it played for a minute and then hard crashed renoise haha…

Yes, the renoise modulation is updated per tick and not per sample. So if you raise the tick speed, i.e. by upping lbp and tpl, you will get more resolution for it. My “Song1” example does this to the maximum and does audio rate modulation (but still not for every sample…), but well, renoise wasn’t made for this, so it just eats up all the CPU and glitches and crashes…

“The audio engine was stopped because it used too much CPU for quite a long time.”
i didn’t even press play

Yeah, the lua formula devices in that “experiment” use a lot of CPU constantly, even when no audio is playing. Maybe your CPU is too weak to play the tune. This is what happens when you use too many voices, plugins etc. and max out your CPU with it, not just with my tune. You can try to go to the preferences, under the audio tab disable “automatic plugin delay compensation”. Then it will use a little less CPU and not crash (not crash as quickly, or not at all, cannot remember). But if your CPU is too weak, you might not be able to play back the tune.

P.S. on my old core i7 workstation notebook it uses ~45% cpu with PDC (plugin delay compensation) disabled, when I enable it, it will use >60% and after some time crash renoise with frozen repeating audio etc (on linux). Or you can try to delete the tracks/instruments of the drums and only leave the bass. The tune itself is just to demonstrate how to do audio rate modulation in renoise in an extreme scenario.