2

How I Created a Digital Guitar and Turned It Into a Business

 2 years ago
source link: https://hackernoon.com/how-i-created-a-digital-guitar-and-turned-it-into-a-business
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How I Created a Digital Guitar and Turned It Into a Business

Dmitriy Dudarev is developing an electronic guitar that looks like a guitar with six strings and 12 frets on the fingerboard. The device should be able to connect to anything without tricks — from iOS to Windows. The connection should be wireless (but there will be a USB-port for recharging and connectable using a wire too) The most important point — learning to play the guitar should be easy, without the necessity for long training on wrist ligament adaptation. The delay of midi-commands shouldn’t exceed 10ms.

Audio Presented by Plivo Inc-icon

Speed:
Read by:
Your browser does not support theaudio element.
voice-avatar
Dmitriy Dudarev

Electronics engineer. I love everything related to technology and science. And also snowboarding 🙂

My name is Dmitriy Dudarev. I develop electronics, and I love to create different portable devices. I also love music.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

A long time ago, in April 2020 or so, when the whole world was shaken by the terrible quarantine, I decided to learn to play guitar. I borrowed an acoustic guitar from a friend of mine and started to study the instrument by lessons on YouTube and tablatures. It was hard. Maybe, I was doing something wrong, maybe, I didn’t try hard enough, or maybe, fine motor skills prevented my predecessors from reproduction. All in all, I couldn’t produce anything but sounds of rattling strings. The constant mistuning of the strings strengthened my resentment. And my neighbors got no pleasure from listening to my uneven “Nothing Else Matters” thousands of times.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

But, in the middle of all these sufferings, I haven’t forgotten the main rule of a techie. If something exists, you can insert a microcontroller there. Or, at least make a portable electronic modification.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Electronic guitar? Hum, an interesting idea, I thought. But it would be even better if I could learn to play this guitar myself. On the same day, the acoustic guitar was returned to my friend, and I started to develop the idea.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

As I’m an innate engineer; I made a list of requirements for the device.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

What do I want from my guitar?

0 reactions
heart.png
light.png
money.png
thumbs-down.png

1) I want something that looks like a guitar as much as possible, that is, six strings and at least 12 frets on the fingerboard.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

2) I want it to be compact and portable. So that I can take the device wherever I go, not having to book a truck for transportation.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

3) The device should be able to connect to anything without any tricks — from iOS to Windows. Ok, ok, let’s be realistic– to all the popular OSs.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

4) Work using a battery.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

5) The connection should be wireless (However, there will be a USB-port for recharging and connectable using a wire too)

0 reactions
heart.png
light.png
money.png
thumbs-down.png

6) The most important point — learning to play the guitar should be easy, without the necessity for long training on wrist ligament adaptation. So, how do I make it come true? It occurred to me to equip the guitar and the strings with LEDs. For example, you upload tablatures in your guitar, and it shows you itself where to put your fingers. That is, there is nothing like looking at the screen, then at the guitar, then again at the screen, and again at the guitar. I don’t need all this stuff. You look only at the guitar. And you play the same guitar. That’s all. That’s what my idea was!

0 reactions
heart.png
light.png
money.png
thumbs-down.png

7) I’d like to have the support of different playing techniques: hummer on, pull off, slide, vibrato.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

8) No retards. Speaking scientifically, the delay of midi-commands shouldn’t exceed 10ms.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

9) Everything should be assembled “from shit and sticks” — easily available materials without complicated technical processes and expensive electronics.

0 reactions
heart.png
light.png
money.png
thumbs-down.png
0 reactions
heart.png
light.png
money.png
thumbs-down.png

As a result, we should get a compact instrument that I can play like a guitar free from the shortcomings of an analog one, equipped with a visual learning system; it sounds realistic.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Of course, we need to write an app for mobile platforms, and you can choose a tablature for training with LEDs, choose an instrument (acoustic, classical, electric guitar with different filter presets, ukulele, etc.), and make sounds.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Existing analogs

But do I need to invent a bike? Because for each great idea, there is always a Chinese person who has already done it “in hardware” and made it better than you were going to initially. I’m looking it up on Google.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The first digital guitar turned out to have been created back in 1981, but it hasn’t become popular because of its weak functionality.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

More modern variants have also been found, for sure.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

For example, with an iPad instead of strings, or another, in the shape of a mollusk:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

However, fulfilling all my wishes–first of all, compactness and “press-on-LEDs” training mode — there is no such a thing. Besides, such midi-guitars are still purposed for a more skilled audience. Moreover, they are expensive.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

So let’s go!

0 reactions
heart.png
light.png
money.png
thumbs-down.png

First prototype

In order to check the viability of a concept, I need to determine the element base at first.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Let’s take the STM32F042 controller. It has everything I need, and it costs less than a buck. Except for the wireless connection, but we will return to it later.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Let’s go ahead — strings on the soundboard. For the first concept, I decided to print plastic reeds, attach them to potentiometers with springs and measure deviation angles.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

That’s how 3D-model looks like:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

And that’s in reality:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

It feels pleasant. It should work.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

For frets on the fingerboard, I’ve ordered on AliExpress such tenso-resistors.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Unlike different buttons, they don’t click. It is also possible to define the strength of pressure, which means that I can play complicated techniques like slide or vibrato.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I also need ADC to read the info from sensors and transmit it to the controller.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

While I was waiting for sensors from China, I made a PCB layout:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Before ordering board printing, I decided to wait for piezoresistors. And, as it turned out, it wasn’t in vain. Of 80 sensors, only a few were working, and even they had different parameters.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

To put it mildly, it doesn’t look the way it was declared. But what was I expecting when I bought the components on AliExpress?

0 reactions
heart.png
light.png
money.png
thumbs-down.png

And then it dawned upon me.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I can apply another detection method — capacity measuring like in touch sensors. That’s much cheaper and more accessible. And if I design the mechanicals correctly, I’ll be able to define the effort.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Well, I’m removing everything that was done before.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Second prototype

Well, let’s do away with the piezoresistors! For sensor elements, this time, I took small copper cylinders sawed from a wire. For capacity measuring, I could find an affordable 12-channel universal capacitometer. It measures capacity in picofarad units, which should be enough for a scheme of strength measuring, which I’m going to implement in the following modifications.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Additionally, just in case, I’ve hung a seat for a button or something of the kind on each element of the fingerboard, and made cuts in the board so that I could not only touch the cylinder but also press on it inside. I’ll try to experiment with different playing techniques.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Having solved the question of connecting a lot of chips of capacitometer to the controller, I’m starting the board wiring.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

This time I could order the board and even wait till it is ready.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

After the components, copper cylinders, and potentiometers are soldered, I understood that construction with plastic strings is too complicated. So for a while, I decided to hang the same sensor cylinders on the soundboard, but a bit longer.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Two little wires in the lower part — I’ve connected a plate with cylinders to the board. It is a temporary solution.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The hard part is done. The next step is to make it play.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Software

The program part was created as follows:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

1. Downloading the virtual synthesizer, which can work with midi-device and produce guitar sounds.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

2. Writing firmware for controller, which will poll the sensors and transmit the data via USB to the PC.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

3. On the part of the PC, I wrote the program which will receive these data, generate midi-packages of them, and send them to the virtual synthesizer from point 1.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Now every step in detail:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I found quite a lot of virtual synthesizers for Windows with midi support. I tried Ableton live, RealGuitar, FL studio, and Kontakt. I stopped on RealGuitar because it is easy and designed especially for guitar. It can even imitate the imperfection of human play — fingers sliding along the strings, randomized parameter of note production.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

To connect my app to the virtual synthesizer, I emulated a virtual midi-port which is connected to the input of the virtual synthesizer RealGuitar via an emulator of midi-cable — such as a multi-level emulation.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

In the program interface, I’ve made graphic imaging of the measured capacity level for each sensor. This way, it will be easier to tune the sound. Besides, for the future, I added the elements for control of LEDs, vibromotor (I don’t know yet, why, but it will be in the guitar, too), visualization of accelerometer work, and battery charge level.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

To make the hits on guitar strings cause correct notes, I need to map all the 72 sensors on the fingerboard to the respective note.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I found that, of 72 elements, on 12 frets, there are only 37 unique notes. They are located by a certain structure so that instead of building a large table, I could make up a simple equation, which generates a number of respective notes by the number of sensors.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Checking the work

It looks like everything is ready for the first test. I was too lazy to saw the rods and solder all the 12 frets, so I was happy with eight. The moment of truth:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

IT’S ALIVE! The proof of concept is confirmed. My happiness had no bounds! But I mustn’t relax.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The next stage is adding LEDs, accelerometer, vibromotor, battery, wireless connection, body, and the possibility of work without drivers or midi emulation programs on all the popular platforms.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

According to my plan, the guitar should prompt the user where he should put his fingers by lighting a LED at that point. In total, we need 84 LEDs. It is easy. I took 14 8-bit shift registers and connected them in a daisy chain. STM transmits the data to the first register, the first one — to the second one, the second one — to the third one, etc. And all this — through DMA, without participation of controller core.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Accelerometer

The simplest accelerometer — LIS3D — will enable the guitar to define its descending angle. In the future, I’ll use it for sound filter applications while I play, depending on the guitar position.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Wireless connection

For wireless data transmission, I decided to put ESP32. It supports different Bluetooth and WI-FI protocols; there will be something to experiment with (at that time, I hadn’t known yet that in my case, there is only one correct way of connection).

0 reactions
heart.png
light.png
money.png
thumbs-down.png

One of the key requirements of the guitar is its portability. So it should be foldable, which means that I must allocate electronic components of the soundboard and the fingerboard into two boards and connect them using a ribbon cable. Power will be supplied when the body opens when the magnet of the fingerboard approaches the Hall sensor on the soundboard.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Prototype revision

Well, it is time to dress the device in a nice outfit.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I did a lot of experiments with tactile elements of the fingerboard and diffusers for LEDs. I’d like the whole surface of the element to shine evenly, but at the same time, there should be a possibility of touch detection and pushing the buttons.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

There are some of these experiments here:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I also consulted with a friend of mine, an expert in industrial design. We invented the construction of guitar folding, after which he projected and printed the body prototype.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I’m creating the final variant of the board and assemble the guitar:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Looks almost cool. But the device is still connected to the PC via a chain of emulators which emulate other emulators.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Turning the guitar into a midi-device

In the new version, first of all, I’d like the guitar to be defined as a midi-device without unnecessary programs when connected via USB.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I found that it was not so difficult to do it. All the specifications can be found on the official website usb.org. But all the algorithms performed on the part of python-app had to be rewritten in C to the controller.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I was surprised that it started to work on all the devices: Windows 10, MacOS, Debian 9, Android (via USB-adapter). You can only insert the cable, and a midi-device named Sensy appears in the system and is read by all the synthesizers. I couldn’t test it on the iPhone yet because I’ve got no adapter. But it should work the same way.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Wireless interface

Now it is time to get rid of the wires. The right solution hasn’t come to me because I was too lazy to properly look it up on Google. But, as a result, I used the BLE MIDI protocol, which is supported by all the new OSs and works without any drivers, just like via USB MIDI. However, probably, the solution will fail on older OSs because there is no support for BLE MIDI. But all the tests with available devices were successful.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Rewritten app functions, that is, translation of sensor data into midi-data, occupied the whole controller memory accurately. Only 168 bytes left unoccupied. Evidently, the silicon gods were gracious to me, which meant that I was moving in the right direction.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Sure, it can be optimized, but I’ll leave it for the next version. Though, it is better not to waste my time and just take a bigger controller. The difference in money is five cents. We’ll see, anyway, I’ll need a space for new features — for instance, processing playing techniques. First of all, I’d like to implement a slide. It is when you start playing a note with a certain pressed fret and slide with your hand along the fingerboard jumping from fret to fret.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Now we can check how it works wirelessly:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

When all the LEDs are on, you can use the guitar if you get lost in a dark cavern.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Prototype shortcomings

Currently, the construction has the following disadvantages:

1) The strength of pressure cannot be measured anywhere on the sensors. It brings about three problems:

0 reactions
heart.png
light.png
money.png
thumbs-down.png
  • There are constant touches of neighboring strings both on the soundboard, and on the fingerboard. It makes the play very difficult.
  • All the notes you play sound with the same loudness. Most of the experiment subjects don’t notice it, but I’d like to get sound that is closer to a real guitar
  • It is impossible to use hammer on, pull off, and vibrato techniques

