From a38250123d31df15177ae51b2fb16d6ff21c7abe Mon Sep 17 00:00:00 2001 From: gretchen Date: Fri, 24 Jul 2020 00:04:37 -0700 Subject: Rhodes pixel art --- Makefile | 2 +- lib/Engine_Rhodes.sc | 1 + rhodes.lua | 16 ++++++++++++---- rhodes.png | Bin 0 -> 1499 bytes 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 rhodes.png diff --git a/Makefile b/Makefile index 874f48e..cb902ca 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: -upload: rhodes.lua lib/Engine_Rhodes.sc +upload: rhodes.lua lib/Engine_Rhodes.sc rhodes.png find . -not -path '*/\.*' -type f | xargs -P 5 -n 1 norns_upload gretchen/rhodes norns_load gretchen/rhodes rhodes.lua diff --git a/lib/Engine_Rhodes.sc b/lib/Engine_Rhodes.sc index a644c96..104f87d 100644 --- a/lib/Engine_Rhodes.sc +++ b/lib/Engine_Rhodes.sc @@ -1,3 +1,4 @@ +// -*- compile-command: "make upload" -*- // Adapted from https://sccode.org/1-522, which is adapted in // turn from STK's 'rhodey', which is adapted from a TX81z // algorithm. diff --git a/rhodes.lua b/rhodes.lua index fc88e35..04a8b1a 100644 --- a/rhodes.lua +++ b/rhodes.lua @@ -7,10 +7,18 @@ engine.name = "Rhodes" local MusicUtil = require "musicutil" local ControlSpec = require "controlspec" -function redraw() - screen.clear() - screen.move(64, 32) - screen.text_center("rhodes.") +local _dirname +function dir(f) + if not _dirname then + source = string.gsub(debug.getinfo(1,'S').source, "@", "") + _dirname = string.gsub(source, "[^/.]+.lua", "") + end + return _dirname.."/"..f +end + +function redraw(level) + screen.clear(); + screen.display_png(dir("rhodes.png"), 0, 0); screen.update() end diff --git a/rhodes.png b/rhodes.png new file mode 100644 index 0000000..0a8137c Binary files /dev/null and b/rhodes.png differ -- cgit v1.2.1