Thursday, September 13, 2012

Midi Controller: Phase 3

Just wanted to put down my thoughts on the hardware and stuff on the midi controller. It is my hope and long term goal to put up this project as open source so others with better knowledge of hardware and software can improve upon it.

So this is what I've got after thinking about this project on and off. I'm actually thinking about AI at the moment but oh, look, cheese!

Cough.

First, is input. Previously I used the Arduino's ADC to read in the values directly without any anti-aliasing filter. Well, phase 3 will add that, as well as using the designed-for-microprocessor MPX5010GSX.

Signal Acquisition Hardware:
MPX5010GSX Pressure Sensor
MAX7410 Low Pass Filter IC. (alt: MAX295CPA)
Teensy 2.0

Other inputs:
3x Switches or Potentiometers

The pressure sensor hopefully will work as before, without the necessary amplification components. For the anti aliasing filter before the ADC, the MAX7410 looks like a good candidate.

At the moment, I'm planning on sending perhaps 25, 30 midi CC packets per second tops, so, we need at least 60Hz to fulfill the nyquist limit. Add in perhaps double, or 4 times oversampling, it will be still under a few hundred Hz.

The MAX741X series comes in either Bessel or Butterworth type filters. I'm going with the butterworth bessel for its linear phase.

The max7410 seems provide a variable bandwidth from 1Hz all the way to 15Khz, and only seems to required a capacitor to tune its cutoff frequency. That, or I can use one of the DIY filter algorithms to figure out some capacitors, resistors and inductors to chain together.


The Teensy is described before, it was chosen because of its (theoretically) ease of programmability into a HID controller, so we can just plug it in, and modern OSes will recognize it as a midi device, without using a real midi input device as before.

Finally, I think a few external controls will be good. First, variable breath pressure input. The previous version was fixed to a given level, so you would need to blow a certain amount to reach the full midi value. I think not everyone has the same breath force as I do (I probably have very little, given I tend to keel over when playing the flute), so a potentiometer to vary it between low and high pressure would help here.

Next, linearity.  Just putting the values through a power function, and yet another potentiometer to adjust between linear to various non-linear ways (duh).

Finally, perhaps a 3rd input to control how much digital filtering is going on. We could set it to low, to use minimal filtering (large bias), or have the output curves be smoother (low bias for input data). Who knows. There have been some thoughts at the back of my head to only output midi data when there is a significant delta between subsequent samples, else it does nothing. Mrrr.

No comments: