aboutsummaryrefslogtreecommitdiff
path: root/rhodes.lua
diff options
context:
space:
mode:
authorgretchen <gretchen@gnar.cool>2019-11-18 22:47:46 -0800
committergretchen <gretchen@gnar.cool>2019-11-18 22:47:46 -0800
commitadb657e192e3396cd06de9da50e08d29d60b26d2 (patch)
tree8233c9239a6e27560b4853ef7bcf2f37b01976fd /rhodes.lua
downloadrhodes-adb657e192e3396cd06de9da50e08d29d60b26d2.tar.gz
rhodes-adb657e192e3396cd06de9da50e08d29d60b26d2.zip
fm rhodes for nornsv0.1
Diffstat (limited to 'rhodes.lua')
-rw-r--r--rhodes.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/rhodes.lua b/rhodes.lua
new file mode 100644
index 0000000..d9a1ee1
--- /dev/null
+++ b/rhodes.lua
@@ -0,0 +1,28 @@
+engine.name = "Rhodes"
+
+local MusicUtil = require "musicutil"
+
+function redraw()
+ screen.clear()
+ screen.move(64, 32)
+ screen.text_center("rhodes.")
+ screen.update()
+end
+
+function init ()
+ redraw()
+ m = midi.connect(1)
+ m.event = function (a)
+ b = midi.to_msg(a)
+ if b.type == "note_on" then
+ engine.note_on(b.note, b.vel or 60)
+ elseif b.type == "note_off" then
+ engine.note_off(b.note)
+ end
+ end
+end
+
+
+-- Local Variables:
+-- compile-command: "make upload"
+-- End: