Skip to content

Commit

Permalink
first commit for 0.6.x firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperNiCd committed Mar 14, 2021
1 parent 874e2a5 commit 2616d47
Show file tree
Hide file tree
Showing 46 changed files with 2,155 additions and 833 deletions.
28 changes: 14 additions & 14 deletions ABSwitch.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- GLOBALS: app, os, verboseLevel, connect, tie
local app = app
local libcore = require "core.libcore"
local Class = require "Base.Class"
local Unit = require "Unit"
local ModeSelect = require "Unit.ViewControl.OptionControl"
Expand All @@ -20,31 +20,31 @@ function ABSwitch:init(args)
end

function ABSwitch:onLoadGraph(channelCount)
local a = self:createObject("ConstantGain","a")
local b = self:createObject("ConstantGain","b")
local sum = self:createObject("Sum","sum")
local a = self:addObject("a",app.ConstantGain())
local b = self:addObject("b",app.ConstantGain())
local sum = self:addObject("sum",app.Sum())
a:hardSet("Gain",1.0)
b:hardSet("Gain",1.0)
a:setClampInDecibels(-59.9)
b:setClampInDecibels(-59.9)
self:createMonoBranch("inA", a, "In", a,"Out")
self:createMonoBranch("inB", b, "In", b,"Out")
self:addMonoBranch("inA", a, "In", a,"Out")
self:addMonoBranch("inB", b, "In", b,"Out")


local one = self:createObject("Constant","one")
local one = self:addObject("one",app.Constant())
one:hardSet("Value",1.0)
local negOne = self:createObject("Constant","negOne")
local negOne = self:addObject("negOne",app.Constant())
negOne:hardSet("Value",-1.0)
local invert = self:createObject("Multiply","invert")
local sub = self:createObject("Sum","sub")
local vcaA = self:createObject("Multiply","vcaA")
local vcaB = self:createObject("Multiply","vcaB")
local invert = self:addObject("invert",app.Multiply())
local sub = self:addObject("sub",app.Sum())
local vcaA = self:addObject("vcaA",app.Multiply())
local vcaB = self:addObject("vcaB",app.Multiply())

local ab = self:createObject("Comparator","ab")
local ab = self:addObject("ab",app.Comparator())
ab:setToggleMode()


self:createMonoBranch("ab",ab,"In",ab,"Out")
self:addMonoBranch("ab",ab,"In",ab,"Out")

connect(b,"Out",vcaA,"Left")
connect(ab,"Out",vcaA,"Right")
Expand Down
16 changes: 16 additions & 0 deletions Accents.cpp.swig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%module Accents_libAccents
%include <od/glue/mod.cpp.swig>

%{

#undef SWIGLUA

#include </home/joe/Accents/Accents/VoltageVault.h>
#include </home/joe/Accents/Accents/Maths.h>

#define SWIGLUA

%}

%include </home/joe/Accents/Accents/VoltageVault.h>
%include </home/joe/Accents/Accents/Maths.h>
67 changes: 34 additions & 33 deletions Amie.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- GLOBALS: app, os, verboseLevel, connect, tie
local app = app
local libcore = require "core.libcore"
local Class = require "Base.Class"
local Unit = require "Unit"
local Pitch = require "Unit.ViewControl.Pitch"
Expand All @@ -21,42 +22,42 @@ end
function Amie:onLoadGraph(channelCount)

--carrier
local carrier = self:createObject("SineOscillator","carrier")
local ctune = self:createObject("ConstantOffset","ctune")
local ctuneRange = self:createObject("MinMax","ctuneRange")
local cf0 = self:createObject("GainBias","cf0")
local cf0Range = self:createObject("MinMax","cf0Range")
local climgain = self:createObject("ConstantGain","climgain")
local climiter = self:createObject("Limiter","climiter")
local cfdbk = self:createObject("GainBias","cfdbk")
local cfdbkRange = self:createObject("MinMax","cfdbkRange")
local carrier = self:addObject("carrier",libcore.SineOscillator())
local ctune = self:addObject("ctune",app.ConstantOffset())
local ctuneRange = self:addObject("ctuneRange",app.MinMax())
local cf0 = self:addObject("cf0",app.GainBias())
local cf0Range = self:addObject("cf0Range",app.MinMax())
local climgain = self:addObject("climgain",app.ConstantGain())
local climiter = self:addObject("climiter",libcore.Limiter())
local cfdbk = self:addObject("cfdbk",app.GainBias())
local cfdbkRange = self:addObject("cfdbkRange",app.MinMax())
connect(cfdbk,"Out",cfdbkRange,"In")