2) The LEDs are of the same color. It limits visualization when you play by tablatures. I’d like to have the ability to indicate different playing techniques with different colors.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

3) The shape of the body doesn’t suit left-handed persons. From a software point of view, I’ve already implemented string inversion by accelerometer. But mechanical petal necessary for holding the guitar with your hand when you play turns only to be comfortable for right-handed persons.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

4) Absence of footrest. Now when you play sitting, the lowest string almost touches your leg, and it is uncomfortable.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

5) The flexion joint of the guitar requires comprehension and revision. Probably, it is not reliable and stable enough.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

It is time to pass on to the development of the next version.

Moving to a controller of STM32F07 series, it already has 128 KB of flash — it should be enough for any functions.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Using ESP32 in the final version of the guitar would be too much, so I went to look for something more conventional. I made my choice in favor of NRF52 by accessibility criteria, presence of documentation, and adequacy of the website.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Certainly, three main updates will be implemented:

0 reactions
heart.png
light.png
money.png
thumbs-down.png

- Now the LEDs are RGB,

0 reactions
heart.png
light.png
money.png
thumbs-down.png

- On each fingerboard sensor, there will be strength measuring (bar buttons are not necessary anymore),

0 reactions
heart.png
light.png
money.png
thumbs-down.png

- The strings on the soundboard will be mobile.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Currently, the board of the soundboard looks like this (I’ve left ESP footprint just in case):

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I’m already completely sure that all the intended functions will be implemented, so made a decision about further development. We will open a startup and publish it on Kickstarter:)

0 reactions
heart.png
light.png
money.png
thumbs-down.png

The project is called Sensy and is now under active development. We are based in St.-Petersburg; the team consists of three people: I’m responsible for the technical part, my partner Ildar — for marketing, finance, legal issues and Roman - for the musical and content part.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

At the moment, the electronics, software and case have been completely redone. The story will be continued soon in the next article!

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Those who are fond of following the project updates, please, leave your email in the form on the website and subscribe to social media.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I really hope to get feedback from you with your comments and suggestions!

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Thank you for your attention!

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Funny episode from the development process

I was sitting and debugging NRF52, trying to output the data via UART. No results. I checked the code, soldering, even re-soldered the chip — nothing works!

0 reactions
heart.png
light.png
money.png
thumbs-down.png

And then randomly, I restarted the board in an unusual way –letter N came to the terminal in ascii. It corresponds to number 0x4E, which I haven’t sent. I restarted again — letter O has come. It is strange. Perhaps, the problem is in the quartz resonator, and the baud rate has failed? I changed the frequency in the terminal, restarting the board — again, N came. With every new restart, a new letter came, which eventually made a repeated phrase — “NON GENUINE DEVICE FOUND.”

0 reactions
heart.png
light.png
money.png
thumbs-down.png

What does this NRF venture do? I’ve cleared the firmware. How on Earth can it remember after the restart what was sent last time? It looked like a kind of seance. Perhaps, I’m the very NON GENUINE DEVICE?

0 reactions
heart.png
light.png
money.png
thumbs-down.png

When I looked up on Google, I found out that manufacturers of FTDI chips, which are installed in USB-UART dongles, found a way of fighting with Chinese counterfeits. Windows driver checks chip originality and on the go replaces the input data with this phrase if it is counterfeit. Evidently, my dongle turned out to be a counterfeit, and replacing another has solved this problem.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

I thank the counterfeits again.

0 reactions
heart.png
light.png
money.png
thumbs-down.png

Give Your Thoughts on All The Latest in Tech

HackerNoon has built a custom Slack app called Slogging to publish conversations about how technology is infiltrating everything! Join us on Slogging to give us (and the world) your two cents on all the emerging technologies of today.

5
heart.pngheart.pngheart.pngheart.png
light.pnglight.pnglight.pnglight.png
boat.pngboat.pngboat.pngboat.png
money.pngmoney.pngmoney.pngmoney.png
by Dmitriy Dudarev @dudarion91.Electronics engineer. I love everything related to technology and science. And also snowboarding 🙂
Read my stories
Customized Experience.|

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK