LFO reset in doofer

Did manage to get two formula devices in a doofer to do this with no pattern commands. This doofer simply resets a LFO for a filter at line one of pattern:

DOOFER: LFO Reset Line One.xrdp

I’m not too familiar with formula device so maybe there is a better way to do it more precisely with one of the ‘SAMPLES’ variables, or with just one device? When trying with just one though, the reset button just kept firing whatever the output value was, thus the first formula device added to switch the second on and off quickly; you wont actually see it switch on and off due to speed of it.

Formula dev 1 switches formula device 2 on and off at line 1 using LINEF.

function example()
  --formula 2 on
  if LINEF == 0 then 
   return 1
  end
  --formula 2 off
  return 0
end

Formula dev 2 simply returns 1 to reset the LFO. Firing when it gets switched on briefly by F1

function example()
  return 1
end
1 Like