Opening this topic up again to gauge whether or not it’s feasible. Most discussions I’ve found are over 10 years old so hoping there’s been some creative solutions in the past decade that I’m not aware of yet. Fairly new to arduino, but I understand the basics. I want to convert an old bass into a midi controller by running current through each string and grounding the frets. I came across someone who mentioned that polyphony could be possible through using a resistor ladder. I’ve also seen people mention using multiplexing and treating it like a keyboard matrix where when multiple frets are contacted on the same string there’s a fret “priority” to determine which midi note gets sent. I’ve also seen mention of a shift register though I’m unfamiliar with that concept. I plan to use individual piezoelectric sensors on each string to detect the pluck which will determine velocity sustain and “note off” message.
Could anyone offer insight into how to make this project a reality, or if it’s feasible at all? Are there any workarounds or outside the box ways to get this done without separating each fret into 4 distinct pieces?
I was under the impression that bass frequencies were too low to be read by frequency analysis without significant latency because of the length of the lower frequency waveforms. I've also heard frequency analysis is an imperfect and latency-ridden science on an arduino anyway, but I could be mistaken. I do have a teensy on hand if that helps anything. I'm mainly hoping to build this for live performance so low latency is a must.
When you say the laws of physics, do you mean the issue of multiple frets making contact with the string when pressed?
No all you need is one cycle to be able to analyse it.
Depends on the sort of Arduino, but yes a Teensy 4.1 would be better. The thing is that you are not after very fine frequency measurement, just close enough to recognise a semitone. I have a friend who was experimenting with this sort of approach all be it using a 6 string guitar, with a processor that was included with the individual pickups. He was doing the post processing to correct the information it was turning out in order to make the MIDI notes produced match a predetermined pattern to allow disabled people play tunes without the correct fingering.
I can't remember the details at the moment but I will email him and find out the name of the package if you want.
I had done a similar thing on the MIDI guitars I have been building with touch sensors rather than strings. Like this one.
The bit about the laws of physics was a joke, in that you still can't use the fret contact without making the frets individual, because electricity still works the same way.
I did make a Bass guitar that used elastic bungee chords vibrating in a slot opto interrupter to detect vibration with push switches determining the notes. Only two strings and the second string was a fixed, but programmable, distance from the ones given by the buttons.
A single cycle at 50hz is 20ms which is pretty rough for live playing. Especially considering that’s before it even touches the other end of the midi cable. Though maybe there’s a way to analyze the harmonics rather than the fundamental.
That would be fantastic if it’s not too much trouble. Thank you!
Awesome midi guitar as well! Looks great and sounds great. The touch screen strum is pretty slick.
In doing research I came across this video of one of my favorite bassists demoing a bass modded by a company called frettrax that was around several years ago. They apparently were able to mod any electric bass to add fret scanning midi functionality while maintaining the bass’s ability to operate as a normal instrument. You seem to know a lot about this stuff. Care to speculate how it works? Here’s the video in question:
The one I was using was a combination of a pickup called the Roland GK3 and a pedal called the Boss GP10GK but there are I think a few different pedals which are compatible with the GK3 and other hexaphonic pickups like it. The Roland/Boss midi guitar system has been around a while it seems. They work by taking a monophonic signal from each string and then pitch tracking and converting them to MIDI. The one I had also allows you to keep everything as audio and apply effects to each string separately which is mostly what I have used it for but both work really well. The slightly annoying thing about that pedal is that it doesn’t have a DIN MIDI output so you have to do things via a laptop with USB and can’t go straight into a synth but I think all the other pedals are the reverse - DIN MIDI but no USB. I have an older one called the GR-20 which I picked up pretty cheap second hand and came with a GK3. Definitely bargains to be had on eBay when I looked.
He might join us on this thread.
As to the video, it is hard to see what is actually happening as those look like the original metal frets. Let me mull things over for a day or two and see what I can come up with.
Hi! Mike's friend here! This looks like it might be a way to go Nerd Club: Guitar tutor project explained. Seems kind of like a resistor ladder/key matrix hybrid approach from what I can tell. There is just one resistor ladder under the fretboard but you pull the strings to ground one at a time with the others left floating to get 6 separate readings - I hope I have understood/explained that right!
I would also say that the hex pickup method is great and the latency doesn't feel as bad as you would think - comparable to standing 7 metres away from your amp. I reckon a lot of the stuff Victor Wooton was doing with the slower attack synth and flute sounds would be totally doable, especially when blended with his bass signal. Maybe more percussive stuff might be trickier to get the right feel. On the plus side you have the possibility of bending notes and using vibrato when using the pitch tracking methods which you can't do tracking fretboard position but I think there are definite pros and cons to both ways! Hope you post some pics/videos of the final result!
Please do, I'm interested to hear your thoughts. I've been doing a good bit of research trying to get more info on frettrax and I haven't come up with anything yet. Here's some more info that you might be able to make more use of than I was:
From everything I can tell from available videos and according ot people online who've had their bass modded with a frettrax system those are the original, unseparated frets.
Frettrax doesn't take any reading of the right hand pluck or string vibration, thus it only sends notes when the string is making contact with the fretboard, meaning no open notes. From where I'm standing, you'd think that adding some piezo sensors to each string to measure velocity, sustain, or at the very least note on and off messages would be the most simple part of this tech. This is purely speculation, but the lack of any vibration readings/open notes might hint at some unique thing about the tech.
Thanks a ton! That looks like exactly what I've been looking for, just skimming it over. This is going to be incredibly helpful and may have pretty much everything I need to implement this design.
I do tend to do a lot of percussive playing/groove-based stuff as a bass player, so the latency thing is pretty important to me. I don't doubt at all that the hex pickup works for most people though, and the pitch bending/vibrato/expressiveness afforded by the harmonic analysis is a great selling point. I'll most likely pick up a GR-20 sooner or later. Thank you again for offering advice, I'll definitely post some pics and vids when I wrap up the project!
I have used piezo sensors extensively and I doubt if they could be usefully employed here. You will not pick up any vibration from the strings and having a sensor under every string of every fret would all trigger at the same time because of the mechanical coupling of so many sensors is such close proximity.
These sensors only respond to physical deformation of the substance between the two plates. This produces a charge during the time the deformation is taking place. It will not respond to pressure as such. So it can't give a signal if you put a weight on it, it is only produces a signal as the weight is first applied.
I should have been more clear. I meant to have 4 piezoelectric sensors total, only one per string, near the bridge of the bass in order to detect the vibration of the strings as they are plucked/thumped/slapped with the right hand.
My thought was, presuming I can get the fret sensing part to work, that I could have the controller actually act like a real bass in that note on messages would only be sent when a string was plucked. This is opposed to the frettrax design which output midi notes as soon as the string made contact with the fret.
I can't see it working because as I said the sensor would not pick up vibrations from being placed under the bridge. The bridge is the point where there are the least vibrations of the string, that is the point of the bridge. The further away the bigger the bigger are the vibrations. The largest signal is got half way between bridge and head stock.
If you are thinking of the sensor as basically a microphone the fact that sound travels very well in a solid means, I can't see how you would distinguish between the four strings. My guess is that where ever you put the sensors they would all pick up virtually the same thing. Which means when playing more than one string at the same time you would be in the same position as using a normal pick-up.
I'm not either bass or guitar player (I'm a keyboardist in a prog rock band), but just to add some side information, based on my experience.
I think if one wants to have a realistic MIDI output you can't just capture the frequency (e.g. the exact note played), you also need to find note velocity (the "strength", or "amplitude"). Any solution based on fret contacts is not enough, not only because it won't get velocity, but I could even press a string over a fret without actually playing that string!
Some "MIDIfied" solutions like "Line6 Variax" guitars (if you know them, one of our former guitarists used it) use separate pickups under each string, together with a realtime signal analysis to either define MIDI output or "play" specific virtual instruments (even not only guitars or basses!), or both.
Said that, if you just need a very "basic" solution (not for real performace usages), you could capture single frequency/notes (provided you won't play more than one string at a time) by using a piezo sensor, sticked near the bridge, then make some frequency analysis and send the corresponding nearest MIDI note.
Ok got it. I was originally thinking the most accurate way to measure the velocity of the string would be to some type of malleable membrane with a piezo physically touching the string itself to measure vibration of the string and convert that kinetic movement to a midi note velocity value, as well as trigger the initial note on message. Obviously this would mirror the functionality of an actual bass closer since without vibration, the note would not trigger. I know this would dampen/mute the string but I could have lower tension on the string to compensate, and because I'm using it only for midi, it would not need to be in tune.
What would be the best way to get velocity data from individual strings? Without much experience under my belt, it's difficult to know how certain sensors actually behave. Any method whereby I'm measuring the intensity/range of the physical vibration of the string itself would be the most optimal solution in my opinion, since then I don't have to worry about unintentional triggering of other strings so long as my threshold values are set correctly.
Amazing, thank you. I'll be digging into this later tonight.
Definitely, you're right. And if I'm not mistaken that's the last piece to the puzzle, which I'm trying to figure out right now. I originally thought piezoelectric sensors could, through direct contact to individual strings by way of foam or rubber, measure the vibration of the string itself. However, if I'm reading his posts correctly, Mike doesn't think that will work. If you or anyoen else has suggestions for getting velocity data from individual bass strings with a reasonable degree of accuracy and without interference from other strings, I'm all ears.
Yes. But commercial pickups don't have 4 separate coils (or 5 for 5-strings basses, or 6 for guitars), and I don't think such kind of pickup is easy to find, so you probably need to create your own one by customizing a standard (bass) pickup.
Just to explain, this is the schema of a guitar pickup (bass ones obviously have fewer cores):
So, you'd open it, take the single coil away and wrap separate wires around each one of the metal cores, and let them out of the pickup (1 common and 1 for each coil, so 5 wires for 4-strings bass).
And this is the easier part ;-)... Then comes the interface between those wires and Arduino analog inputs (I think there's no enough current to directly drive an analog pin...), and finally how to let Arduino "detect" notes and "decode" them to MIDI events.
Buy a Line6 Variax (or similar) guitar, and you'll play directly any kind of bass, guitars (even 12 strings), together with emulated amplifiers, and/or bring MIDI notes to an expander to do what you want. I know it's not cheap, but the project you have inyour mind could be not more than a funny style exercise, unusable in a "real" live music environment.
PS: I'm not a Line6 reseller, I don't sell anything, but I cite Variax because it's the one I had direct experience with such kind of "digital guitars", but can be others on the market...
Yes you can get them, they are not cheap but available.
I did look into winding my own but the number of turns and thinness of wire you need to use made it impossible without making your own winding machine. Although modern neodymium magnets mean you will need fewer turns for the same size signal.