Skip to content
Permalink
Browse files

prune

  • Loading branch information
tehn committed May 23, 2018
1 parent 00b5b44 commit aea9d83bdc85a002d8fffc7c10e4371951448686
@@ -7,22 +7,22 @@
-- key 2 = random walk
-- key 3 = mutate

sliders = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
edit = 1
accum = 1
step = 0
local sliders = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
local edit = 1
local accum = 1
local step = 0

engine.name = 'TestSine'


init = function()
function init()
print("16sliders: loaded engine")
engine.hz(100)
engine.amp(0.1)
k:start()
end

k = metro[1]
local k = metro[1]
k.count = -1
k.time = 0.1
k.callback = function(stage)
@@ -32,7 +32,7 @@ k.callback = function(stage)
end


enc = function(n, delta)
function enc(n, delta)
if n == 2 then
accum = (accum + delta) % 16
edit = accum
@@ -44,9 +44,9 @@ enc = function(n, delta)
redraw()
end

key = function(n, z)
function key(n, z)
if n == 2 and z == 1 then
sliders[1] = math.random()*4
sliders[1] = math.floor(math.random()*4)
for i=2, 16 do
sliders[i] = sliders[i-1]+math.floor(math.random()*9)-3
end
@@ -59,7 +59,7 @@ key = function(n, z)
end
end

redraw = function()
function redraw()
screen.aa(1)
screen.line_width(1.0)
screen.clear()
@@ -6,8 +6,12 @@
-- specify dsp engine to load:
engine.name = 'TestSine'

function init()
engine.amp(0)
end

-- screen redraw function
redraw = function()
function redraw()
-- clear screen
screen.clear()
-- set pixel brightness (0-15)
File renamed without changes.
@@ -4,7 +4,8 @@

engine.name = 'TestSine'

init = function()
function init()
engine.amp(0.1)
params:add_number("num")
params:add_option("output",{"MIDI","OSC","SYNTH","CV"})
params:add_control("something",controlspec.UNIPOLAR)
@@ -15,7 +16,7 @@ init = function()
params:read("ptest.pset")
end

key = function(n,z)
function key(n,z)
if z==1 then
if n == 2 then
params:read("ptest.pset")
@@ -26,7 +27,7 @@ key = function(n,z)
redraw()
end

enc = function(n,d)
function enc(n,d)
if n == 2 then
params:delta("freq",d/10)
elseif n==3 then
@@ -35,7 +36,7 @@ enc = function(n,d)
redraw()
end

redraw = function()
function redraw()
screen.clear()
screen.move(0,10)
screen.level(15)
@@ -44,6 +45,6 @@ redraw = function()
end


cleanup = function()
--params:write("ptest.pset")
function cleanup()
params:write("ptest.pset")
end

This file was deleted.

0 comments on commit aea9d83

Please sign in to comment.