Best rollover schem...
 
Notifications
Clear all

Best rollover scheme for condensed music kbd?

28 Posts
3 Users
2 Likes
1,348 Views
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

I'm in the early stages of developing an Arduino Uno music application using a 3x8 (or 6x4) membrane keypad scanned matrix-style. Imagine a piano keyboard that, for simplicity, lacks all the black keys. It's layout is condensed in that it requires two adjacent keys pressed "simultaneously" to be recognised as the "missing" one in-between - e.g. if "C" and "D" in the same column are pressed within, say, 50 milliseconds of each other, then the Arduino Uno needs to read this as "C sharp". My question is: What is the best keyboard rollover scheme to intentionally allow this combination, while disallowing all other multiple key closures (including those in rows) that cause "ghosting"? NKRO? Any suggestions would be much appreciated.


   
Quote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@jeffed

Assume the layout would be something like the image below?
Can't say I would want to use a keyboard like that to play music!!

keys

   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

I agree. I've painted a simplistic picture of the concept. It's way more complex than that. Also, I should add, in keeping with the robotic nature of projects discussed here, it's a control application involving servos interfacing with sophisticated gear producing music. Sorry to be obscure. It's early days. Humour me. Any thoughts on the NKRO issue?


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@jeffed

Any thoughts on the NKRO issue?

It is always useful when using acronyms to at least spell them out in case a reader is not familiar with the subject. Thanks to Google,

"Certain high-end keyboards have "n-key rollover" (NKRO). This means that each key is scanned completely independently by the keyboard hardware, so that each keypress is correctly detected regardless of how many other keys are being pressed or held down at the time."

https://deskthority.net/wiki/Rollover,_blocking_and_ghosting

So I will need time to get up to speed on the problem and to find any software suggestions or solutions others have come up with.

 


   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

To throw some light on the subject:

chordkeyboard

a disability chord keyboard.

This post was modified 3 years ago by jeffed

   
strongheart reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@jeffed

This is turning into a cryptic puzzle thread with each post providing another clue 🙂

So CDEFGAB buttons are played with
buttons for playing chords in the minor key
buttons for playing chords
So what are the buttons R,M,X for?

From what I have read ghosting problems have to be resolved with hardware which may be a mute point with a matrix based membrane keypad without diodes?

I would have to experiment with an actual keypad to determine the time frame to read the pressing of two or more buttons at "once". You suggest 50ms so I assume you have tested for this.

A 4x4 keypad came with my Arduino kit. I guess you could use two of them next to each other resulting in an 4x8 keypad.  In the meantime if I get time I might try playing with the 4x4 keypad.

 


   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

N-key-rollover is a software complication not normally encountered in a simple scanning scheme and is best avoided. That's my conclusion. The alternative route is to put diodes at the junctions of all key columns and rows but this necessitates using a PCB (Printed Circuit Board) rather than a membrane keyboard. Problem solved. It's more complex though and, consequently, more expensive. Furthermore, it's possible to do away with 2-adjacent-key recognition for sharps/flats and go with a full 36-key keyboard - i.e. a 3x12 matrix configured as 6x6. This would take up more space but would be simpler, agreed?


   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

@robotbuilder To answer your questions, this arrangement can produce Major, Minor and 7th versions of each of the 12 chromatic chords most often used on a guitar. "M" stands for "Memorise", "R" is "Recall" and "X" is "Delete" ("D" would be confused with the chord of "D"). Between them, they constitute a sequencer system. Positioning these buttons between "E" and "F" physically and visually separates these chords where no sharps/flats exist between them. That's the reasoning behind the layout.


   
strongheart reacted
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

Thanks for your input, RB. I'll tune in tomorrow after you've had some shut-eye. 🙂

This post was modified 3 years ago by jeffed

   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@jeffed

Posted by: @jeffed

Sorry to be obscure. It's early days. Humour me. Any thoughts on the NKRO issue?

No problem, here's some humor for you 😀

Would adding up the associated ASCII values to produce a unique integer fulfill your identification purposes, for which combination keys were pressed?

Cheers.


   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

@frogandtoad Very amusing. That's taking obscurity to a new level.


   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

Clearly, a full 36-key keyboard is the way to go, despite it taking up more space. Diodes at each node will also get around any multiple key closure problems. That means a special PCB with discrete buttons - not a membrane keypad as planned. OK, back to the drawing board. Can anyone recommend user-friendly PCB design software? (Years ago, I used to use Protel Easytrax but that's now obsolete, of course.) It needs to be Mac-compatible. Suggestions anyone?


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@jeffed

You are being very obscure about what you are wanting. A mention of a limited keypad and then disabilities and now a full 36 key keyboard?

Is it just a keyboard that can treat a chosen combination of buttons pressed together as a single value?

If it is music playing you want there are proper piano keyboards and software available.

I thought this was an Arduino project but if it is for a MAC then as a Windows and Linux (Raspberry Pi) user I have no idea how to interface my own hardware to a MAC. You haven't even mentioned which computer language you use.

 


   
ReplyQuote
jeffed
(@jeffed)
Member
Joined: 5 years ago
Posts: 25
Topic starter  

@robotbuilder

(1) It IS an Arduino project.

(2) An abbreviated keyboard now looks counter-productive.

(3) It's intended to control CHORDS - for manual disability.

(4) Mac-friendly PCB software needed just to design PCB.

(5) Which computer language? Irrelevant. See (1).


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@jeffed

Ok.

Sticking to the 8x3 keypad example perhaps use a 8 to 3 bit encoder 74HC148N for each row?

Each 3 bits encoding one of any of the 32 possible combinations of keypress for each row?

 

 


   
ReplyQuote
Page 1 / 2