Skip to content

Instantly share code, notes, and snippets.

@trentgill
Created June 11, 2020 22:13
Show Gist options
  • Save trentgill/f19606ad65696fd17b918b0d9126c93d to your computer and use it in GitHub Desktop.
Save trentgill/f19606ad65696fd17b918b0d9126c93d to your computer and use it in GitHub Desktop.
--- 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
@electricbard
Copy link

electricbard commented Nov 21, 2020

@trentgill Can you confirm?

To avoid crashes:

ii.jf.trigger(0, 0)
j = ii.jf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment