Page 1 of 1

Holding a key down

Posted: Sun Mar 17, 2019 12:20 pm
by nomedia
...doesn't work properly anymore.

Image

I installed some older version and everything went back to normal.

Re: Holding a key down

Posted: Sun Mar 17, 2019 1:38 pm
by musikbear
nomedia wrote:
Sun Mar 17, 2019 12:20 pm
I installed some older version and everything went back to normal.
Are you having problems with LMMS?
You should not revert to an old release, instead we should find the reason for the issue.
If you want help..
please post your:
* OS (+service-pack-version)
* lmms version
* lmms sound device chosen
* hardware specification (ram & soundcard is the most important)

Re: Holding a key down

Posted: Sun Mar 17, 2019 2:28 pm
by zonkmachine
@nomedia I believe this is your issue: https://github.com/LMMS/lmms/issues/851
The issue is closed as it's not with lmms and we have no workaround.

Re: Holding a key down

Posted: Sun Mar 17, 2019 5:14 pm
by nomedia
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 :/

Re: Holding a key down

Posted: Tue Mar 19, 2019 11:44 am
by SterlingKelly
...doesn't work properly anymore.

Image

I installed some older version and everything went back to normal.
It caused by a lack of required drivers I think.

Re: Holding a key down

Posted: Wed Sep 09, 2020 3:54 pm
by BePolar
SterlingKelly wrote:
Tue Mar 19, 2019 11:44 am
...doesn't work properly anymore.

Image

I installed some older version and everything went back to normal.
It caused by a lack of required drivers I think.
I guess the reason is different