Arduino Multiplexing / Pure Data Communication

I’m learning a lot of Arduino stuff right now, since I started yet another project. The objective is to create controllers that output 14-Bit MIDI (also known as [NRPN]) or OSC. Reason is mainly that MIDI pisses me off thousandfold. Why the hell are we still stuck to 7 bits when it comes to controlling musical equipment?!?
So I sat down and started designing a sort of mixer controller for use with [Pure Data] that not only controls but also get a visual feedback on sound levels in the form of LED bar graphs. I did a basic layout I will post later. For now it looks like a standard mixing console with

  • 4 channels having
  • 1 Fader
  • 9 knobs (typically 1xGain, 4xEQ, 4xAux)
  • 10 Buttons (Mute, PFL, 4xGroup, 4xPre/Post)
  • 10 LEDs to show button states
  • 1 12 LED bargraph to show audio levels

 

That is a lot of analog in and output. Considering the amount of free pins on an Arduino, this calls for some serious multiplexing, of which I did first tests in the last days.

Pure Data audio levels on a LED bar graph

I did some first tests connecting two 10LED bar graphs to 3 4093 shift registers. I played audio files in PD, using [env~] to get the dB levels on a scale from one to ten and send them to the Arduino which then conveyed them into the registers. This was a bit tricky since a register only goes to 8 and the two leftover LEDs have to be controlled with the next one. I got it running after a while, though.

Results: I tested several intervals for [env~] and settled for 8000 samples. Everything else made the display too jumpy. The dynamic of the scale is still not satisfactory. That is something that might be solved by software, but the binary output of the 4096 also limits it a lot. While it`s really cheap this way, I might be better off using a D/A converter.

I learned quite some things about serial communication and it’s parsing with the Arduino. I might write a tutorial these days…

Multiplexing analog Inputs with the 4051

To handle the above amount of sliders and potis I’ll have to do multiply it’s analog inputs. The cheapest way I found so far is to use 4051s  (8 ins) or 4067s (16 ins). I salvaged a circuit board from a broken midi keyboard of mine that had 8 sliders and 8 knobs in combination with two 4051s, so I wrote a patch that reads these 16 controllers and reports changes to PD. That worked extremely well. I will post the Arduino program and the circuit here in a while.

Tags: , , , ,

Comments are closed.