Electronics > Projects, Designs, and Technical Stuff
Where to buy Musical Keyboards
MarkMLl:
--- Quote from: Renate on July 09, 2020, 10:01:19 pm ---Ok, to do your own thing in USB takes a bit of details and stuff, but it's well worth it.
Make your own custom USB HID device and you have sensors, keyboards, outputs, anything at your fingertips.
--- End quote ---
But he isn't talking about making an HID peripheral, he's talking about a host (i.e. analogous to a PC or Raspberry Pi) which is another thing entirely. At least if you have MIDI it's a simple case of using a UART to handle the data stream, and that's actually quite a useful access point since velocity calculations etc. have been done for you.
I've got an M-Audio keyboard here which had been played in a pub. When I opened it I removed 76p of (mostly) copper-covered coins... you can imagine what those have done to the electronics :-)
MarkMLl
MarkMLl
ozcar:
--- Quote from: MarkMLl on July 09, 2020, 08:16:03 pm ---"Back in the day", as you put it, people were still wondering whether a 1MHz 6800 was going to be fast enough to scan a single manual...
--- End quote ---
My 6800 scan code:
--- Code: ---SCAN EQU *
CLR BKN BASE KEY NUMBER FOR BYTE
CLR BYTNO
LDX #STATUS
SCAN10 LDAA BYTNO 3
STAA DATA0B SET LS154 5
NOP ALLOW DUST TO SETTLE 2
NOP 2
LDAA DATA0A READ KEY DATA 4
STAA CURENT 4
* P=PREV, Q=PREV-1, C=CURRENT, ^=EOR, .=AND
*
* ACTION REQD=A = (C^Q).(Q^P))
* NEW Q = P^((C^P).(Q^P))
* NEW P = C
*
* Q P C A newQ P
* 0 0 0 0 0 0 KEY DOWN, WAS DOWN
* 0 0 1 0 0 1 KEY UP, WAS DOWN
* 0 1 0 0 0 0 KEY DOWN, WAS GOING UP - FORGET IT
* 0 1 1 1 1 1 KEY UP, WAS GOING UP - ACTION KEY UP
* 1 0 0 1 0 0 KEY DOWN, WAS GOING DOWN - ACTION KEY DOWN
* 1 0 1 0 1 1 KEY UP, WAS GOING DOWN - FORGET IT
* 1 1 0 0 1 0 KEY DOWN, WAS UP
* 1 1 1 0 1 1 KEY UP, WAS UP
*
LDAB 0,X Q 5
EORB 16,X Q^P 5
STAB TEMP1 4
TAB C 2
EORB 0,X C^Q 5
ANDB TEMP1 (C^Q).(Q^P) 3
STAB ACTION 4
EORA 16,X C^P 5
ANDA TEMP1 (C^P).(Q^P) 3
EORA 16,X P^((C^P).(Q^P)) 5
STAA 0,X NEW Q 6
LDAA CURENT 3
STAA 16,X NEW P 6
STX WKST SAVE STATUS POINTER
LDAA ACTION 3
BEQ SCAN90 NO ACTION REQD FOR 8 KEYS 4
LDAB BKN STARTING KEY NUMBER FOR THIS BYTE
TSTA ACTION
SCAN70 BPL SCAN80 NOT THIS KEY
BSR DOIT KEY UP/DOWN
SCAN80 INCB NEXT KEY NUMBER
ASL CURENT
ASL ACTION
BNE SCAN70
SCAN90 EQU *
LDAA BKN 3
ADDA #8 2
STAA BKN BASE KEY NUMBER +=8 4
INC BYTNO NEXT LS154 LINE 6
LDX WKST RESTORE STATUS POINTER
INX NEXT IN STATUS 4
CPX #STATEN 3
BNE SCAN10 REPEAT FOR ALL BYTES 4
--- End code ---
Renate:
--- Quote from: MarkMLl on July 10, 2020, 07:26:32 am ---
--- Quote from: Renate on July 09, 2020, 10:01:19 pm ---Ok, to do your own thing in USB takes a bit of details and stuff, but it's well worth it.
--- End quote ---
But he isn't talking about making an HID peripheral, he's talking about a host
--- End quote ---
Huh? Dealing with USB on the host side is even easier.
NiHaoMike:
You could put a piezo on each key to detect the speed.
MarkMLl:
--- Quote from: Renate on July 10, 2020, 12:28:31 pm ---Huh? Dealing with USB on the host side is even easier.
--- End quote ---
Not if the host is something like a ZYNQ, which I'd remind you is what he was talking about.
MarkMLl
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version