Jump to content


Photo

LFO freq can no longer be accurately set to 4-LPC by pattern effect co

lfo lines per cycle

  • Please log in to reply
9 replies to this topic

#1 lettuce

lettuce

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 623 posts
  • Gender:Male

Posted 04 February 2018 - 20:06

If I place a pattern effect command ( 16xx )  to control an LFO devices frequency slider :

 

163F sets the frequency at 4.048 lines per cycle.

 

1640 sets the frequency at 3.984 lines per cycle.

 

Setting LFO frequency at exactly 4 lines per cycle is not possible with the use of pattern effect commands.

 

Why?

 

Shouldnt the LFO frequency be exact, by lines or ticks?

Its one of the most important things to automate.

 

It can still be set to exactly 4LPC by typing the automation point LPC value into the value box in automation lanes.


Edited by lettuce, 04 February 2018 - 21:56.


#2 Zer0 Fly

Zer0 Fly

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1215 posts
  • Gender:Male
  • Location:Oops
  • Interests:Flying

Posted 04 February 2018 - 22:35

Hi!

 

I have made a formula device preset, that allows you to control the LFO speed by pattern commands, it is exact (at least the LFO device displays the anticipated values). It was a surprisingly simple formula (1/x).

 

Drag&drop the .xrdp file onto your renoise track where the effects are. Link it to the LFO frequency. Automate the first control of the formula with pattern commands.

 

You can set up a multiplier to control the LFO speed in ticks to achieve fractional resolution, or use coarser resolution by setting it larger than one.

 

Seems like I cannot attach .xrdp to this forum section, so in the spoiler below is some text to copy in browser and paste into track. It will spawn the formula device you should link to the LFO.

 

Spoiler

  • Raegae likes this

#3 lettuce

lettuce

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 623 posts
  • Gender:Male

Posted 05 February 2018 - 02:05

This looks cool.

I tried LFO-beatsynced.

I set the destination to LFO-frequecy, and the LFO destination to Filter-Cutoff.

at 120E and 1210, the cycles seem to slow down a bit over time.

 

I'm not sure if I know how to use this properly.

This is the first time I have tried to use the formula device.

I dont really understand fully.

 

In the 'LFO-Beatsynced' description it says :

 

This formula shows how to beat sync an LFO
-- via the 'BEATS' variable. Play the song to
-- see the LFO moving.

 

Is the 'beats' variable lines per cycle in the LFO, or the 'speed' slider in the formula device?

 

Sorry I am 100% noob with formula device.


Edited by lettuce, 05 February 2018 - 02:07.


#4 Zer0 Fly

Zer0 Fly

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1215 posts
  • Gender:Male
  • Location:Oops
  • Interests:Flying

Posted 05 February 2018 - 02:44

formula device will just transform or generate slider control with lua code.

 

The "LFO beatsynced" preset is an lfo by itself - it will generate a sine lfo based on song position in very simple way by itself. Only while song is playing. I think it is rather a quick demo of how the variables are used, not thought to be a complete lfo. You can code pretty complex stuff using this device.

 

My formula you get when copy/paste stuff in spoiler in above post to track is different. It will just translate the values, so you can select exact LPC values in a LFO by pattern commands. It should have as formula "1/(A*255*Multiplier)". You hook this device into a lfo speed, not some other fomula. Then you set the first slider "PatternFX" to values from pattern data.

 

It will wrap the values such that a pattern command like "1101" onto the "pattern FX" slider will set the LFO speed slider to 1.000 lines per cycle, using "1105" will set it to 5.000 LPC, "1110" to 16 LPC. So you can control speed exactly in number of lines by the hex value of the pattern comand, from 1 to 255 lines. I thought that was what you wanted. You can edit the "local Multiplier = 1.0" to for example "local Multiplier = 0.5" and then you double the resolution, so "1105" is 0.5*5 = 2.500 LPC. You can use any number or expression... for example "1/3" will give 1/3rd line resolution, though the first three values will of course result in speed 1LPC because the LFO cannot go faster. I think I should also add an offset function.

 

Or it could also get a table, such that any value like "1101" "1102" "1103" etc would set the LFO to a LPC value you define yoursef...but then you need to edit the code to input your LPC values. But you need not code, you just need to know how to define numbers in text.

 

You of course also need to reset the LFO to get it in sync, the formula will only change the speed.


