totally not you, i ran into the same troubles myself until a crow.clear()
so, i’m seeing some WEIRD stuff.
- turn off crow out from PARAMS
- attach a MIDI clock to norns and verify it’s connected + transmitting in PARAMS
- try running each of the following scripts
- plug crow output 1 into crow input 1 (if you want to see the ticks, otherwise you can just drive any external sequencer and hear if things get wiggly)
- if you chose to feed crow back to itself, press K3 to start up visual monitoring
- confirm you experience the skipping on the skip script and not skipping on the other?
this script skips beats
function init()
crow.clear()
params:set("clock_source",2)
clock.run(ping)
process = false
last_one = clock.get_beats()
skipped = 0
crow.input[1].change = process_change
crow.input[1].mode("change", 2.0, 0.25, "rising")
crow.output[1].action = "pulse(0.05,8)"
end
function ping()
while true do
clock.sync(1/4)
crow.output[1]()
-- crow.output[2]()
end
end
function process_change(v)
if v == 1 and process then
-- print(clock.get_beats()%4)
if clock.get_beats() - last_one > 0.3 then
skipped = skipped + 1
end
last_one = clock.get_beats()
redraw()
end
end
function key(n,z)
if n == 3 and z == 1 then
process = not process
elseif n == 2 and z == 1 then
skipped = 0
end
end
function redraw()
screen.clear()
screen.move(10,43)
screen.font_size(20)
screen.level(15)
local show_me_beats = string.format("%.2f",(clock.get_beats() % 4)+1)
screen.text(show_me_beats)
screen.move(10,60)
screen.font_size(10)
for i = 1,skipped do
screen.text("|")
end
screen.update()
end
this script DOESN'T
function init()
crow.clear()
params:set("clock_source",2)
clock.run(ping)
process = false
last_one = clock.get_beats()
skipped = 0
crow.input[1].change = process_change
crow.input[1].mode("change", 2.0, 0.25, "rising")
crow.output[1].action = "pulse(0.05,8)"
end
function ping()
while true do
clock.sync(1/4)
crow.output[1]()
crow.output[2]()
end
end
function process_change(v)
if v == 1 and process then
-- print(clock.get_beats()%4)
if clock.get_beats() - last_one > 0.3 then
skipped = skipped + 1
end
last_one = clock.get_beats()
redraw()
end
end
function key(n,z)
if n == 3 and z == 1 then
process = not process
elseif n == 2 and z == 1 then
skipped = 0
end
end
function redraw()
screen.clear()
screen.move(10,43)
screen.font_size(20)
screen.level(15)
local show_me_beats = string.format("%.2f",(clock.get_beats() % 4)+1)
screen.text(show_me_beats)
screen.move(10,60)
screen.font_size(10)
for i = 1,skipped do
screen.text("|")
end
screen.update()
end
the difference between the two is that the working script includes one extra line: crow.output[2]()
the output isn’t even defined, but including it in the clock-synced ping keeps everything steady.
if you can confirm this is happening on your side as well, then we (finally, thank you for your patience!) have a good repro case!
(@Galapagoose + @artfwo any thoughts on this? seems friggin’ weird but i’m woke-up-at-4am-tired.)