Hexaphonic (6 discrete channels) passive guitar pickup for pitch detection

Status
Not open for further replies.

graydetroit

Well-known member
I was interested in the idea of integrating a teensy directly into the body of an electric guitar, where I could use 6 analog signals from a divided pickup (like this http://www.ubertar.com/hexaphonic/index.html) in order to perform pitch detection on each string for converting the notes played on the guitar to digital notes that the Teensy can use for a six-voice polyphonic synth instrument generated by the Teensy Audio Library. You could also convert the signals to MIDI and control external devices and whatnot as well.

You could then have a single mono or stereo output from the guitar, and on the guitar you can have pots and switches for controlling the dry guitar signal, the synth signal, and the effect signal that gets applied to both the guitar and synth signals.

I wonder what it would take to have that sort of capability. The guitar's body could be routed out to act as the enclosure for the onboard device, and could be powered by a rechargeable lipo battery.

The reason why I'd want this sort of setup is to avoid having to use something like a Fishman TriplePlay or the Jam Origin Midi Guitar software which typically requires you be hooked up (wirelessly or not) to a PC/Mac while playing.

With this setup you could upload simple patches or use the basic audio library oscillators and have an onboard guitar synth, effects, as well as the normal guitar - or however more complex you want to make it.

I'm experienced with Teensy programming, Serial and Bluetooth communication, and breadboarding with sensors and such, but audio processing is sort of over my head when it comes to circuitry and hardware. Anyone have any tips on where to get started with a Teensy 3.x and one of those single coil type divided pickups linked to above?

Thanks!
 
Last edited:
I was interested in the idea of integrating a teensy directly into the body of an electric guitar, where I could use 6 analog signals from a divided pickup (like this http://www.ubertar.com/hexaphonic/index.html) in order to perform pitch detection on each string for converting the notes played on the guitar to digital notes that the Teensy can use for a six-voice polyphonic synth instrument generated by the Teensy Audio Library. You could also convert the signals to MIDI and control external devices and whatnot as well.

You could then have a single mono or stereo output from the guitar, and on the guitar you can have pots and switches for controlling the dry guitar signal, the synth signal, and the effect signal that gets applied to both the guitar and synth signals.

I wonder what it would take to have that sort of capability. The guitar's body could be routed out to act as the enclosure for the onboard device, and could be powered by a rechargeable lipo battery.

The reason why I'd want this sort of setup is to avoid having to use something like a Fishman TriplePlay or the Jam Origin Midi Guitar software which typically requires you be hooked up (wirelessly or not) to a PC/Mac while playing.

With this setup you could upload simple patches or use the basic audio library oscillators and have an onboard guitar synth, effects, as well as the normal guitar - or however more complex you want to make it.

I'm experienced with Teensy programming, Serial and Bluetooth communication, and breadboarding with sensors and such, but audio processing is sort of over my head when it comes to circuitry and hardware. Anyone have any tips on where to get started with a Teensy 3.x and one of those single coil type divided pickups linked to above?

Thanks!

I've actually got a very similar project on my work bench but I do not try to detect which string the note is, just the note. A basic audio-to-midi converter.

For your project, from the Teensy perspective, you need to be be able to perform a pitch detection / tracking algorithm on 6 channels of digital audio and produce the MIDI signals. I think a T3.6 might be able to handle that in realtime. Since you aren't producing any audio, you can probably ease the processing burden by low-pass filtering and downsample to 22 Khz or even 11Khz. You really only need to detect the fundamental, not the harmonics.

You will need a 6 channel analog front end though. Once again, audio fidelity is probably not a concern since you are just trying to detect pitches, not keep the audio so using a real audio CODEC seems like overkill. I would suggest getting a general purpose multi-channel ADC and choose an appropriate number of bits and sampling rate such that you are satisfied with the accuracy in detecting the fundamental. My gut says 12-bit samples is more than enough resolution, and 10 Khz sampling rate (5 KHz content) should be more than enough if I'm correctly understanding what you're trying to do.
 
Thanks -- though the Teensy would be outputting audio as well when using it as a synthesizer or for applying effects to either the guitar's or synth's signal -- but I do not need to *reproduce* the 6 audio signals I'd be getting from the hexaphonic pickup - those signals are just for tracking the notes and strings played on the guitar. I will draw up a sketch of the concept and attach it a little later to make it more clear. Thank you!
 
I've actually got a very similar project on my work bench but I do not try to detect which string the note is, just the note. A basic audio-to-midi converter.

For your project, from the Teensy perspective, you need to be be able to perform a pitch detection / tracking algorithm on 6 channels of digital audio and produce the MIDI signals. I think a T3.6 might be able to handle that in realtime. Since you aren't producing any audio, you can probably ease the processing burden by low-pass filtering and downsample to 22 Khz or even 11Khz. You really only need to detect the fundamental, not the harmonics.

You will need a 6 channel analog front end though. Once again, audio fidelity is probably not a concern since you are just trying to detect pitches, not keep the audio so using a real audio CODEC seems like overkill. I would suggest getting a general purpose multi-channel ADC and choose an appropriate number of bits and sampling rate such that you are satisfied with the accuracy in detecting the fundamental. My gut says 12-bit samples is more than enough resolution, and 10 Khz sampling rate (5 KHz content) should be more than enough if I'm correctly understanding what you're trying to do.

Blackaddr, please see the following image that I made with Fritzing which details my thought process on this and how I think it might work (from an off-the-shelf / prototyping standpoint) -- I'm sure I'm missing some things, but this is basically what I could come up with.

onboard_synth_bb.jpg
 

Attachments

  • onboard_synth_bb.jpg
    onboard_synth_bb.jpg
    202.8 KB · Views: 175
Last edited:
interesting project,
imo FFT is not fast enough to get fast and nice low latency touch dynamic play.
Also you do not have enough resolution on lower frequencies. you need an excellent interpolation algorithm to determine the right pitch. This is not easy if you do not filter unwanted harmonics from the fundamental tone.
imo, a simple way would be to use the yin based pitch detection. also available in the teensy audio library(by Colin Duffy). Colin Duffy also hold an own github repo whit an newer version (V3) of his library. There are many more things to configure in this newer version. https://github.com/duff2013/AudioTuner.
i use it on my monophonic Guitar Synthesizer found here:
https://forum.pjrc.com/threads/43842-Monophonic-Guitar-Synthesizer-with-subtractive-synthesis

With Colin Duffy s pitch detection in version 3 i get this performance. See image.
the marked area shows a time span of 110ms. The upper track is the guitar signal and the lower is the synthesizer output signal created simultaneously on the teensy3.6.

Image: Envelope - Acceleration comparison guitar(upper track) vs. synth(lower track, one octave higher than the guitar fundamental tone)
envelope-tracking2-klein.jpg

/g
wolke
 
Awesome project, wolke! Seems like you're really able to get rid of any audible latency, great job!

Yeah, I would probably try to use the yin based detection then.

I'm still not sure, from a hardware perspective, if the components I plan to use will do the job. I'm not using the 1/4" guitar cable jack as the analog input, but instead I'd most likely be using the 6 raw lead signals from the hexaphonic pickup. I think that passive guitar pickup signals are unstable, and so I'm not sure if this multichannel ADC (https://www.adafruit.com/product/1083) would be able to amplify the raw signal to the right voltage that the Teensy can use. I'm also not sure that the Teensy cpu and dynamic memory can handle processing 6 signals coming over on 2 concurrent I2C connections. I did some reading up on it, and I think the Teensy currently only supports quad (4) ADC channels via I2C (or maybe it's I2S?). However, looks like a little while back Paul added "TDM" support to the Teensy that can handle 6 audio inputs or something of that sort and there's a board for it on OSH Park's store (the CS42448 Audio board).

Maybe Paul could chime in if he has some spare time? Would be greatly appreciated!
 
The datasheet for the ADS1015 says the input impedance depends on the FSR (PGA) setting, but is generally in the megaohms, so that is good. The FSR (full scale range) can be set as low as 256 mV. You will need to know the amplitude coming out of the pickups. A conventonal vintage, single-coil can be as low as 10s of mV after combining all 6 poles. I"m speculating here that a single pole on a hexaphonic pickup could be less than 10 mV. That means the you could be losing say, 4 bits off the top end, so your 12-bit ADC acts more like an 8-bit adc.

You need to measure the output of the pickup you intend to use, and decide how many effective bits of resolution you need in the sampling to determine if you really need a preamp (6 preamps really). I would try without a preamp during prototyping and go from there.
 
hi,
imo the best idea is to process the signals from hexa pick directly on guitar using an small teensy 3.2 without big adac deals. maybe there is an simple 10bit 6 channel adac multiplexer on the market without good audio specs. because firstly i use the yin algorithm 8bit fixpoint arduino implementation from Frederic Hamel at 2011 by using an arduino uno with 8 bit analog input and maybe 8khz sample frequency without any problems on pitch detection for my guitar. my first monphonic guitar to midi converter :) http://forum.arduino.cc/index.php?topic=82621.0.
if you not plan to use any audio processing with the pickup i think that 8bit and 22khz are enough to process the pitch estimation and envelope detection on each string very well.

video with Frederic Hamel s yin implementation on my first arduino g2m:) project.

