thursday.land

blog life tech contact

Gotta funny story on this one.

So, a while ago, I decided that I didn't like the fact that I listen to and enjoy music, but I have no earthly idea about the hows and whats behind it.

I feel like I can roughly make my way around sheet music sometimes. It's not like I had no training in elementry/middle school on which notes are what and kinda how to understand notation. However, most terminology doesn't make sense.

To solve this problem, I decided I would get a USB MIDI keyboard and use that to practice and learn as I practiced. At this point, I am somewhat hesitant to admit how long ago I got this keyboard since I have made pretty much zero progress with the thing. Here's part of the issue though: I never could get the stupid keyboard to work with any of the software I was throwing at it. I had been trying for months to get things to work, but only a portion of the controls ever seemed to be recognized by the software I would try to use.

Today, I decided: I am tired of this. I am going to get this to work.

So, I repartitioned my hard drive, did a fresh install of Fedora to my disk, and put on my troubleshooting hat to figure out what in the world was going on.

Turns out, Fedora has some long documentation on how to get MIDI keyboards working. Which is a super nice starting point. I ended up getting most everything working, but, for whatever reason, the only keys that I could get confirmation of signal on were all the toggles and menu buttons.

Nothing from the actual keys. Silence of the ivories.

So, I'm lookin' at the Arch Linux wiki now. I am running

aseqdump -p

and I can see the events of all the toggles and menu buttons. Where are the events for the keys?

Next thought: let's check to see if I can take a look at whatever signal I can. Maybe if I can see the signal, I could... Something...

xxd /dev/usbmon#

^ running as root of course, but the thankful part is that linux has the ability to just read the data somewhat raw. Too raw... Staring at documentation. I can pick out the data in the struct and then compare that to what I see get spit out of the device and into xxd.

Try a menu key. Perfect. Flawless. I can actually see where the device information matches up with the data that is supposed to be included in the struct.

00000000: 00d9 16d2 df95 ffff 4303 8104 0300 2d00 ........C.....-.

00000010: 84cb 9f5c 0000 0000 b936 0900 0000 0000 ...\.....6......

00000020: 0400 0000 0400 0000 0000 0000 0000 0000 ................

00000030: 1990 627f 00d9 16d2 df95 ffff 5303 8104 ..b.........S...

00000040: 0300 2d3c 84cb 9f5c 0000 0000 ca36 0900 ..-<...\.....6..

00000050: 8dff ffff 4000 0000 0000 0000 0000 0000 ....@...........

00000060: 0000 0000 40d2 16d2 df95 ffff 4303 8104 ....@.......C...

00000070: 0300 2d00 84cb 9f5c 0000 0000 43b6 0b00 ..-....\....C...

00000080: 0000 0000 0400 0000 0400 0000 0000 0000 ................

00000090: 0000 0000 1990 6200 40d2 16d2 df95 ffff ......b.@.......

000000a0: 5303 8104 0300 2d3c 84cb 9f5c 0000 0000 S.....-<...\....

000000b0: 4bb6 0b00 8dff ffff 4000 0000 0000 0000 K.......@.......

And isn't that nifty. Confirmation of signal. Now I more or less know what data I expect to have on the wire. Let's press a key then and take a look.

...

SILENCE

...

So, with all of this time and energy wasted on this keyboard. I decide that there has got to be a hardware issue. Either there is some secret switch or button you gotta press, or maybe there is just something faulty in the manufacturing.

I kinda figured there would probably not be much that I could do if I opened it, but I do have a sticky note reminding me that I need to buy a multimeter and an oscilloscope anyways. I figured I would open the thing and at least take a look while I add it to my other hardware projects (I have a tape deck I am hoping to refurbish).

Gotta unscrew approximately a billion screws. Evidently, they were deathly afraid the thing would jump apart on its own. Eventually I get all the screws out so I can take a look at the innards.

Lo and behold: THE RIBBON CABLE FOR THE KEYS IS JUST COMPLETELY OUT OF THE SOCKET OF THE MAIN BOARD!

Gotta admit, I had a good laugh at myself. Plugged that thing in and started to see beautiful signal.

So, that's the story of that. Here are the takeaways: remember that it could definitely be the hardware and also, don't trust manufacturing (especially when there is no QC sticker to be seen anywhere).

-thursday