Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with a keyboard that has a different switch type? #17

Closed
lopazopy opened this issue Dec 24, 2022 · 1 comment
Closed

Using with a keyboard that has a different switch type? #17

lopazopy opened this issue Dec 24, 2022 · 1 comment

Comments

@lopazopy
Copy link

I have an older electric piano and its keys use a switch that is like a single pole double throw (SPDT) configuration. Right now, I'm monitoring when the key closes the circuit that is normally open and getting note information that way. I'd like to add velocity since I have the 2 circuits. I'm just not sure how to monitor the states between the normally closed condition and the normally open position and the timing it takes to get there. Any ideas how I could modify this code to fit my situation? Thanks.

SPDT

@oxesoft
Copy link
Owner

oxesoft commented Dec 30, 2022

Besides following the common instructions, you need to modify the for block at line 420 to consider just the start time when the key is opened. This is the only difference, in your case. You might need to modify MIN_TIME_MS and MAX_TIME_MS to better response for your keys.

@oxesoft oxesoft closed this as completed Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants