News:

SMF for DIYStompboxes.com!

Main Menu

Guitar-to-MIDI project article

Started by Mark Hammer, November 02, 2009, 01:07:26 PM

Previous topic - Next topic

Mark Hammer

...in the October (current ...or recent...or last month's...or soon to arrive....depending on where you live) issue of Everyday Practical Electronics.  It uses a 16F88 PIC and is mono.  While mono is a bit of a constraint, this is a pretty darn simple project by any standards.  Just 2 or 3 chips and a couple of jacks.  This project and a cheap 2nd hand tone generator (I've bought General MIDI tone generators for as little as $25 new) and you have a pretty inexpensive introduction to the world of guitar synths.

Their portal is here: http://www.epemag3.com/  The hex code for programming the PIC can be found here: http://www.epemag3.com/index.php?option=com_docman&task=cat_view&gid=52&Itemid=38

carrejans

Quote from: Mark Hammer on November 02, 2009, 01:07:26 PM
...in the October (current ...or recent...or last month's...or soon to arrive....depending on where you live) issue of Everyday Practical Electronics.  It uses a 16F88 PIC and is mono.  While mono is a bit of a constraint, this is a pretty darn simple project by any standards.  Just 2 or 3 chips and a couple of jacks.  This project and a cheap 2nd hand tone generator (I've bought General MIDI tone generators for as little as $25 new) and you have a pretty inexpensive introduction to the world of guitar synths.

Their portal is here: http://www.epemag3.com/  The hex code for programming the PIC can be found here: http://www.epemag3.com/index.php?option=com_docman&task=cat_view&gid=52&Itemid=38

I'm very interested in this.
What's the problem with mono? A guitar is always mono, no?

So, this works without a midi pickup? I really wanna know how this thing functions; and especially how good/bad.

I just tried to order the issue.  :-[ They only accept credit card; and I don't have one.  :-\




Taylor

Quote from: carrejans on November 02, 2009, 01:19:59 PM
I'm very interested in this.
What's the problem with mono? A guitar is always mono, no?

So, this works without a midi pickup? I really wanna know how this thing functions; and especially how good/bad.

He means monophonic, that is, only one note at a time, rather than monaural (coming from only one speaker). It works without a midi pickup because it can only interpret one note at a time. MIDI pickups are just 6 tiny magnetic pickups; there isn't any MIDI conversion going into the pickup, all it does is split the 6 strings into separate channels, so the processor can sense them separately.

So this very neat project would be good for leads, basses, etc. but no good for chords.

carrejans

Quote from: Taylor on November 02, 2009, 01:46:40 PM
Quote from: carrejans on November 02, 2009, 01:19:59 PM
I'm very interested in this.
What's the problem with mono? A guitar is always mono, no?

So, this works without a midi pickup? I really wanna know how this thing functions; and especially how good/bad.

He means monophonic, that is, only one note at a time, rather than monaural (coming from only one speaker). It works without a midi pickup because it can only interpret one note at a time. MIDI pickups are just 6 tiny magnetic pickups; there isn't any MIDI conversion going into the pickup, all it does is split the 6 strings into separate channels, so the processor can sense them separately.

So this very neat project would be good for leads, basses, etc. but no good for chords.

Oh, off course. I thought of mono as the opposite of stereo.
So, you could use a larger PIC (if necessary), and copy the code 6 times; and use a hexaphonic pickup.

Mark, maybe you can send me a copy of the article? I will send some germaniums to you...  :)

Mark Hammer

...and while I wish I could say that it is so simple that there is no reason why you couldn't make six of them and slave them to a hex pickup, the reality is that they would stilll remain 6 mono signals, and not one integrated signal conveying information about 6 pitches.  This means that you would need to use 6 tone generators feeding a mixer, which tends to negate the cost-effective aspect a bit!  Could you integrate all 6 signals within a single PIC?  I suppose, but you'd have to do the code development yourself, instead of using their PCB layout and already-develped code.

That being said, give a listen to all those classic Pat Metheny recordings in which he uses a Synclavier or Roland synth, and 95% of it is single-note runs.  So, if you were planning on using synth for polyphonic "washes" or pads, fuggedaboudit.  If you were interested in playing flute or trumpet lines, though, this EPE project would be the ticket.

carrejans

Quote from: Mark Hammer on November 02, 2009, 02:52:13 PM
...and while I wish I could say that it is so simple that there is no reason why you couldn't make six of them and slave them to a hex pickup, the reality is that they would stilll remain 6 mono signals, and not one integrated signal conveying information about 6 pitches.

I never used MIDI, don't know how the signal looks like.
But I guess it's not that hard to make the 6 midi signals, just 1. No?

scratch

Mark, is this issue out in newstands now?

Sounds interesting ... I've got one of those cheap GM modules (actually it's my wife's ;-) I could use.
Denis,
Nothing witty yet ...

Mark Hammer

It's out in Ottawa now, at least.  I saw it while flipping through mags at Chapters 2 days ago.

markeebee

Thanks Mark, you may have saved me a wedge of cash.

I was about to order one of these guitar-to-midi converters:

http://www.dolphinmusic.co.uk/product/39923-sonuus-g2m.html

But instead I've just ordered a back issue of the mag. 

scratch

Mark,

thanks for the heads up, managed to get out at lunch today and pick up a copy. Not much to the circuit itself, going to have to download the code and get me a programmer ...

More stuff I don't have time to play with ...
Denis,
Nothing witty yet ...

Marcvv

Quote from: Mark Hammer on November 02, 2009, 02:52:13 PM
.
This means that you would need to use 6 tone generators feeding a mixer, which tends to negate the cost-effective aspect a bit!  

But maybe you are forgetting that that is why multi-timbral modules solved that solution already a while ago: each string its own midi channel and voila....

Best, Marc

Kon_fución

Being a King Crimson fan and seeing Robert Fripp play with hes MIDI gear, made me wanna do something like this. Thanks Mark, you are always helpful, in the right place at the right time. Every advice from you has always nailed it.
Too bad they used a PIC. It would have been a good idea to use an AVR with the USB implementation.
Im gonna go keep reading the magazine.

Tonemonger

Hmm! I should check out this section of the site more often.
I just bought the Sonus unit that Markeebee referred to YESTERDAY !
Still , for $Aud150 I'm pretty damn happy.

potul

Good heads up!

I bought the magazine some days ago and took a look at the project. I was surprised to see there is no hardware filtering of the signal before inputting it into the PIC, just some amplification.
All filtering is done by the software. In case you're interested, the software is basically doing a "zero count" algorithm at the beginning of the note to determine the pitch, and then tracking the amplitude to decide when the notes ends or a new note comes in. The "zero count" is using some thresholds to ensure only relevant harmonic is counted.

I'm planning to test it this week, and probably modify the project to see if I can get a decent chromatic tuner as well.

Potul

potul

I breadboarded it tonight, and it works fine, at least it works as I expected it to work after reading the code.

-Tracking is not perfect (having the guitar in tune helps, though :P )
-You need to pick very cleanly.
-The unit is only tracking pitch at the attack of the note, so if after picking you modify the pitch (bending, slide, pull up...), it is not tracked.
-Volume of the note attack is translated into midi note velocity. But velocity is constant until note fades.

Not bad, considering that I skipped the part of the circuit that references the ADC max and min, so probably accuracy can be improved in the final build.
I will investigate if adding some filtering by hardware, the tracking can be improved.
Modify it to have bend tracking will be tricky... because of the way the algorithm works. It tracks pitch at the note attack on purpose to avoid harmonics... so if we continuously track pitch, probably will have wrong pitch detected at the note decay. And, if we add a schmidt trigger type of filter to focus on the main harmonic, we will lose the dynamics.

I cannot compare with the Sonnus G2M, because I have never tried it.

Going back to the hex pickup topic, IMHO if you use a PIC with enough ADC inputs (6), it should not be an issue to modify the code to "mix" the midi signals of each string. The timing could be challenging, though (you have to be tracking pitch in all strings at the same time, or "multiplexed"). But taking into account that in this project the PIC works at 4Mhz  but it could be configured up to 20Mhz, the PIC should be able to handle the workload (although the ADC could be the bottleneck if it is shared by the inputs).

Potul

Mark Hammer

Wow.  I'm impressed by the diligence of your response to the entire topic.  Many thanks.  not only from me, but I'm sure from many others as well. :icon_biggrin:

Mark

space_ryerson

Yes, thank you Potul!

I bought the pdf version of the issue, and am reading it over. My wife plays synth and bass, so it may be a perfect fit for her :)

potul

Quote from: space_ryerson on November 19, 2009, 03:32:31 PM
Yes, thank you Potul!

I bought the pdf version of the issue, and am reading it over. My wife plays synth and bass, so it may be a perfect fit for her :)

I didn't know you could buy the issue in pdf! I didn't see this option when I ordered my hardcopy one  ??? ... I had to wait to have it mailed to me  :icon_cry:  (an I live in Spain... )

Once I have it built I will post some pics and samples, if it is useful, and eventually an alternative layout and any mod I may apply.

Potul

Jaicen_solo

I don't suppose someone could explain how I get my hands on this project? I don't seem to be able to find a link to buying the PDF?

space_ryerson

I had to dig a bit around the site to find it the first time. Try this link.