An 8 channel input/output soundcard combined with two analog filters, all controlled with a raspberry pi. Standalone synth and surround sound mixer, when outputs are configured as specific speakers, input channels (and internal sounds) can be placed around a virtual space of the speakers. The two filters are separated to allow for maximum flexibility, the synth can be configured to use two channels for filter output and two input to return the sound into the system.
This is the first prototype, the filters are "borrowed" with great thanks and credits to Mutable instruments and their shruti synth. I had to add specific caps to filter out arduino's PWM to a audiably not noticable noise. The arduino is missing in the pictures:) Additionally i decided to add the 7" touch screen on the top, leave that to v2. And the power will have better integration as everything is on 12V anyway.
The soundcard used is the behringer uphoria UMC1820.
This is the current integration state: - physically connected on a plywood slate, the same material the case will be made of - power is all wired up, with a new 12v to 5v BEC powering the raspberry, arduino and its usb connected devices (1,5A sustained). - I had to up the voltage to the arduino to 5v to supply enough voltage to the analog modules. As the raspberryPi is a 3v3 device, i unhooked the TX pin of the arduino, as i'm not receiving data from the arduino anyway and it contains the 5v voltage that would hurt the Pi. 3v3 is enough for the arduino to receive the data from the raspberry.
I also had to up the serial speed to 115200 to have a fast enough response from getting the midi command, to transmiting it to the arduino and getting the voltage changed.
It works but stops working after a while. Serial is such a mysterious pain in the butt, I'm going to have to research it a bit more:)
The soundcard just plays a loop but it's the actual npSynth software running it.
In this episode i discuss the platform and software used in the npSynth.
The hardware platform is the RaspberryPi but the software is made in a way that supports most platforms that the linux kernel can work on.
For full control of the system I am using my npStarter custom init system, which allows for greater control and flexibility in running only the things i really need and allowing a read-only system partition to protect from corruption because of sudden power loss.
So this init system runs the most important app, the npSynth C++ app.For audio I am using jack and i intend to support any soundcard linux does, focusing on the CM6206 codec based soundcards and the huuuge behringer 1820, whose 2 of 10 outputs i want to redirect to the analog modules so i can have a AUX bus with filters and send any sound through them. BTW the CM6206 codec card I have sounds horrid even compared to my notebook phones out, beware:) It is fully 7.1, though.
Here is an overview of the platform so you can get a feel for how it comes together.
Further integration for my npSynth, the raspberrypi is now talking to the arduino which sends out PWM signals smoothed (or smothered;) to DC to the analog modules.
I also found out that the 7805 regulator i use to convert the 12v input to 5v to power the PI is VERY inefficient (supposedly 50% of the power goes to heat!) and gets very hot for even the 500mA needed. I already found a more efficient switching regulator which i will use.
As a shameless plug i had one of our data loggers equipped with a KType probe so i could monitor the regulator temperature. It was probably below the 125 the 7805 is rated for but far too high to be used. The switching one is supposedly a lot better.
I needed the 12V so i can have only one power adapter as the analog filter boards take 12V as input.
Next time I'll go over the software parts a bit, how they work together on the raspberrypi.
Still thinking about how to integrate it physically, though:)
And even more important, will there even be a touchscreen, or will it all be controlled via websocket on your phone/ipad/40" tv:) ?
The brains of the project is the immensely powerful RaspberryPi, but for interfacing I like to use the Arduino Pro mini, a very flexible MicroController with many I/O lines which i connect to the Raspberry via the serial interface. For this you have to disable the default configuration of using the raspberry pi serial port as a login option.
But the first time i tried it, the auditory results were horrible! The PWM frequency was obviously too low and fell into the auditory frequency spectrum (since the shruti also uses an ATMEL chip i hoped the smoothing was done on the filter board... nope:).
So to convert the jagged square wave the PWM generates I used a simple RC filter to only leave a nice DC voltage.
The RC filter is a combination of a resistor and a capacitor, which cuts of higher frequencies. You can use an online calculator to find the R and C values you need.
To use the smallest capacitors possible I also increased the PWM frequency to its highest value. The arduino pro mini has 6 PWM outputs, two per timer. Although changing the frequency of the first timer disrupts delay() and millis() functions i used it nonetheless because i have no need for timing in this program.
Here is a nice cheat sheet describing the modes of the PWM outputs and how to set the timer divisors to get the highest frequencies.
Starting on the redesign of the instrument. The integration with the huge soundcard was not viable and there would be (audio) cables connecting them anyway, so I decided to just integrate the filters and the raspberry together.
I also added a touchscreen and i'm still deciding what buttons, sliders and knobs to use.
Will focus on the main functionality first, audio routing, spatialisation and analogue filter control, using external midi controllers for key/knob input.
Here are some of the examples of hookuppable controllers. Yes even a joystick:>
Now let's get coding:) I will use JACK as the sound driver, the wonderful linux stack will take care of the drivers for all connected soundcards and my own C++ based synth/router/mixer.