for good performance it is more important to track the envelope fast and correct and decide when a string is triggered from your hands. this was my biggest problem. even if yin sometimes needs maybe 20-100ms to find the pitch this is no problem for you if you use the fast envelope detection to start playing the note. i do it on the same way. sometimes yin need longer but i start playing the note even the pitch is not correctly. no problem for your ears. only a problem if you plan to output midi. normally an midi note starts with an correct Note value and not with something wrong which will slide to the right pitch. my midi converter from 2011 had only this problem and ~100ms of latency because i output standard midi with them. so in this case i need to wait if pitch and envelope reach the maximum. not needed if you ignore midi and run your own synth with your own protocol.

so from the concept i think you need an hexaphonic pickup, an cheap adac multiplexer chip an teensy 3.2. to process all pitch and envelope infos from hexa pickup. then you can use maybe canbus to transfer your data from the teensy3.2 mounted on your guitar to your synth module based on an other teensy 3.2 - 6 to process your own protocol which include pitch and envelope infos for 6 Strings. thats all - easy :) or?

you can connect both boxes (teensy-hexa-pick <-> to ground-station-Synth) using an 4 pole xlr connector and an 4 pole cable with ground shield. here you can power the teensy on your guitar with 5v phantom power from your ground-station-Synth and also you have canbus high and low data lines. canbus interfaces are best to transfer data in problematic environment with many electric noise. for example cars or also uavcan in big UAS vehicles.

/g
wolke
 
Last edited:
Status
Not open for further replies.
Back
Top