License

CC-BY-NC-SA 3.0

Recommend Projects

kxmx_ruitar

1 year ago 201
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

Description

kxmx_ruitar

A guitar shaped MIDI/OSC instrument

kxmx_ruitar - Complete - Detail

The Idea

The goal of this project is pretty simple; Take the general functionality of your typical MIDI keyboard or control surface and implement it (robustly, and with low latency) in the form factor of a guitar. The motivation is a a little less straightforward. Three things:

  1. I wanted to wear it on stage while maintaining the freedom to move about.
  2. I wanted to make it myself.
  3. It didn't want to spend a fortune.

I like the form factor of a guitar because it can look quite traditional in a rock band context, but upon closer inspection is clearly not. This reflects my taste in music, superficially recognizable, but substantially deviant. While I can play the guitar, I didn't feel it necessary that a functional guitar be augmented with MIDI controller capabilities, unless the two can be seamlessly combined. This is primarily because my single-threaded brain just cannot effectively handle playing an instrument well, while controlling other parameters.

Because a guitar hangs down in front of you, facing out, visual controls and feedback are pretty useless. A touch screen on the front of the guitar for example, is effectively a touch-pad for the player and a light show for the audience. Therefore I am mostly interested in tactile type sensors which can be blindly interacted with.

The DIY approach is simply an excuse to get lost in the details of interesting technical challenges instead of practicing, or composing actual music.

Regarding limiting cost... Yeah, anyone who has ever attempted a DIY project like this knows it's actually BS. There is no competing with the economies of scale that a market product has. We DIYers like to trick ourselves by spreading the costs into tiny chunks, over many months. But, I consider the premium an investment in enjoyment and the knowledge gained along the way. So that's how it ended up here.

The (current) BOM

(With Optional Headstock)

The Build

kxmx_ruitar - Body - Detail

The guitar used was a junk no-name electric. I hollowed out from the front of the body with an oscillating multi-tool and a wood blade, leaving space for the FSRs. Because the body is plywood, it was pretty easy to remove the bulk of the material. I spray-painted everything black and carpeted the inside with adhesive Velcro strips (loop side). This has been quite helpful for cable management and general experimentation. Just put some hook Velcro to the bottom of a breadboard and stick it in there. Need a USB Hub? Raspberry Pi? Velcro!

kxmx_ruitar - Body - Detail

The FSRs are attached with some double sided foam tape which holds them solidly in place and gives them a little bit of padding, which is good when you are banging on them with your knuckles. The little thumb joystick is mounted in the body with hot glue, and wired through a hole bored into the body cavity. The joystick is meant to be moved with the palm of your hand, allowing you to modulate parameters while tapping on the FSRs... In practice, little thumb joysticks like that are junk, they have too little travel to introduce any decent dynamic. I am actively looking for an alternative, larger joystick with more travel.

kxmx_ruitar - Body - Detail Pads and Joystick

The first prototype was done using breadboards and an Arduino Mega2650 clone. When it was finally functional, I found the latency to be unacceptable, the breadboard connections were fragile and problematic,and I also found it lacking interface components. So, I swapped the Mega2650 for a Teensy 3.6, soldered all the connections using some protoboard, and added the four faders plus four LED buttons. The result is this new prototype module. I'm designing a PCB which will replace this.

kxmx_ruitar - Body - Detail Faders and Toggles

There are USB-A and RJ-45 jacks to the side using some nice, locking Neutrik jacks. Because the Teensy's advanced USB capabilities, there is only USB IO at the moment. The unused RJ-45 is for some future ideas.

kxmx_ruitar - IO - Detail

There is an SSD1306 64x32 OLED display mounted to the side of the body of the guitar. I simply flattened a little part of the edge with a belt sander, and drilled a hole into the body cavity for the wires. A 3d-printed protective case surrounding the display would be useful.

kxmx_ruitar - Body - Detail OLED

There is a cover for the body cavity I cut out of plastic to hide the unruly guts (although the aesthetics of the exposed internals are also appealing). Note that this photo was also taken before the faders and buttons were added, which means that the cover, in that form is not currently usable, but I'm still unsure about the final positions of those components anyhow.

kxmx_ruitar - Cover - Detail

The neck was a huge pain. Removing the truss rod required brute force, but afterward I had a cable channel through which I am able to pull wires from the body, up to the head stock. In order to adhere the membrane potentiometers, I needed to flatten the fingerboard. I didn't have any good ideas how, so I ended up just sanding the frets down with a belt sander. There are no photos of this process because I was too busy cursing. The result is OK but if you want to try this yourself, I'd recommend looking for a cheap neck without a fingerboard (although I was unable to find one). Once flattened I attached the membrane potentiometers and covered them with a layer of electrical tape. I then laid some straightened 14 gauge solid core wire down the middle of each sensor, and put another layer of tape on top. This provides some tactile feedback as to where the sensors actually are, and really helps the play-ability. The position tracking through the wire is excellent.

kxmx_ruitar - Body - Detail Strings

The headstock is a separate entity with its own microcontroller, a (Teensy LC) acting as an I²C slave device. It is attached to the headstock of a guitar. I've connected it to the body module with wires pulled through the neck of the guitar. I removed all the tuning hardware and screwed it directly to the headstock. Currently, it is quite exposed and fragile. I'd like to design a 3d printed protective cover for it.

kxmx_ruitar - Head - Detail

Put all together and you have a ruitar!

kxmx_ruitar - Complete - Current - Detail

Schematics

TODO

Firmware

Because the headstock and body have their own microcontrollers, this project is split into two sections, the ruitar-body and the ruitar-head. The directory layouts of both projects are currently set up for platformio, it works. It's not bad.

ruitar-body

The ruitar-body is the core of the instrument, effectively a variety of sensors attached to a microcontroller (a Teensy 3.6). These sensors are sampled via the microcontroller ADCs, the values are calculated and, if appropriate, MIDI and OSC messages are sent out. (currently via USB to a PC).

The logic controlling when and what messages to send is configurable by a INI style text files on an SD card. These files can be considered "Presets" and can be copied, modified, renamed, and saved to the SD card.

TODO - Include config file example

I had plans to make presets configurable through the sensors, and OLED display, but I found the OSC GUI much easier and more powerful, so the OLED display is currently relegated to display some basic debugging info at the moment. Perhaps there is a better use for it, or the SPI pins it is occupying?

Presets can also be edited via OSC using the GUI definition for Open Stage Control

kxmx_ruitar - Body - Detail GUI

The default configuration is for it to behave a bit like a real guitar. Pressing a position on a "string" (0-3) determines the pitch of the note, while triggering the note on state, and its velocity is determined by pressure detected at the associated (0-3) "pad". The faders, and toggles emit CC messages, and the joystick can emit CC and pitch bend messages. Sensor values received from the head (accelerometer, encoders) can also be configured to emit MIDI CC messages.

ruitar-head

The ruitar-head is set of sensors attached to a microcontroller (Teensy LC) acting as an I²C slave device. The firmware provides a set of read-only registers which can be read to obtain the accelerometer, and encoder values. Additionally the state of the RGB LEDs can be polled and changed by a set of read-write registers.

TODOs

Things that still need to be done, but are incomplete.

  • [ ] Design a PCB for the body
  • [ ] Fix broken I²C communication between body and head
  • [ ] Implement the OSC GUI parameter config
  • [ ] Implement the OSC GUI preset copy/rename/save functions
  • [ ] Implement a useful MIDI emitter for the accelerometer data
  • [ ] Design some 3d printable protective parts for the exposed bits.
  • [ ] Provide better descriptions, code comments, build docs, pics, etc

Future Feature Ideas

A few ideas I've been batting around:

Synth!

The Teensy 3.6 is laughing at the current workload. There is plenty of capacity to implement a digital synth, and the Teensy Audio library is amazing. I've already started this, but ran into a couple of problems:

  • An I²S codec needs quite a few pins, many of which are currently being used
  • USB audio is not really an option if you already have a USB audio interface.

Nothing insurmountable, I'd like to make this happen if I find the time.

Ethernet (or WiFi)

At the moment OSC is provided over SLIP encoded Serial. This works, but is a kludge requiring a bridge program to get the UDP packets that all the OSC clients expect.

There is a Neutrik RJ-45 jack built into the body of the ruitar, I could provide power over the unused pairs assuming 100-BASE-T. But without the USB cable I would loose all the USB* devices the Teensy can emulate, which would be a bummer.

Alternatively I could send the SLIP serial to an ESP32 and broadcast the OSC packets via WiFi, not sure about the latency though.

Membrane Potentiometer Alternatives

The kxmx_ruitar is really hard to play. Tracking on the "strings" is not bad, but the lack of any tactile feedback along them makes it difficult to get a position reference. Anyway, since MIDI notes are discrete, all the position data the pot and ADC could provide gets quantized to the configured 20 note range anyway... They might as well be buttons, right?

Inspiration, Ideas, and Prior Art

Here's a list of products and projects from which I have gathered ideas:

Documents

body_v2

kxmx_ruitar_body

temp

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part Price LCSC Assembly Mounted BOM_Manufacturer Part BOM_Supplier BOM_Supplier Part BOM_Manufacturer BOM_LCSC Assembly
1 TEENSY_3.6_ALL_PINS G$1 TEENSY_3.6_ALL_PINS 1
2 Z-211-0811-0021-001 U1,U2 SIP-2.54MM-8P-CJT-H8.54 2 Z-211-0811-0021-001 LCSC C190820 Nextronics Engineering
3 TLP2362(TPL,E(T U3 SOP-5 1 TLP2362(TPL,E(T LCSC C37658 TOSHIBA Yes
4 1N914BWS D1 SOD-323_LS2.5-L1.8-W1.3-L-RD 1 1N914BWS LCSC C258181 ON Semicon
5 220 R17,R18 0603 2 RC0603FR-07220RL LCSC C107696 YAGEO
6 74LVC1G07GW U4 TSSOP-5 1 74LVC1G07GW LCSC C124297 Nexperia
7 PAD0 H1 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
8 PAD1 H2 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
9 PAD2 H3 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
10 PAD3 H4 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
11 STRING0 H5 PH-TH_3PIN-H-MALE-PITCH2.54-L 1 MTB125-1103R1 LCSC C376121 MINTRON
12 STRING1 H6,H8 PH-TH_3PIN-H-MALE-PITCH2.54-L 2 MTB125-1103R1 LCSC C376121 MINTRON
13 STRING2 H7 PH-TH_3PIN-H-MALE-PITCH2.54-L 1 MTB125-1103R1 LCSC C376121 MINTRON
14 FADER0 H9 PH-TH_3PIN-H-MALE-PITCH2.54-L 1 MTB125-1103R1 LCSC C376121 MINTRON
15 FADER1 H10 PH-TH_3PIN-H-MALE-PITCH2.54-L 1 MTB125-1103R1 LCSC C376121 MINTRON
16 FADER2 H11 PH-TH_3PIN-H-MALE-PITCH2.54-L 1 MTB125-1103R1 LCSC C376121 MINTRON
17 FADER3 H12 PH-TH_3PIN-H-MALE-PITCH2.54-L 1 MTB125-1103R1 LCSC C376121 MINTRON
18 JSX H13,H14 PH-TH_3PIN-H-MALE-PITCH2.54-L 2 MTB125-1103R1 LCSC C376121 MINTRON
19 TOGGLE0 H15 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
20 TOGGLE1 H16 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
21 TOGGLE2 H17,H18 PH-TH_2PIN-H-MALE-PITCH2.54-L 2 MTB125-1102R1 LCSC C376120 MINTRON
22 HEAD I2C H19 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
23 HEAD PWR H20 PH-TH_2PIN-H-MALE-PITCH2.54-L 1 MTB125-1102R1 LCSC C376120 MINTRON
24 10K R13,R1,R2,R3,R4,R5,R6,R7,R8,R14,R15,R16,R19,R20 0603 14 RC0603JR-0710KL LCSC C99198 YAGEO
25 100nF C16,C1,C2,C3,C4,C11,C12,C13,C5,C6,C7,C8,C9,C10 0603 14 0603B104K160 LCSC C80516 WTC
26 330 R12,R9,R10,R11 0603 4 0603WAJ0331T5E LCSC C25231 UniOhm

Attachments

None
Success
The owner does not allow comments in this project now

Comments (0)

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.