Electronic – Analog preprocessing circuit (anti-alias/pre-amp) for driving ADC

adcamplifieranalogaudiolow pass

Background

Similarly to what Jeri Ellsworth did in her C64 Bass Guitar hack I am working on an audio-to-midi converter for my bass guitar.

I am also planning to use piezo discs as sensors placed under each string, connected to a Papilio One, using the ADC of the Logic Start MegaWing (an ADC128S102). The ADC reference voltage is hardwired to 3.3. volts.

My problem is that my analog electronics knowledge is pretty bad and I don't have any practical experience (I have given a try to the relevant chapter of the The Data Conversion Handbook but it's a bit too advanced for me).

Question

What circuit should I use to drive the ADC? The circuit should

  1. Implement an anti-aliasing filter. The frequency ranges (excluding harmonics) typically found in each string of a 4-string bass are:

    • E string: E1 (41.20 Hz) to E3 (164.81 Hz)
    • A string: A1 (55.00 Hz) to A3 (220.00 Hz)
    • D string: D2 (73.42 Hz) to D4 (293.66 Hz)
    • G string: G2 (98.00 Hz) to G4 (392.00 Hz)
  2. Ensure that the input signal voltage matches the expected range of the ADC (0V to 3.3V as I understand it).

I would appreciate as much practical information as possible (e.g. specific circuits and specific op amp parts to use) since, as I have said, I am pretty unexperienced on this. Pointers to books/articles suitable for a newbie like me would also be appreciated.

Best Answer

I wouldn't recommend piezo pickups. On my old Antoria (pre Ibanez) 6 string I used 6 small inductive sensors (lots of coils of wire around a magnet aka 6 individual guitar picks) and they worked fine in the bridge pickup position - I didn't get any interference between one string and the next - you will using acoustic pick-ups and I bet you get cross talk and this will likely annoy you - it would me. I built mine back in 1982 and fed each string signal through a simple op-amp distortion circuit then mixed the signals. It sounded like an organ and I ought to dig it out one day but anyway, if you are converting to midi you probably really want a sq wave signal rather than trying to do the zero crossing in software based on the numbers thrown out by the ADC. Just a recommendation from someone who built something that totally makes Jeri's look like a piece of crap. I heard her say it didn't work that well too!!!


Latest recommendations

I play bass guitar pretty good and I'm very familiar with the waveforms they produce and how most bass tracks are recorded. The 99% rule is that only one note is ever played at once i.e. the bass guitar is nearly always played a single note at a time (even though it has four strings). There is a very good reason why bass guitarists don't play multiple notes - at such a low frequency, multiple notes will nearly always sound like a mess. This is unlike a 6 string guitar - this is tuned at least one octave higher (comparing the fat E strings) and at this pitch chord notes sound naturally very good. So my 1st recommendation to you is: -

Stick with the in-built conventional electromagnetic pickup on your bass guitar and don't even think about modifying this until you have mastered the algorithms to convert the bass guitar waveform to midi. This gives you a perfectly good signal to try whatever DSP you want.

In fact, I'd go a stage further - make a few choice recordings of your bass guitar and use these recordings as inputs to your DSP system. This leaves you two hands free to tweak your code as much as you need to. So, my 2nd recommendation is: -

Record a few choice bass riffs into the sound card on your PC and put the bass down and forget about it until you have your algorithms sorted out. You can use your PC for outputting the riffs and if you use a wave editor you can copy and paste, step/repeat, merge or do virtually anything with the recorded bass sounds. Output these thru your soundcard and do the really difficult job first.

The really difficult job is converting the bass sounds outputted from your PC to midi format - any job that needs to be done in life or electronics - tackle the hard bit first and if you can't do the hard bit then abandon the idea.

If you get the hard bit done then try playing your bass guitar "live" into your DSP system and see if it still works without issue. It won't of course because little bumps and erroneuous string noise will cause your algorithm problems you haven't considered so my third recommendation is this: -

Try recording what gives the DSP a problem and use this new recording to fix-up your algorithm. Repeat/loop several times until your are happy with your code-based midi converter.

Then, and only then, should you start considering any modifications you might choose to make to your bass guitar. In my honest opinion I don't think modifications are needed because of the 99% rule.

As a free xmas gift, if you want some bass guitar samples, email me (see my profile) and I'll send you some.

Also, using the PC as the sound source for the bass guitar audio gives you the opportunity of perfecting the algorithm all on one platform.