From Flute to MIDI

Greetings everyone!

I've been given recently a very nice Barcus-Berry 6100 flute pick-up.

Normally this mic is sold with a pre-amp in order to balance the signal and plug it into any amplifier, etc.

Nevertheless, I was wondering if it would be possible to plug the Barcus-Berry flute mic directly into an Arduino board without its pre-amp, knowing that its input is an unbalanced RCA plug, in order to interpret this signal into MIDI.

And, if it were possible, wich board would be the most adequate ?

Thank You All very much!

Martín

You'll need a preamp (probably). Microphones typically put-out millivolts (depending on mic sensitivity & sound level). Preamps put-out line-level, which is around 1V. The Arduino ADC has a 5V (DC*) and a 1V (DC*) range, so line-level is appropriate.

And since it doesn't appear to be a "standard" microphone, you'll need a preamp (of some kind) if you ever want to plug-into a mixer or PA system.

There are two aspects to your project, a preamp and the audio-to-MIDI conversion. I'd recommend developing them separately. You can built & test the preamp using a line-in (Aux or Tape) on your stereo system, your soundcard (if you have a desktop with line-in), or on your TV if it has audio inputs. You can build & test the audio-to-MIDI conversion with a solo flute CD, or with a flute recording on your computer (using line-out or headphone-put into the Arduino).

:( The information on the barcus-berry website is not clear... It says "electret", and it also says piezo. Either way, it won't interface properly with a normal "pro" preamp (which will have a low-impedance balanced input with XLR connectors and optional 48V phantom power).

Piezo pickups can put-out fairly high voltage into a high impedance amp/preamp. I believe you can plug a piezo pickup for an acoustic guitar into a regular guitar amplifier.

The Arduino has very-high input impedance, so it won't drag-down the signal. With a piezo pickup, you might get enough signal into the Arduino... Maybe 100mV, maybe more... Or, maybe you'll need a preamp. A "direct box" (AKA DI box) for a guitar should work. They make DI boxes with line-outputs, and the mank DI boxes with XLR mic-level outputs for connection to a mic peamp or mixer.

Electret mics require a power supply. Sometimes they work from a 1.5V battery. The 5V power for "computer microphones" is supplied by the microphone input on a regular soundcard. Since eletret condensers are either designed to be plugged-into a soundcard, or they are desinged to pbe plugged into a preamp/mixer have an internal battery, I don't think you can buy a preamp that provides power to an electret condenser, but you can find schematics on the Net. (Regular 48V phantom power for a "studio condenser" might fry an electret.)

  • The Arduino analog-to-digital converter accepts 0-5VDC. So for audio (which is AC), you need to bias the input (typically at 2.5V). Feeding negative voltages (such as the negative half of an audio waveform) into the Arduino can damage it. Plus, for what you are doing you need to "cleanly" read the whole AC waveform.

How is audio-to-MIDI conversion done? What exactly does it convert the audio to?

Pete

probably not very well. Luckily a flute is a pretty pure tone - it has few harmonics. You would need to FFT the signal and send a MIDI Note-On message with that particular note, you would keep doing FFT's and when the note ends, send a Note-Off message.

Since a flute is so pure you might be able to square up the signal and determine the period/frequency, but I don't know if you would have good enough resolution to separate signals 2^(1/12) apart.

Thank you ALL very much for your replies!

my ultimate goal is to turn my flute into some sort of wind controller in order to be able to play any digital sintheziser o tone generator through my flute.

I want to use the flute pick-up only to preserve the flute's timbre and spectre, not to amplify it or reproduce it, but i want this signal to work as a sound trigger.

On the other hand i want to implement pressure sensors on the keys and program every position for each note respectively.

Does this make any logic at all? I hope I'm not wasting your time...

Thank you very much!

I want to use the flute pick-up only to preserve the flute's timbre and spectre, not to amplify it

You have no choice in this, the pickup need to be amplified. The timbre will not be preserved in the MIDI conversion.

This has proved to be almost imposable to do even though professional designers have worked on it for decades. The problem is that the harmonics of the flute and many other instruments change with time and the fundamental is not always the largest harmonic during the duration of a note.

I see...

but as I said earlier, the notes would be determined by the flute keys using pressure sensors, not by the microphone itself.

I understand it's impossible to convert the pick-up signal into MIDI, but could that signal at least function as some sort of trigger every time it captures air flow?

Thank you all very much once again, i really appreciate your time.

but as I said earlier, the notes would be determined by the flute keys using pressure sensors, not by the microphone itself.

I don't know if you play the flute but the note is not just determined by the keys that are held down but also the way you blow. You can get octave shifts by blowing differently.

but could that signal at least function as some sort of trigger every time it captures air flow?

Yes that is quite simple, you need a peak detector on the output of the amplifier before you pass it into the arduino. http://en.wikipedia.org/wiki/Precision_rectifier

I've been playing flute for the last 20 years of my life.

I contemplated the fact that keys woudn't be enough, you're right pitch does change with air pressure in some notes that share the same positions, but that's why i wanted to incorporate the flute pick-up in order to use that signal to trigger sound and in a way detect octave changes . You think a peak detector would be able to interpret that as well?

Thank you very much for the tip man!

You think a peak detector would be able to interpret that as well?

No sorry.

The octave information is the most difficult to extract from an audio signal. That is one of the things that makes sound to MIDI so dam difficult. It can get it right about 95% of the time and then throws in an octave shift.

It is something you will have to experiment with, this might help:- http://musicalnoterecognition.blogspot.com/

I'll be sure to do that!

Thank You very much Mike!