How to make a table based syncable lfo?


#1

Hey 😉
I have been thinking about how to make an lfo that is syncable to ppq or bpm. My idea is:
Record 1cycle of an lfo into a table. 3hz is 1/4 in 180 bpm.

Save the table to sd card.

Play the table based on either ppq or bpm. Use clock divideres to make it 1bar, 2bar, etc.

Any ideas how to make This work? I'M on my way to work now but will try patching something up in The afternoon. Still learning tables so i am not 100% sure how to do it.

Or maybe some of the crafty guys in here who knows how to make custom objects have another idea? 😉😜😎

Have a Nice Day 😎


#2

Can't you just use the reset inlet to sync them?

you will need to feed calculate the frequency from the tempo.

I will say we do have seem to have an odd set of lfo objects , some linear, some with reset.. so not sure we have all combos - so perhaps your missing what you need.

I think long term need to review, and perhaps have eg one sine wave that has pitch/freq and reset etc either by 'knowing' when it has an inlet connection or a switch to change behavior.
( I think the proliferation of similar objects gets confusing for users, and means we miss certain combos)

The issue with using tables for these functions, is your using precious memory. Ok, for non calculable data ( eg wavetables) but probably best avoid where you can (imho)


#3

Yeah I thought of it, going to try it out. But I am thinking the LFO cycle will never be precise, cause the lfos doesnt use bpm. Only very few BPM will be tight, like 120, 180, etc. Anyway will test this approach. Probably will get pretty decent result even without being 100% precise.

My idea was to try and make the LFO with objects that we already have. I am also trying to save SDram for other more relevant tasks, like samples, etc.. It wouldnt be my first choice for syncable LFO, but it is a way of doing it with what we have.

(SD-ram is sometimes still a mystery to me. Sometimes I dont get what actually overloads the SD-ram. An example could be a sampler patch I am working on. I have the patch fully working with .raw file on SD-card. But then I decided to move to .raw file to a folder on the SD-card(which works fine in general) and then I get SD-ram overflow. Move it back to original folder and it works again........ How can that be? I dont understand how moving a file to a folder on SD-card should use more memory than not being in a folder... The patch is pretty large, but I just didnt think that moving a file to a folder should matter on how much sd ram is used. But there is probably a technical explanation for this.)

But, yeah LFO section could be updated. A triangle LFO and also syncable LFOs would be really awesome. And reset/phase on all of them would also be nice. If you dont want to use them, then just dont connect anything to them.

Was thinking a bit about the custom object you made @thetechnobear. autoseq. If that object had a save to SD-card function(like using script to save/load files from sd card), we could make some really special LFOs or modulation source if you will. But again, not the best solution, cause it uses SD-ram.... But imagine feeding a few different lfo shapes at the same time to the autorec object and maybe a little bit of randomness. That could make some funky modulation sources or custom LFOs if you will :smile:


#4

this does not matter, you should be calculating the frequency, so it will be accurate to 32bit, more than enough :smile:
(ignore what the UI says this, is irrelevant, and is always rounded)

moving to a folder will make not make any difference... it sounds like something else is going on.
also worth remembering... the file load does NOT allocate memory (thats what table alloc does), if the file is too big it will simply get truncated.
so sounds like there is a bug somewhere else.

custom LFOs well yeah this would be possible, but its also probably worth also considering using simple 16 point sliders for some shapes, and interpolating values... not sure if we support that at the moment (i.e. interpolating at k-rate), also you can use describe curves using maths functions using oneliner_k ... so there are lots of different ways to get interesting shapes for LFOs.

at the moment, I really want to focus on getting the wavetable stuff producing something interesting... i.e. get the sound generator working then turn my focus to probably filtering, then finally modulation.


#5

Nice to know. I use Music Math(http://www.hitsquad.com/smm/programs/Music_Math/) to calculate BPM to frequency. Works well and it is free. Was just checking a few BPM and had a few good results. WIll be digging more into this :smile:

What about this example:
140 bpm. 1/4 is 2.33 hz.
I can set 2.33 hz but when i switch to see the bpm it says 140.06.... How would I go about adjusting the LFO -0.06 bpm? I was thinking maybe use a dial through an attenuator with 1 as value( kind of like fine tune for an oscillator).

Nice to know you guys have a master plan :smile:


#6

@thetechnobear I am still stuck with the bpm syncable lfo. I did a step LFO, which is kind of ok:

Could you give an example of calculating it when you have time? I dont think I am doing it right. And how to set it up?

I also tried googling linear LFO but didnt get any answers. What is the difference between the regular lfos and the linear lfos?

I am also curious about the oneliner_k object you mention. How does that work? Cant really find much info on that either.