From 389d32638b24186bbf6c0b76642edbd7cd2467b9 Mon Sep 17 00:00:00 2001 From: gretchen Date: Tue, 19 Nov 2019 00:05:47 -0800 Subject: keypress and description screen --- rhodes.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rhodes.lua b/rhodes.lua index d9a1ee1..ab2a49f 100644 --- a/rhodes.lua +++ b/rhodes.lua @@ -1,3 +1,7 @@ +-- midi fm rhodes +-- +-- key 2: play a C4 + engine.name = "Rhodes" local MusicUtil = require "musicutil" @@ -22,6 +26,13 @@ function init () end end +function key (n, x) + if n == 2 and x == 1 then + engine.note_on(60, 50) + elseif n == 2 and x == 0 then + engine.note_off(60) + end +end -- Local Variables: -- compile-command: "make upload" -- cgit v1.2.1