i build a guitar to midi converter which can convert incoming audio data into midi notes.
it works monophonic so it is only possible to play single notes on your guitar.
the latency varies between 42 and 25ms. this is dependent from the frequency. lower notes need more time than higher notes.
i need no super short latency to perform my idea behind:).
functions and needs:
* stable stage suitable body
* 9V dc connector (already on arduino board)
* play notes on guitar and drive them with a nice monophonic synthesizer. i use a mopho
* connect/disconnect the device from your guitar signal flow using an foot switch
* cut the guitar through signal via foot switch, to play only midi
* select the ONE SHOT MODE via foot switch and catch only the guitar signal if you hold down a second button
this make it possible to play normal guitar, and only on pressing the SHOT button you can catch a note which can do some nice base tone sounds beside the guitar play
button 1(toggle) on top left, connect/disconnect guitar signal to processor.
button 2(toggle) on top right, cut guitar through signal
button 3(toggle) on down left, enable ONE SHOT MODE
button 4(push button) catch a note
some more photos:http://popez.org/~wolke/arduino/g2m/20111211_002.jpghttp://popez.org/~wolke/arduino/g2m/20111211_007.jpghttp://popez.org/~wolke/arduino/g2m/20111211_006.jpg
the circuit: http://popez.org/~wolke/arduino/g2m/20111211_001.jpg
an circuit enhancement to increase input resistance.http://popez.org/~wolke/arduino/g2m/new_buffer.jpg
new Arduino 1.0 compatible sketch:http://popez.org/~wolke/arduino/g2m/git2midi.ino
a small video shows the converter connected to an mopho:
how does it works:
the arduino record some samples of audio data in 8bit mode via an analogue input.
than we analyse the data using the YIN algorithm to get an frequency value.
if this is done we convert the frequency to an midi note and fire the midi data via serial tx output.
the nice work to implement and simplify the YIN algorithm into fixed-point math which works very well on an arduino
comes from Frederic Hamel (thx). hi build an arduino based guitar tuner. the project is really well documented and here available.http://deambulatorymatrix.blogspot.com/2010/11/digital-chromatic-guitar-tuner-2008.html?showComment=1323111013326#c3088234981825128005
please read the licence notes into the code. frederic's parts of the code are licensend under Attribution-NonCommercial 3.0 Unported Creative Commons license.
the analogue part:
to record the guitar output into the arduino analogue input we need an small amplification and an exact DC offset at 2.5V on arduino input pin. because we can only record positive values.
to do this work, i use manly an TLC272. here the circuit http://popez.org/~wolke/arduino/g2m/20111211_001.jpg
the tlc272 can do a good job with an 5V single supply which is available on the arduino uno. IMPORTANT use later a good wall wart. better no switching wall wart. use one with a transformer. the arduino supply is not the best and we can catch high frequency noise.
the first 10k resistor give us an input resistance from arround 10k. this is ok for us and don't suck to much signal for the guitar through jack, which will connected to your amp. on an amp with 68k input resistance i can not notice any different between connected or disconnected following midi converter circuit. we need the c1 cap to decouple DC from the input stage.
the first inverting op amp stage do the main amplification. the second inverting stage give us a smaller amplification in combination with a low pass filter beginning at ~1khz (16k+10n in feedback loop) . both stages have voltage divider 10k+10k on positive input pin to centre dc offset to the half of Vcc.
ok, this is enough blah blah