Shop OBEX P1 Docs P2 Docs Learn Events
Audio signal processing (guitar to midi) — Parallax Forums

Audio signal processing (guitar to midi)

shaunxcodeshaunxcode Posts: 3
edited 2008-04-01 22:27 in Propeller 1
Let me know if I am entirely barking up the wrong tree/setting out in the wrong direction here... but. I am looking to use a propeller chip to do guitar to midi conversion, taking the input directly from the 1/4" jack on a guitar (no special pick ups etc.) so I will need to process the actual signal and determine what midi note etc. it correlates with. Is this something that would be appropriate for the propeller chip/paradigm? Any advice would be greatly appreciated. Also I have never used spin but I have c and asm experience if that counts for anything.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-31 14:42
    The Propeller can do complex audio processing in real time including the analog to digital conversion. You will probably want some signal conditioning on the guitar pickup (like a simple pre-amp), but the Demo Board comes with an electret microphone that the Propeller digitizes directly. You will need to use assembly for the audio processing. Spin is not fast enough. epmoyer has developed a guitar effects pedal (http://forums.parallax.com/showthread.php?p=711145) that demonstrates what the Propeller is capable of and may give you some ideas.
  • yerpa58yerpa58 Posts: 25
    edited 2008-03-31 21:19
    Unless you have individual outputs for each string, you will find it very hard to divide the polyphonic sound into individual MIDI note on - note off events. A friend of mine has an older synthesizer guitar, I think it was made by casio. It uses a cable about one inch in diameter to connect to a special signal processing box that re-synthesizes the notes. It uses separate pickups for each string, and it sounds beautiful if you can ignore the huge cable!
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-04-01 11:44
    yerpa58 said...
    Unless you have individual outputs for each string, you will find it very hard to divide the polyphonic sound into individual MIDI note on - note off events...
    And maybe not. Beau offered up a spectrum analyzer once: http://forums.parallax.com/showthread.php?p=663985
    ·
  • yerpa58yerpa58 Posts: 25
    edited 2008-04-01 15:27
    Fred, that sure is an interesting link. However, as Beau mentions, the method can be slow. For example, consider the octave between 440 & 880 hertz. A single frequency period will range from about 1.1 milliseconds to 2.3 milliseconds. I'll assume the shortest period for these rough calculations. Dividing the octave into 10 hertz intervals and sampling each interval for 100 samples will take about five seconds. That is too slow for midi tracking.

    I'll admit that a propellor-only version of a midi guitar tracker is not impossible, but I will stick to my original "very hard" estimate. smile.gif
  • shaunxcodeshaunxcode Posts: 3
    edited 2008-04-01 15:41
    Also I should have mentioned I am not particularly interested in having it be real time just yet. Thanks for the feedback/links/ideas so far!
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-04-01 22:27
    Yerpa, so five cogs can sample that octave in 1 second? Plus it does seem that 10hz separation gives a lot more notes in that octave than ordinary souls can actually hear.

    Meanwhile, http://en.wikipedia.org/wiki/Pitch_detection_algorithm might be useful.
Sign In or Register to comment.