Created
June 10, 2020 19:50
-
-
Save trentgill/a579dc2fc63fc7e2f1b0de1ebeb8eb61 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
--- Exploring crow's input modes | |
function init() | |
input[1].mode( 'volume', 0.001 ) | |
output[4].slew = 3 | |
end | |
new_base = false | |
input[1].volume = function( level ) | |
--if level < output[2].volts then | |
-- output[2].slew = 2 | |
--else | |
-- output[2].slew = 0 | |
--end | |
output[1].volts = level * 1.5 | |
output[2].volts = level * 3 | |
if level < 0.08 and new_base then | |
output[3].volts = math.random(12)/12 | |
new_base = false | |
elseif level >= 0.08 then | |
new_base = true | |
end | |
output[4].volts = level * 2 | |
end | |
--myscale = {0,4,7,11} | |
-- | |
--function init() | |
-- input[1].mode( 'scale', myscale ) | |
-- ii.jf.mode(1) | |
--end | |
-- | |
--input[1].scale = function( s ) | |
-- output[1].volts = s.volts | |
-- --output[2]( ar() ) | |
-- | |
-- --output[1].volts = myscale[#myscale - s.index + 1]/12 + s.octave | |
-- local n = myscale[#myscale - s.index +1]/12 + s.octave | |
-- output[1].volts = n | |
-- ii.jf.play_note( n, 10 ) | |
-- | |
--end | |
--input[1].window = function( index, direction ) | |
-- print(index, direction) | |
-- if index == 1 then -- negative trigger | |
-- output[1].volts = 0 | |
-- output[2]( ar() ) | |
-- elseif index == 3 then -- positive trigger | |
-- output[1].volts = 1 | |
-- output[2]( lfo() ) | |
-- end | |
-- --output[1].slew = (direction) and 0 or 0.1 | |
-- --output[1].volts = index - 3 | |
--end | |
--function init() | |
-- --input[1].mode( 'stream', 0.0015 ) | |
-- --input[1].mode( 'change', 6 ) | |
-- --output[2].volts = input[1].volts | |
--end | |
--input[1].change = function( state ) | |
-- output[2].volts = (state) and 8 or 0 | |
--end | |
--input[1].stream = function( val ) | |
-- output[2].volts = val | |
--end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment