Created
June 11, 2020 22:12
-
-
Save trentgill/0087830f06fd7373e90b4802c32f9a3c 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' | |
} | |
output[1]( lfo( 5,1) ) | |
voice( 1, 4, 3 ) -- 4 triggers in a single beat | |
end | |
counter = 0 | |
input[1].change = function( count ) | |
j.tick(8) | |
-- incrementing counter | |
counter = counter +1 | |
if counter > 16 then counter = 0 end | |
-- conditional rythmic events | |
if counter == 1 then | |
output[1]() | |
voice( 2, 10, 6 ) | |
voice( 4, 3, 2 ) | |
voice( 5, 5, 4 ) | |
voice( 6, 7, 6 ) | |
elseif counter == 8 then | |
voice( 1, 5, 16 ) | |
elseif counter == 13 then | |
voice( 3, 7, 16 ) | |
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
@electricbard yes thatll do it. It just makes the alias work without using too much memory due to some weird dynamic loading under the hood