Created
September 23, 2018 16:23
-
-
Save daniel-bytes/8a4dfa8bf989734f47c7a85ee6e5e02a to your computer and use it in GitHub Desktop.
gendy-tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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