@Galapagoose All I did was copy your code, paste it into mine and removed the
function init()
ii.pullup(true)
ii.jf.mode(1)
input[1].mode(‘change’, 1, 0.1, ‘rising’)
end
saved it and uploaded it to crow. it then starts running the script and then I get
Merto.init: nothing available
my code now looks like this:
input[1].change = function(s)
ii.jf.play_note(input[2].volts,5)
end
– add this function to your script
– (to be included in crow firmware in future)
function delay( time, action )
local function devent()
action() – this line executes the delayed function
metro.free(dmetro.id)
end
local dmetro = metro.init( devent, time, 1 )
end
– delay the call that reads the input voltage by 3ms
– the old line is ‘wrapped’ in a function
– this stops it from being executed immediately
input[1].change = function(s)
delay( 0.003, function() ii.jf.play_note(input[2].volts,5) end )
end
function init()
ii.pullup(true)
ii.jf.mode(1)
input[1].mode(‘change’, 1, 0.1, ‘rising’)
end
I’m still a super noob so i may have stuffed it up?
I had a look at metro.lua on github and the code has metro with an uppercase M throughout it. would that be the issue?
Also is there a simple way to have JF base frequency start lower as i like to tune my oscillators to C3 on kria’s 3rd octave setting to enable me to go up and down in octaves.
Cheers!