-- modulator
local modulator = self:createObject("SineOscillator","modulator")
local mRatio = self:createObject("GainBias","mRatio")
local mRatioRange = self:createObject("MinMax","mRatioRange")
local mRatioVCA = self:createObject("Multiply","mRatioVCA")
local mlimgain = self:createObject("GainBias","mlimgain")
local mlimiter = self:createObject("Limiter","mlimiter")
local mfdbk = self:createObject("GainBias","mfdbk")
local mfdbkRange = self:createObject("MinMax","mfdbkRange")
local modulator = self:addObject("modulator",libcore.SineOscillator())
local mRatio = self:addObject("mRatio",app.GainBias())
local mRatioRange = self:addObject("mRatioRange",app.MinMax())
local mRatioVCA = self:addObject("mRatioVCA",app.Multiply())
local mlimgain = self:addObject("mlimgain",app.GainBias())
local mlimiter = self:addObject("mlimiter",libcore.Limiter())
local mfdbk = self:addObject("mfdbk",app.GainBias())
local mfdbkRange = self:addObject("mfdbkRange",app.MinMax())
connect(mfdbk,"Out",mfdbkRange,"In")

-- AM VCA
local amvca = self:createObject("Multiply","amvca")
local amIndex = self:createObject("GainBias","amIndex")
local amIndexRange = self:createObject("MinMax","amIndexRange")
local amvca = self:addObject("amvca",app.Multiply())
local amIndex = self:addObject("amIndex",app.GainBias())
local amIndexRange = self:addObject("amIndexRange",app.MinMax())

-- wet/dry mixer
local mixer = self:createObject("CrossFade","mixer")
local wet = self:createObject("GainBias","wet")
local wetRange = self:createObject("MinMax","wetRange")
local mixer = self:addObject("mixer",app.CrossFade())
local wet = self:addObject("wet",app.GainBias())
local wetRange = self:addObject("wetRange",app.MinMax())

-- output volume control
local vca = self:createObject("Multiply","vca")
local level = self:createObject("GainBias","level")
local levelRange = self:createObject("MinMax","levelRange")
local vca = self:addObject("vca",app.Multiply())
local level = self:addObject("level",app.GainBias())
local levelRange = self:addObject("levelRange",app.MinMax())

--tuning
connect(ctune,"Out",ctuneRange,"In")
Expand Down Expand Up @@ -93,13 +94,13 @@ function Amie:onLoadGraph(channelCount)
connect(vca,"Out",self,"Out2")
end

self:createMonoBranch("level",level,"In",level,"Out")
self:createMonoBranch("tune",ctune,"In",ctune,"Out")
self:createMonoBranch("f0",cf0,"In",cf0,"Out")
self:createMonoBranch("ratio",mRatio,"In",mRatio,"Out")
self:createMonoBranch("wet",wet,"In",wet,"Out")
self:createMonoBranch("cfdbk",cfdbk,"In",cfdbk,"Out")
self:createMonoBranch("mfdbk",mfdbk,"In",mfdbk,"Out")
self:addMonoBranch("level",level,"In",level,"Out")
self:addMonoBranch("tune",ctune,"In",ctune,"Out")
self:addMonoBranch("f0",cf0,"In",cf0,"Out")
self:addMonoBranch("ratio",mRatio,"In",mRatio,"Out")
self:addMonoBranch("wet",wet,"In",wet,"Out")
self:addMonoBranch("cfdbk",cfdbk,"In",cfdbk,"Out")
self:addMonoBranch("mfdbk",mfdbk,"In",mfdbk,"Out")
end

