Skip to content

Instantly share code, notes, and snippets.

@trentgill
Created May 7, 2020 22:17
Show Gist options
  • Save trentgill/3c5cabcbbd882bb17861f61ab9a90637 to your computer and use it in GitHub Desktop.
Save trentgill/3c5cabcbbd882bb17861f61ab9a90637 to your computer and use it in GitHub Desktop.
--- emulating Three Sisters' SPAN control
-- input 1 == frequency
-- input 2 == span
-- output (1,2,3) == low, centre, high
function init()
input[1].mode( 'stream', 0.01 )
for i=1,3 do output[i].slew = 0.01 end
end
input[1].stream = function( v )
local span = input[2].volts
output[1].volts = v-span
output[2].volts = v
output[3].volts = v+span
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment