From 64170d3db392bf9c105bd85f4ebf3157118aa5d0 Mon Sep 17 00:00:00 2001 From: dan derks Date: Thu, 4 Aug 2022 07:07:28 -0400 Subject: [PATCH 1/2] hotfix: lfo `:add` gah! the `:add` method wasn't properly invoking the `.new` function --- lua/lib/lfo.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/lib/lfo.lua b/lua/lib/lfo.lua index e4f5d122a..28ee71b75 100644 --- a/lua/lib/lfo.lua +++ b/lua/lib/lfo.lua @@ -4,7 +4,6 @@ -- added by @dndrks + @sixolet local lattice = require 'lattice' -local hook = require 'core/hook' local LFO = {} LFO.__index = LFO @@ -79,7 +78,7 @@ function LFO:add(args) local mode = args.mode == nil and 'clocked' or args.mode local period = args.period == nil and 4 or args.period local action = args.action == nil and (function(scaled, raw) end) or args.action - self.new(shape, min, max, depth, mode, period, action) + return self.new(shape, min, max, depth, mode, period, action) end -- PARAMETERS UI / From 61bb354bdc39e9ec0a5ed0ce02ad5652846dc47e Mon Sep 17 00:00:00 2001 From: dan derks Date: Thu, 4 Aug 2022 07:14:15 -0400 Subject: [PATCH 2/2] Update lfo.lua --- lua/lib/lfo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lib/lfo.lua b/lua/lib/lfo.lua index 28ee71b75..ed8354178 100644 --- a/lua/lib/lfo.lua +++ b/lua/lib/lfo.lua @@ -57,7 +57,7 @@ function LFO.new(shape, min, max, depth, mode, period, action) wrap = false, formatter = nil } - i.action = action == nil and (function(scaled, raw) end) or fn + i.action = action == nil and (function(scaled, raw) end) or action return i end