LFO module

Post and discuss Lemur Modules.
oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19
LFO module

Post by oldgearguy » 30 Jan 2015 14:29

attached is a chunk of code that folks may find useful, or at least fun to play with.
It's an LFO with the ability to select waveforms, display the LFO running, and pick a target to modulate with the LFO.

I decided to make the LFO internal resolution independent of any MIDI resolutions and the output of the LFO is 0->1 so that you can directly assign that value to a Fader or Knob 'x' directly. Then you can use that fader/knob's scaling and MIDI assignments to do something useful with the values.

Also attached is a quick readme file describing what's there. The code is not documented nor described in detail (yet).

The template and readme are combined into a single ZIP file since .pdf's are not allowed as a file attachment....

**EDIT** - for the two people that were early downloaders - replace your copy with this one. I still fight with the Lemur OS on things that should be simple. Apparently, calling a script that initializes clock info from an onload() script doesn't always work and sometimes the clock stays uninitialized and non-functional. If you load the template, you should be able to click on the LFO 1 button and see things happening.
Attachments
LFO_demo.zip
Lemur template and readme
(95.41KiB)Downloaded 634 times

ndivuyo
Regular
Posts:279
Joined:23 May 2014 00:24

Re: LFO module

Post by ndivuyo » 04 Feb 2015 04:32

cool stuff, I'm going to keep this around. The only thing is (just played with it a little bit) the range for the sine lfo just makes it behave as a ramp (gets cut off), seems like an easy fix. Otherwise, runs nice, good work!

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: LFO module

Post by oldgearguy » 04 Feb 2015 10:38

ndivuyo wrote:cool stuff, I'm going to keep this around. The only thing is (just played with it a little bit) the range for the sine lfo just makes it behave as a ramp (gets cut off), seems like an easy fix. Otherwise, runs nice, good work!

Thanks. As far as the range goes - that slider is a Lemur Range slider so you adjust each end separately. If you adjust the right end so the displayed values are [0, 127] you should be seeing just the positive top half of the Sine wave (i.e. from the old math days, 0 to 180 degrees)

ndivuyo
Regular
Posts:279
Joined:23 May 2014 00:24

Re: LFO module

Post by ndivuyo » 04 Feb 2015 18:20

Ok I see, I was expecting it to have values modulate between the desired range as a complete sine

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: LFO module

Post by oldgearguy » 04 Feb 2015 18:38

ndivuyo wrote:Ok I see, I was expecting it to have values modulate between the desired range as a complete sine
That's what I originally wanted to do... :D

Conceptually I know it's just a multiplier on the resulting 0 - 1 range, but where to put it nicely in the code and how to incorporate it in the code and on the screen so that the user can easily adjust it for each LFO is the bigger challenge.

Working out the math to do the scaling like that is on a future enhancements list. I like both options, especially with the one-shot ability but the screen real estate in the actual application (controller for a Roland RSS-10) is limited and initially having a min/max range seemed more useful since you can get all kinds of interesting shapes out of it. I guess I could drop the Pulse width slider and just use a square wave...

I'll update the example tomorrow with the scaling option as well and repost.

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: LFO module

Post by oldgearguy » 04 Feb 2015 21:36

OK - had some time to do it. Here it is with scaling. Also - since you actually seem to be one of the few that is playing with this, check out my attempt at displaying the current value of the Rate slider that conserves space. I'd appreciate feedback whether it works for you or not.
LFO_2.PNG
LFO_2.PNG (35.47KiB)Viewed 15079 times
Attachments
LFO_2.jzml
updated version with scaling
(68.17KiB)Downloaded 578 times

ndivuyo
Regular
Posts:279
Joined:23 May 2014 00:24

Re: LFO module

Post by ndivuyo » 04 Feb 2015 23:37

you mean having the the x shift from right to left? Yea it works, I don't think it saves more space (if that's what you were talking about) but it is cool especially if there will be color conflicts. The scaling is crucial, nice job, now you just need an offset fader to push the 'lfo' to the desired starting point


**Edit
-- actually, since you wanted my feedback I'll be honest: I like the idea of the monitor's rect moving from right to left witht he rate, but I imagine if I'm playing with it and am looking at the value as I move it, and then it jumps right/left might actually be less smooth and simple than having it in one spot. It's a cool idea, and might help well in color conflicts or some other situation, but in this situation I feel it could be more of a hinderance. No offence intended ;)

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: LFO module

Post by oldgearguy » 05 Feb 2015 00:22

ndivuyo wrote:you mean having the the x shift from right to left? Yea it works, I don't think it saves more space (if that's what you were talking about) but it is cool especially if there will be color conflicts. The scaling is crucial, nice job, now you just need an offset fader to push the 'lfo' to the desired starting point


**Edit
-- actually, since you wanted my feedback I'll be honest: I like the idea of the monitor's rect moving from right to left with the rate, but I imagine if I'm playing with it and am looking at the value as I move it, and then it jumps right/left might actually be less smooth and simple than having it in one spot. It's a cool idea, and might help well in color conflicts or some other situation, but in this situation I feel it could be more of a hinderance. No offence intended ;)
I say 'save space' by embedding it in the control versus putting it to the left/right/below. Of course I could leave it in a single spot on the fader, but ...

That's why I asked. My TX-802 template used that extensively because space was tight and there are a lot of controls. One thing I hated when using other touch software was that if I was trying to dial in a precise value and the display happened to be right under my finger, I couldn't see the amount and adjust it at the same time. This is especially bothersome at the ends of a range where you might want 3 or 4 and the value is in that exact spot. Not sure there's a 100% perfect solution to that problem. Having a centralized location for value helps keep the eyes focused, but then you lose the ability to see a lot of values at a glance.

The primary purpose of the LFOs were to drive various RSS-10 parameters. The RSS-10 is a 'move an object around in 3D space' box from Roland, so smooth, slow changes work especially well to make a sound appear to be moving L->R or away from you. The offset thing is trickier since I made the resolution of the LFOs independent from the other values. Basically I'm looping a counter between the range min/max and throwing that result into the LFO shape equation, then taking that result and scaling it. The math gets trickier if I'm not looping back to the min value. Not saying impossible, just saying it may take a couple of beers and some sketching out. :P

ndivuyo
Regular
Posts:279
Joined:23 May 2014 00:24

Re: LFO module

Post by ndivuyo » 05 Feb 2015 04:11

I see, haha I am just suggesting, since the offset would be nice. I see what you mean about the finger on the monitor, if your fader is going to be that size and you need the monitor on it, then I agree it is nice and does in that way save space.

oldgearguy
Regular
Posts:315
Joined:02 Nov 2013 11:19

Re: LFO module

Post by oldgearguy » 05 Feb 2015 10:32

ndivuyo wrote:I see, haha I am just suggesting, since the offset would be nice. I see what you mean about the finger on the monitor, if your fader is going to be that size and you need the monitor on it, then I agree it is nice and does in that way save space.
The other technique I've used is the 'pop-up fader' approach. Basically you display the parameter name and the value. Behind the value is a button so that by pressing on the value, a fader pops up next to it and you can adjust the value. When you let go of the fader it disappears again.

I may have time the next couple days to look at offset and to -re-implement the LFO example using pop up faders for a bunch of the parameters.


**EDIT**

coffee, beer, it's all the same.

Here's the offset as well as some minor bug fixes in the Configuration menus (cut n paste from the larger project, which uses different container names. If you don't expand everything, you don't see scripts/variables with errors)
Attachments
LFO_3.jzml
scaling and offset
(71.41KiB)Downloaded 629 times

Post Reply