Skip to content

Instantly share code, notes, and snippets.

@daniel-bytes
Created September 23, 2018 16:23
Show Gist options
  • Save daniel-bytes/8a4dfa8bf989734f47c7a85ee6e5e02a to your computer and use it in GitHub Desktop.
Save daniel-bytes/8a4dfa8bf989734f47c7a85ee6e5e02a to your computer and use it in GitHub Desktop.
gendy-tutorial
engine.name = "GendyTutorial"
function init()
-- map our supercollider controls to norns parameters
params:add_control("x", controlspec.new(100,2000,"lin",0,0,""))
params:set_action("x", function(x) engine.x(x) end)
params:add_control("y", controlspec.new(0.01, 1.0,"lin",0,0,""))
params:set_action("y", function(x) engine.y(x) end)
-- set some initial values
mix.output(0.5)
engine.x(300)
engine.y(0.5)
engine.stopAll()
end
function enc(n,delta)
-- map our encoder changes to parameters
if n == 1 then
mix:delta("output", delta)
elseif n == 2 then
params:delta("x", delta)
elseif n == 3 then
params:delta("y", delta)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment