Skip to content
Permalink
Browse files

Merge pull request #6 from evanmcook/main

~graphis~
  • Loading branch information
tyleretters committed Dec 18, 2020
2 parents d3fdfe4 + 0373e2f commit e54d28260ebc9274de6b0e317e7bf3bc4f2abbf7
Showing with 34 additions and 0 deletions.
  1. +1 −0 README.md
  2. +5 −0 lib/graphics.lua
  3. +28 −0 song.lua
1 README.md 100644 → 100755
@@ -33,3 +33,4 @@ auguries of innocence from william blake has really resonated with me this year.
- @schollz - added sixteenth note transports. added in some melodies for quarter notes and sixteenth notes by transforming a recorded midi dump into lua code using soon-to-be released midi script extension for norns.
- @Quixotic7 - replaced the polyperc engine with the bangs engine. This allows you to have different sounding note bangs. In the params menu you can change the synth parameters for 4 different synth sources. Sounds are banged by calling soundEngine:bang_note_hz(freq, synthId, midiId) and soundEngine:bang_note(noteNumber, synthId, midiId). Midi bangs only work if calling soundEngine:bang_note so the song currently only works with the internal synths since all the notes are frequencies.
- @ryanlaws - was being a real prima donna about hz and changed them to MIDI notes
- @evanmcook - aka evancook.audio added graphics that like to groove along to the measure number
5 lib/graphics.lua 100644 → 100755
@@ -71,4 +71,9 @@ function graphics:text_center_rotate(x, y, s, d, l)
screen.text_center_rotate(x, y, s, d)
end

function graphics:bez(x1, y1, x2, y2, x3, y3)
screen.curve(x1, y1, x2, y2, x3, y3)
screen:stroke ()
end

return graphics
28 song.lua 100644 → 100755
@@ -52,6 +52,9 @@ function redraw()
graphics:text_rotate(7, 62, "SONG", -90, 0)
graphics:text(10, 7, (song.is_playing == true) and "PLAYING" or "STOPPED", 15)
graphics:text(10, 14, "MEASURE: " .. song.measure, 15)
legalGraphics()
illegalGraphics()
checkIfNice()
graphics:teardown()
end

@@ -67,6 +70,31 @@ function key(k, z)
song.is_screen_dirty = true
end

function legalGraphics()
if (song.measure%4 == 0) then
bright = song.measure%15
radness = song.measure%9-song.measure%2
graphics:circle(64,32,radness,bright)
end
if (song.measure%3==0 and song.measure%7==0) then
graphics:bez(100,60,0,80,100,119)
end
end

function illegalGraphics()
if (song.measure>=420 and song.measure<430) then
graphics:text(10, 28, "these measures ", 15)
graphics:text(10, 35, "are illegal to ", 15)
graphics:text(10, 42, "inhale ", 15)
end
end

function checkIfNice()
if (song.measure==69) then
graphics:text(10, 21, "nice", 15)
end
end

function enc(e, d)
print(e, d, "???")
song.is_screen_dirty = true

0 comments on commit e54d282

Please sign in to comment.