PeerLFO - Updated 7th June 2018

User avatar
IXix
Posts: 852
Joined: Wed Nov 23, 2011 3:24 pm

Re: PeerLFO - Updated 7th June 2018

Post by IXix »

I've just found this that I saved in a text file, from a BuzzChurch thread I think. Unfortunately I can't remember what the question was. :(
oskari wrote:Subticks can have different lengths. You should send the control changes in Work when PosInSubTick is 0. If you build your event list in Tick you can then do something like this in Work:

if (PosInSubTick == 0)
{
// process Events[CurrentSubTick]
// this block gets executed once for each subtick
}

You don't have to count samples if you just use CurrentSubTick.

User avatar
UNZ
Posts: 742
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PeerLFO - Updated 7th June 2018

Post by UNZ »

but if you calculate your LFO to correctly update in all cases (not just when pos_in_subtick ==0), taking into account the different (current) lengths of a subtick, it should be the same but at reduced latency and possibly increased resolution imho, you do indeed have to count samples then tough i guess.

what i mean is: taking into account pos_in_tick and pos_in_subtick when calculating how much the lfo phase has to advance every work call (and send every work call). i actually think you don't even need pos_in_subtick or even pos_in_tick for this and simple advance by the numframes in work. that is what i am doing now, which seems to work...

User avatar
IXix
Posts: 852
Joined: Wed Nov 23, 2011 3:24 pm

Re: PeerLFO - Updated 7th June 2018

Post by IXix »

UNZ wrote:
Mon May 11, 2020 8:40 am
but if you calculate your LFO to correctly update in all cases (not just when pos_in_subtick ==0), taking into account the different (current) lengths of a subtick, it should be the same but at reduced latency and possibly increased resolution imho, you do indeed have to count samples then tough i guess.

what i mean is: taking into account pos_in_tick and pos_in_subtick when calculating how much the lfo phase has to advance every work call (and send every work call). i actually think you don't even need pos_in_subtick or even pos_in_tick for this and simple advance by the numframes in work. that is what i am doing now, which seems to work...
That makes sense but I've never really understood how the whole thing works anyway. :lol:

I think I have an archive of BuzzChurch on an external drive, so I'll see if I can dig up the thread later (supposed to be home schooling now :()

User avatar
UNZ
Posts: 742
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PeerLFO - Updated 7th June 2018

Post by UNZ »

i've written out the parameter values as wave files to compare peer lfo with my new lfo test. testing at 1hz.
it looks pretty close, but doing it my way results in a slightly cleaner sinewave. see FFT of the output comparison in attachment. Blue is peerlfo, red is my new one. the difference isn't big tough.
Attachments
peerlfo_vs_unzlfo.png
peerlfo_vs_unzlfo.png (132.85 KiB) Viewed 631 times

User avatar
UNZ
Posts: 742
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PeerLFO - Updated 7th June 2018

Post by UNZ »

ok at 10 hz, peerlfo actually aliases more on average (higher spikes) and you can see more staircases in the waveform by eye even than doing it my way. the noise floor in my version is higher because of the jitter, but i think overall lower spikes are preferable.
Attachments
peerlfo_vs_unzlfo_10hz.png
peerlfo_vs_unzlfo_10hz.png (183.95 KiB) Viewed 628 times

User avatar
UNZ
Posts: 742
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PeerLFO - Updated 7th June 2018

Post by UNZ »

here it is at 10hz in time domain. peerlfo at the bottom.
Attachments
peerlfo_vs_unzlfo_10hz_waveform.png
peerlfo_vs_unzlfo_10hz_waveform.png (47.16 KiB) Viewed 628 times

User avatar
UNZ
Posts: 742
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PeerLFO - Updated 7th June 2018

Post by UNZ »

i'll have to test this some more, as i think it's possible to make it even a bit smoother, for some reason some work() calls don't seem to get updated parameters yet i think, have to properly timestamp / count and see.

all in all: it might not be worth the effort to change anything in peer machines. but what we can do is the following:
control machine work gets called before any other machine's work, so if we made peers write the lfo into a buffer at audio rate, and made a little interface for receiving machines to get to that buffer (could also be done via aux), we can have perfect audio-rate modulation, bypassing all the tick nonsense. receiving machines would have to be updated, but it would be quite a simple change (it would be a bit like an opt-in some machines do with peertune). why not just use audio inputs / outputs then ? well, we are still targeting "parameters" (altough we don't write to machine state, receiver applies buffer directly to his buffer), so your generator doesn't have to have inputs if we do it via aux (or new protocol)!

flat
Posts: 34
Joined: Thu Nov 24, 2011 4:55 pm

Re: PeerLFO - Updated 7th June 2018

Post by flat »

IXix wrote:
Mon May 11, 2020 8:58 am
I think I have an archive of BuzzChurch on an external drive, so I'll see if I can dig up the thread later
Attachments
subticks1.jpg
subticks1.jpg (185.51 KiB) Viewed 607 times

flat
Posts: 34
Joined: Thu Nov 24, 2011 4:55 pm

Re: PeerLFO - Updated 7th June 2018

Post by flat »

subticks2.jpg
subticks2.jpg (330.1 KiB) Viewed 606 times

User avatar
IXix
Posts: 852
Joined: Wed Nov 23, 2011 3:24 pm

Re: PeerLFO - Updated 7th June 2018

Post by IXix »

Thanks flat! 2008! :lol:

User avatar
UNZ
Posts: 742
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PeerLFO - Updated 7th June 2018

Post by UNZ »

thanks for these, very helpfull!

can you find the thread where it says "see THIS THREAD" too :) ?

synthphase
Posts: 79
Joined: Sat Dec 17, 2011 7:57 pm

Re: PeerLFO - Updated 7th June 2018

Post by synthphase »

For what it's worth, I would want no noise-floor, even at higher frequencies. Having less random noise overall though would be great. I don't imagine peer stuff can work at the audio-rate can it?

Post Reply