From bc86b826715d707e79f80a575fbc84e77bf62fbe Mon Sep 17 00:00:00 2001 From: gretchen Date: Tue, 19 Nov 2019 02:01:24 -0800 Subject: Load default parameters; fix an error; more to do --- intervals.lua | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/intervals.lua b/intervals.lua index 04141b0..807d970 100644 --- a/intervals.lua +++ b/intervals.lua @@ -3,15 +3,15 @@ -- hear two notes; -- play two notes -- --- enc2: repeat --- enc3: skip +-- key2: repeat +-- key3: skip -- -- to do: --- 1) keep a score --- 2) select scales --- 3) select base tone --- 4) key signatures --- 5) play from input +-- 1) select base tone and a range +-- 2) key signatures +-- 3) listen to input (tuner-style) +-- 4) keep a score +-- 5) spaced repetition? local ControlSpec = require "controlspec" local MusicUtil = require "musicutil" @@ -491,7 +491,6 @@ function play(note, vel) end function init() - -- TODO save params:add({ type = "option", id = "output", @@ -571,14 +570,16 @@ function init() action = function(value) intervals_state.midi_out = midi.connect(value) end}) - params:bang() + params:default() play(60) end function cleanup() - intervals_state.timer:stop() + if intervals_state.timer then + intervals_state.timer:stop() + end end function redraw() @@ -592,3 +593,7 @@ end function key(n, x) state_call(intervals_state, "key", {n, x}) end + +-- Local Variables: +-- compile-command: "make upload" +-- End: -- cgit v1.2.1