Edited by OopsIFly, 05 February 2018 - 02:47.

  • assink likes this

#5 lettuce

lettuce

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 623 posts
  • Gender:Male

Posted 05 February 2018 - 03:13

I understand now that works nicely, thanks.

For a clean 8 line cycle I can put an '1108' formula device, slider 1 command with an LFO reset command, '1800' alongside ( when using the formula you wrote ).

 

Its a shame that pattern effect command ( 16xx )  can not set an exact number of lines to control an LFO devices frequency slider, but I can always use your formula or automation lanes with points ( not forgetting the LFO reset '1800' with every LPC change ).

 

It seems the 'up' and 'down' arrows next to the automation lanes value box are not accurate enough to set exact LPCs, so the value must be typed into the box.


Edited by lettuce, 05 February 2018 - 03:15.


#6 Zer0 Fly

Zer0 Fly

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1215 posts
  • Gender:Male
  • Location:Oops
  • Interests:Flying

Posted 05 February 2018 - 03:22

Here I made the table thing.

 

It works like the other. But instead of line speed, each number will access a value in a table. Go to the code section of the formula device, look into the lines in the text editor, it is a small one and will scroll down. you can add your own values or delete some, just as you wish. You can skip values. The "0x" in front will tell it its a hex number just like the pattern commands use - you can assign each of the 256 possible pattern fx command states its own speed or leave it blank. You can program your own LFO speed command with custom values. If value is 0.0 or undefined, it will set the LFO into -inf mode so frozen. In example I defined the command zero to freezing the LFO.

 

Have good fun...

 

Spoiler

  • Raegae and assink like this

#7 lettuce

lettuce

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 623 posts
  • Gender:Male

Posted 05 February 2018 - 03:54

Thanks for making and posting this.

Its a great introduction to the formula device.

Nice examples of how to make custom commands to control LFO frequency.

Looks like there should be no concern about the accuracy of of the LFO frequency as is can be defined up to 19 decimal places.

 

<FunctionsParagraph>-- 0.0 = -inf speed</FunctionsParagraph>  1100 = -inf  LPC ( frozen )

 

<FunctionsParagraph>slots[0x4]=5.3984572364283457236</FunctionsParagraph> 1104 = 5.3984572364283457236 LPC

 

I guess the straight LFO cycles would all be 64 divided by 2, 4, 8, 16, 32, 64, 128, 256 ( if pattern length was 64 ).

 

If I type a number with 19 decimal places ( like the number in [0x4] example )  into the value box in automation lanes, will it remain but only show 3 decimal places, or will it round the number up  to 3 decimal places?

 

I only ask because 8 lines divided by 3 ( a half-note / minim triplet, if LPB is 4?? ) is 2.6666666666666666.



#8 Zer0 Fly

Zer0 Fly

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1215 posts
  • Gender:Male
  • Location:Oops
  • Interests:Flying

Posted 05 February 2018 - 16:03

Glad you like it. As I said you can remove/skip/add numbers to your liking, and they don't have to be defined in the right order. You build your own LFO speed command.

 

Renoise effects will crop the number display, but internally they will work with much more precise numbers. So you can use stuff like "64/3", I think it will stay as exact as 32bit floating point numbers will allow. This is also true for number you enter with numberical keyboard after clicking on the values. You can see exact used number by for example copy the device, then paste into a text editor, or use scripting functions to read out the values.

 

Btw the numbers is the number of lines that one LFO cycle will last. So low numbers are fast, and large numbers will be very slow. So if pattern length is 64, that value will make the LFO cycle once during a pattern. The 64/3 will of course make it cycle three times during a pattern.



#9 assink

assink

    Member

  • Normal Members
  • PipPip
  • 25 posts
  • Gender:Not Telling

Posted 05 February 2018 - 19:00

Yes, nice one! Also was just looking for a easy way to automate my lfo freq. :)
Thanks for this OopslFly


  • Zer0 Fly likes this

#10 lettuce

lettuce

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 623 posts
  • Gender:Male

Posted 05 February 2018 - 21:46


Renoise effects will crop the number display, but internally they will work with much more precise numbers. So you can use stuff like "64/3", I think it will stay as exact as 32bit floating point numbers will allow.

 

Thanks. This is good information to know.


  • Zer0 Fly likes this





Also tagged with one or more of these keywords: lfo, lines per cycle