aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgretchen <gretchen@gnar.cool>2019-11-19 00:05:47 -0800
committergretchen <gretchen@gnar.cool>2019-11-19 00:05:47 -0800
commit389d32638b24186bbf6c0b76642edbd7cd2467b9 (patch)
treededea8f7c9e49b976bcbd5f43a7fb9dd2d866538
parentfd549d7540a04677e1b10c8f324c958cfba18f1e (diff)
downloadrhodes-389d32638b24186bbf6c0b76642edbd7cd2467b9.tar.gz
rhodes-389d32638b24186bbf6c0b76642edbd7cd2467b9.zip
keypress and description screen
-rw-r--r--rhodes.lua11
1 files changed, 11 insertions, 0 deletions
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"