Created
June 11, 2020 22:13
-
-
Save trentgill/f19606ad65696fd17b918b0d9126c93d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- An exploration of Just Friends' Geode | |
j = ii.jf -- alias used throughout | |
function init() | |
j.mode(1) | |
input[1]{ mode = 'change' | |
, direction = 'rising' | |
} | |
end | |
counter = 0 | |
divs = 1 | |
vox = 1 | |
input[1].change = function( count ) | |
j.tick(8) | |
counter = counter + 1 | |
if counter > 2 then | |
counter = 0 | |
--voice( vox, divs, divs ) | |
voice( vox, divs, divs ) | |
vox = vox +1 | |
if vox > 6 then vox = 1 end | |
divs = divs + 1 | |
if divs == 32 then divs = 1 end | |
end | |
end | |
function voice( chan, divs, repeats ) | |
j.play_voice( chan, vtoi(divs), vtoi(repeats) ) | |
end | |
function note( divs, repeats ) | |
j.play_note( vtoi(divs), vtoi(repeats) ) | |
end | |
function vtoi(volts) | |
return volts/1638.3 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@trentgill Can you confirm?
To avoid crashes:
ii.jf.trigger(0, 0)
j = ii.jf