Musical keyboards are kind of perfect because you can get elegant furniture to position them comfortably on or near most desks, and many folks with extensive keyboard collections already have one near their computer. The biggest boon, to me anyway, is that a keytar is a wearable keyboard, and I could convert it to one that performs the most common tasks, even if I'm walking. I'm discussing a pretty niche case since I'd be controlling a computer I can't see or one with a head-mounted display. I'm not building this for text input, but a button that starts voice-to-text could partially bridge the gap.
I hope you're picturing me walking around the neighborhood sporting some digital sunglasses and wearing a piano.
At work, I regularly have to type values into a text field and read the results on a meter several feet away to make sure they match. Having nearly two dozen keys at my fingertips to execute these repeatable would be wonderful. Right now, I have a series of macros that lets me enter the values with a handheld remote, but there are only a few buttons, and they interfere with regular operation. Still, a wireless macro pad has proven itself useful.
The keys from Rock Band seemed like a good starting point since it's wearable, inexpensive, durable, and wireless if used as a gamepad. There are a couple of things I don't like about using it as a gamepad.
- First, it requires a USB dongle, so it's not practical for mobile phones or tablets, and that device is almost as large as a RasPi0.
- Second, it only works for that device, so someone with a keyboard sitting in the attic can't benefit.
- Third, the data is a little tricky to parse because it's managing analog bits instead of discrete inputs.
I plan to build a controller that accepts old-school MIDI signals and transmits Bluetooth HID commands. Each key will represent a macro, so it's not a puzzle where you play Mary had a Little Lamb to launch Notepad. All the notes will be accessible so large keyboards can have many functions and compact ones that can switch octaves and potentially access 128 macros.
I chose an ESP32 experimenter with an onboard OLED screen and battery charging circuitry. I bought a MIDI cable with a right-angle connector to reduce snags when I carry it around. I figured I would rely on Arduino's SoftwareSerial library, but it doesn't play well with the ESP32, so I found a version that should. Unfortunately, the author wrote it to work with an ESP32 beta core, which isn't standard, and I want this to be accessible to anyone who can run Arduino's IDE.
I figured I could use a native UART, but not all of those pins were exposed on this board, and the screen took one. I don't like to do it, but I tied it into the sole data line. I couldn't see anything on my serial monitor. This could be a couple of issues.
- The USB↔serial converter might not accept unusual baud rates, and MIDI uses 31250bps.
- My program that repeats incoming data to the output line may be faulty.
- I could have the incoming MIDI signal backward, inverted, open, or shorted.
I ran some tests, proved that my MIDI signal was working, and stopped there.
The rest of the posts for this project have been arranged by date.
First time here?
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address email@example.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
Post a Comment