Alkex Posted October 30, 2006 Report Posted October 30, 2006 Hi,I was wondering if the pic is powerfull enough to analyse the pitch of an audio input by measuring it's frequency thru ain pins.Ultimately, I would like to analyse 6 channels at once (one for each guitar string) and convert them to midi.I think I could get my head around the programming side of it, but need to know if this is a realistic or too ambiscious project.midi guitar anybody? ;D Quote
AndrewMartens Posted October 30, 2006 Report Posted October 30, 2006 Quick answer: probably not. While the PIC may be powerful enough (if you're lucky, but I doubt it would be to do this with a quick response rate in realtime), unless you've studied signal processing and assembly language programming, this is probably too ambitious.Longer answer:However, I seem to recall someone once making a PIC frequency analyzer for a contest a few years back. The PIC hardware has improved since this point, and if you were to selectively filter around the guitar string frequencies, it may be possible. However, you'll probably have to code this in assembly for speed, and have enough signal processing knowledge to figure out how to do the analysis. That part could be done on a PIC, given enough time and knowlege.The real challenge would be doing this fast enough to trigger MIDI note events, and that is where I'm 99 44/100% sure the PIC will not be fast enough. You'd probably want something more along the lines of a 56303 DSP.Check this out for a start, though...: http://www.circuitcellar.com/library/print/0998/Lacoste98/index.htm Quote
Alkex Posted October 30, 2006 Author Report Posted October 30, 2006 Hi Andrew,Thanks for your comments, but i think there is still hope :DCheck this out:http://tomscarff.tripod.com/pitch_midi/pitch_to_midi.htmTom seems to have succeded, using a pic16f877, so surely our 18f series can do it...I will build one of his pitch to midi devices (source code and pcb free for download) and will see how I can come to make this a midibox compatible module, because allthough a standalone device would be cool, the real fun come in when it speaks in "MIOS" ;DI'll keep you posted...Best Alex Quote
AndrewMartens Posted October 31, 2006 Report Posted October 31, 2006 Very interesting. It sounds like his approach would work very well for single notes; it's essentially a threshold detector that then does a period -> frequency -> MIDI note conversion. Trying to process all six strings from a guitar would be a different matter, though (unless you wired a custom pickup so that the element for each string went to a different output)... Quote
Mr modnaR Posted October 31, 2006 Report Posted October 31, 2006 or, just get one of these:http://www.gibsondigital.com/separation.html :o ;D Quote
moebius Posted October 31, 2006 Report Posted October 31, 2006 Hex pickups for Guitar do exist...Moebius Quote
Mr modnaR Posted October 31, 2006 Report Posted October 31, 2006 oh, i didn't know that. guitars aren't my thing really (yet) Quote
Jaicen Posted October 31, 2006 Report Posted October 31, 2006 I would have said that it's probably quite easy to get a crude implementation of pitch to MIDI going. You wouldn't really need to mess too much with frequency analysis or any of that stuff. I would run a hex pickup, with a 24db low-pass filter (to filter out harmonics and produce the fundamental), each feeding comparator. This will produce a square wave approximately the frequency of the string vibrations. Once you have your square wave, it would (in theory) be a relatively simple task to feed it into a PIC running the appropriate pitch to MIDI converter. As far as the conversion goes, I'd be inclined to do it using some sort of frequency comparison table. That is, have the PIC compare the incoming frequency with a table of frequencies within the range of the guitar, ie. all the strings at all the frets, and maybe those in-between for bent strings if you're ambitious. If it's clocked at a reasonable speed, and can lock onto the pitches and remain stable, I would think it is quite possible to implement a pitch to MIDI MB. Having said all that, I just read the link posted and it pretty much does what i've said! Quote
Alkex Posted November 3, 2006 Author Report Posted November 3, 2006 Great stuff,thanks for your comments,I'll be out looking for a hex pickup, and see what I can pick up... :o Quote
DrBunsen Posted November 6, 2006 Report Posted November 6, 2006 I'm sure I've seen dedicated frequency to voltage chips around somewhere Quote
moebius Posted November 6, 2006 Report Posted November 6, 2006 I'm sure I've seen dedicated frequency to voltage chips around somewhereYup, those exist.. But I guess those wouldn´t work here. They are not using them on SDIY, soo.. ;)Moebius Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.