Page 1 of 2

SyLFO: PPQ-Synced and Hopped LFO

Posted: Sat Jun 22, 2019 2:29 pm
by trogluddite
Here's a little something extracted from my latest project that some folks might find handy. It's an oscillator specialised for LFO duties with full VST sychronisation, which compromises the maximum frequency so that hopping can be used to lighten the CPU load.

- Free-running "frequency mode" with 3 selectable ranges, including "Extra Slow".
- Sync to multiples of host beat subdivisions, including triplets and dotted notes.
- Sync to multiples or divisions of the host's current bar length.
- Sync-mode/Rate-display button selects a Rate control range to suit the sync source.
- Sync is to the host's PPQ data, so while the transport is running, there is no timing drift.
- Automatically free-wheels when the transport is stopped (less accurate timing, but re-syncs on restart.)
- LFO Phase may be offset, reset by a discrete trigger, or set to reset at note-ons.
- Supports sine, ramp, saw, triangle, square, noise, and sample & hold waveforms.
- Randomised noise generator seeding to prevent coherence between noise oscillators.
- Smoothing to remove hopping zipper-noise can also be used to smooth the output further.
- All four SSE channels are fully independent, even for selectors such as waveform and sync-source.
- The same code works for poly, mono, and mono4 - just change the connector types and you're done.
- No re-compiles due to selector/multiplexer switching - there aren't any!
- Low memory as well as CPU - no custom LUTs required.
- Semi-modular components for PPQ master ramps, synchronised ramps, and ramp -> wave generation.
- Looks ugly as hell! (hint, hint! ;) )

The only DAW with full tempo/time-signature control that I have is Reaper, and everything seems to work fine so far in there, including tempo ramps, time-signature changes, and auto-freewheeling. Good luck to those of you beta-testing for me on other platforms (hint, hint! ;) ) The download is set up with a simple, VST exportable demo synth which includes a scope for peeking at what's going on...

NB) Schematic is saved from FS 3.0.6. Now working for FS4 alphas (thanks, kortezzzz!).

SyLFO Beta 0-2-2.fsm
(265.54 KiB) Downloaded 1646 times

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sat Jun 22, 2019 3:53 pm
by Halon
Thanks trog :D

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sat Jun 22, 2019 6:00 pm
by wlangfor@uoguelph.ca
Thanks, I'll check it out :)

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 9:24 am
by Spogg
I played with this for a bit (not in my DAW) and it’s a masterwork! :ugeek:

One thing that really appealed is the method of selecting the sync/beat ratio from the DAW. Very nice!

Plus, I didn’t realise you could force a connection between Mono and Mono 4 and get away with it!

Thank you so much for creating and sharing this.

Of course I’m now wondering what the main project you are working on will be...

Cheers

Spogg

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 10:06 am
by Duckett
I'm really grateful for this; the only non "Step LFO" sync-able LFO I'd come across for FS was an old SM module that had several nice features- but tended to crash FS (and the exported synth in REAPER) often.

Also still grateful for Soopa Doopa Loopa; the happy place between Mobius and Elottronix :D

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 2:49 pm
by lalalandsynth
Excellent stuff ! Thanks so much.

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 5:05 pm
by trogluddite
Thanks, everyone; I'm glad to hear that you like it! :D

Spogg wrote:One thing that really appealed is the method of selecting the sync/beat ratio from the DAW

I must admit, I'm rather chuffed with that bit, and I was thinking I might do a more general-purpose selector using the same principle. Having the same Ruby code responsible for putting together the items/categories list, and for determining what each item does at multiple outputs, makes tinkering with the options much easier, I think (once I start nesting categories, I always seem to end up getting my label-to-index mappings muddled up!)

Spogg wrote:Plus, I didn’t realise you could force a connection between Mono and Mono 4 and get away with it!

You do have to be a little careful with this sometimes, as it assumes that all four SSE channels of the mono stream are identical. Much of the time, that's true; but in ASM, some operations require working one channel at a time, so "pure mono" CPU optimisations may skip the unused channels (e.g. for array reading/writing). To be absolutely certain that all four channels are identical, the following ASM is quicker than a 'pack' primitive...

Code: Select all

monoin    input;
streamout output;

movaps xmm0,   input;
shufps xmm0,   xmm0, 0;  // Duplicates the first channel to all in one CPU clock tick!
movaps output, xmm0;


Ducket wrote:Also still grateful for Soopa Doopa Loopa; the happy place between Mobius and Elottronix

It's really nice to hear that I'm not the only one who still enjoys messing around with that old beast! :o
Coincidentally enough, SyLFO is one of Soopa Doopa Loopa's offspring, so to speak - I developed the ramp-based PPQ quantisation code originally for keeping the multiple variant-length loops synchronised.

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 7:16 pm
by k brown
Spogg wrote:Plus, I didn’t realise you could force a connection between Mono and Mono 4 and get away with it!

Isn't there a lot of this going on in Martin's Randy, or am I misunderstanding?

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 9:24 pm
by martinvicanek
I must admit I don't spend to much thought on consistent pin types. It works for me as long as I keep track of how the SSE channels are used. (I would go 4 lanes most of the time.) Where it does matter is wireless connections. That's where I enforce the connector to a specific type at both ends. But this is a bit off topic now.

Re: SyLFO: PPQ-Synced and Hopped LFO

Posted: Sun Jun 23, 2019 9:48 pm
by trogluddite
k brown wrote:
Spogg wrote:Plus, I didn’t realise you could force a connection between Mono and Mono 4 and get away with it!

Isn't there a lot of this going on in Martin's Randy, or am I misunderstanding?

Yes, and it's used very cleverly. If I understand correctly, there are points in the schematic where the four SSE channels each represents a different voice, and other parts where the four SSE channels represent four instances of a "component" for a single voice. Where he's forced the connection, the following ASM has some of those parts I described above where the channels are treated separately, and he makes sure to only read the first channel where necessary.