local views = {
Expand Down
43 changes: 22 additions & 21 deletions BespokeAliasingPulse.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- GLOBALS: app, os, verboseLevel, connect, tie
local app = app
local libcore = require "core.libcore"
local Class = require "Base.Class"
local Unit = require "Unit"
local Pitch = require "Unit.ViewControl.Pitch"
Expand Down Expand Up @@ -28,22 +29,22 @@ end

function AliasingPulse:loadMonoGraph()
-- create objects
local osc = self:createObject("SineOscillator","osc")
local tune = self:createObject("ConstantOffset","tune")
local tuneRange = self:createObject("MinMax","tuneRange")
local f0 = self:createObject("GainBias","f0")
local f0Range = self:createObject("MinMax","f0Range")
local vca = self:createObject("Multiply","vca")
local level = self:createObject("GainBias","level")
local levelRange = self:createObject("MinMax","levelRange")
local bump = self:createObject("BumpMap","bump")
local width = self:createObject("ParameterAdapter","width")
local oscVca = self:createObject("Multiply","oscVca")
local oscVcaMult = self:createObject("Constant","oscVcaMult")
local compVca = self:createObject("Multiply","compVca")
local compVcaMult = self:createObject("Constant","compVcaMult")
local offset = self:createObject("ConstantOffset","offset")
local sync = self:createObject("Comparator","sync")
local osc = self:addObject("osc",libcore.SineOscillator())
local tune = self:addObject("tune",app.ConstantOffset())
local tuneRange = self:addObject("tuneRange",app.MinMax())
local f0 = self:addObject("f0",app.GainBias())
local f0Range = self:addObject("f0Range",app.MinMax())
local vca = self:addObject("vca",app.Multiply())
local level = self:addObject("level",app.GainBias())
local levelRange = self:addObject("levelRange",app.MinMax())
local bump = self:addObject("bump",libcore.BumpMap())
local width = self:addObject("width",app.ParameterAdapter())
local oscVca = self:addObject("oscVca",app.Multiply())
local oscVcaMult = self:addObject("oscVcaMult",app.Constant())
local compVca = self:addObject("compVca",app.Multiply())
local compVcaMult = self:addObject("compVcaMult",app.Constant())
local offset = self:addObject("offset",app.ConstantOffset())
local sync = self:addObject("sync",app.Comparator())
sync:setTriggerMode()

tie(bump,"Width",width,"Out")
Expand Down Expand Up @@ -73,11 +74,11 @@ function AliasingPulse:loadMonoGraph()
connect(compVca,"Out",vca,"Right")
connect(vca,"Out",self,"Out1")

self:createMonoBranch("level",level,"In",level,"Out")
self:createMonoBranch("tune",tune,"In",tune,"Out")
self:createMonoBranch("f0",f0,"In",f0,"Out")
self:createMonoBranch("width",width,"In",width,"Out")
self:createMonoBranch("sync",sync,"In",sync,"Out")
self:addMonoBranch("level",level,"In",level,"Out")
self:addMonoBranch("tune",tune,"In",tune,"Out")
self:addMonoBranch("f0",f0,"In",f0,"Out")
self:addMonoBranch("width",width,"In",width,"Out")
self:addMonoBranch("sync",sync,"In",sync,"Out")

end

Expand Down
37 changes: 19 additions & 18 deletions BespokeBPF.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- GLOBALS: app, os, verboseLevel, connect, tie
local app = app
local libcore = require "core.libcore"
local Class = require "Base.Class"
local Unit = require "Unit"
local Fader = require "Unit.ViewControl.Fader"
Expand All @@ -18,8 +19,8 @@ function BespokeBPF:init(args)
end

function BespokeBPF:onLoadGraph(channelCount)
local lpfilter = self:createObject("StereoLadderFilter","filter")
local hpfilter = self:createObject("StereoLadderHPF","filter")
local lpfilter = self:addObject("filter",libcore.StereoLadderFilter())
local hpfilter = self:addObject("filter",libcore.StereoLadderHPF())
if channelCount==2 then
connect(self,"In1",lpfilter,"Left In")
connect(lpfilter,"Left Out",hpfilter,"Left In")
Expand All @@ -33,27 +34,27 @@ function BespokeBPF:onLoadGraph(channelCount)
connect(hpfilter,"Left Out",self,"Out1")
end

local tune = self:createObject("ConstantOffset","tune")
local tuneRange = self:createObject("MinMax","tuneRange")
local tune = self:addObject("tune",app.ConstantOffset())
local tuneRange = self:addObject("tuneRange",app.MinMax())

local f0 = self:createObject("GainBias","f0")
local f0Range = self:createObject("MinMax","f0Range")
local f0 = self:addObject("f0",app.GainBias())
local f0Range = self:addObject("f0Range",app.MinMax())

local res = self:createObject("GainBias","res")
local resRange = self:createObject("MinMax","resRange")
local res = self:addObject("res",app.GainBias())
local resRange = self:addObject("resRange",app.MinMax())

local clipper = self:createObject("Clipper","clipper")
local clipper = self:addObject("clipper",libcore.Clipper())
clipper:setMaximum(0.999)
clipper:setMinimum(0)

local bw = self:createObject("GainBias","bw")
local bwRange = self:createObject("MinMax","bwRange")
local bw = self:addObject("bw",app.GainBias())
local bwRange = self:addObject("bwRange",app.MinMax())

local negate = self:createObject("ConstantGain","negate")
local negate = self:addObject("negate",app.ConstantGain())
negate:hardSet("Gain",-1)

local addBw = self:createObject("Sum","addBw")
local subBw = self:createObject("Sum","subBw")
local addBw = self:addObject("addBw",app.Sum())
local subBw = self:addObject("subBw",app.Sum())

connect(tune,"Out",lpfilter,"V/Oct")
connect(tune,"Out",hpfilter,"V/Oct")
Expand All @@ -79,10 +80,10 @@ function BespokeBPF:onLoadGraph(channelCount)
connect(clipper,"Out",hpfilter,"Resonance")
connect(clipper,"Out",resRange,"In")

self:createMonoBranch("tune",tune,"In",tune,"Out")
self:createMonoBranch("Q",res,"In",res,"Out")
self:createMonoBranch("f0",f0,"In",f0,"Out")
self:createMonoBranch("bw",bw,"In",bw,"Out")
self:addMonoBranch("tune",tune,"In",tune,"Out")
self:addMonoBranch("Q",res,"In",res,"Out")
self:addMonoBranch("f0",f0,"In",f0,"Out")
self:addMonoBranch("bw",bw,"In",bw,"Out")
end

local views = {
Expand Down
Loading

0 comments on commit 2616d47

Please sign in to comment.