Yes, that's the issue. "xset r off" workaround works.
What's weird is:
why did it work before
why did it break
and why reverting seems to fix it?
Anyway... If it works as i think it does:
Code: Select all
//Pseudocode:
prevKeyDown = False
while True:
keyDown = isKeyDown()
if keyDown and not prevKeyDown:
startNote()
elif not keyDown and prevKeyDown:
endNote()
prevKeyDown = keyDown
a dirty fix would be to do something like this?:
Code: Select all
//Pseudocode:
prevKeyDown = False
releaseTime = False
notePlaying = False
while True:
keyDown = isKeyDown()
if keyDown and not prevKeyDown:
notePlaying = True
startNote()
elif not keyDown and prevKeyDown:
releaseTime = Now() + 50 //ms
prevKeyDown = keyDown
if notePlaying and Now() > releaseTime:
notePlaying = False
stopNote()
but i don't think it's a good practice