Content of this Page

Mephisto is an open source device that can be used to control any OSC compatible program, system, etc. Up to five sensors can be connected to it and configured in a JAVA application to control the parameters of you favorite effect and synths. As an open source project, a tutorial on how to build your own Mephisto is provided on this page.

From the FaustBox to Mephisto

One year ago, I started to think about designing a device that would be called the "FaustBox". The idea behind it was to create an easily customizable stomp box that would run Faust based effects and synthesizers. Indeed, in my opinion, a rather common problem with programming languages for signal processing is that scientist (and hobbyist too) use them to design new synthesis and sound processing techniques that are then very rarely used by musicians because of the complexity of their design. I think, there is a gap between musicians and designers of open source signal processors and one of the goal of the Faust box was to fill this gap.

The Faust Online Compiler has an interactive catalog of Faust objects where users can add new elements to share their works. I thought this could be the perfect platform to create this link between musicians and engineers.

The most straight forward way to design an open source "FaustBox" would have been to use an embedded Linux board such as a Raspberry Pi that only costs about $30! However, I didn't really like the fact to have a whole Linux distribution running to carry out a task that normally requires less elements. To me, the booting time was also going to be an issue for impatient users.

For all these reasons, I decided to opt for a more portable solution: using a smartphone to carry out the signal processing part of the "FaustBox". Indeed, most of the recent smartphones are more powerful than a raspberry pi and many people already own one.

While there already existed a faust2ios program that could turn a Faust object into an iPhone app, there was no such a thing for Android. Moreover, before an app can be installed on an iPhone or an iPad, it has to be approved by the apple store making the use of the Faust online compiler complicated to share Faust generated apps between developers and users.

Thus, the first step of the FaustBox project was to create faust2android, a program that would enable to turn a Faust code into an Android app. Faust2android is now working pretty well and can be used through the Faust Online Compiler.

One of the features I wanted the FaustBox to have was to provide an interactive control of the different parameters of an effect or a synthesizer to the user. While smartphones offer simple controllers such as touch screens and accelerometers, it remains rather hard to use these elements in the context of a live performance with a traditional instrument. That's where Mephisto comes into action.

In Goethe's Faust, Mephistopheles is the devil whose trying to corrupt/pervert Doctor Faust. In our case, Mephisto is an open source device based on an Arduino that can take up to five different sensors as an input, digitize their output signal and stream them on a WIFI network as OSC messages. As faust2android is OSC compatible, Mephisto can be used to control (corrupt and pervert?) a Faust object running on an Android device. Of course, Mephisto also works with any OSC compatible program and system.

Building Mephisto

This tutorial briefly describes how to build your own Mephisto from scratch. This shouldn't take you more than two days.

What You Need

Parts List

Printing the Case


Screenshots of the Blender file (main.blend) of the Mephisto enclosure.

As we wanted Mephisto to be fully OpenSource, its case has been designed with Blender which is an open source program for 3D design. Blender works on Linux, Mac OSX and Windows and can be downloaded for free. The blender files of Mephisto's case are available here. They can be easily modified making it possible to customize your Mephisto. If you just want to print the case, you can directly use the provided .stl files. If you don't have access to a 3D printer, you can have the Mephisto enclosure printed at places like Ponoko, etc.

Mephisto's case is made of seven parts: six faces as well as an inner piece to hold the screen and the navigation buttons. Before you start printing, make sure that the scale is right as it can vary between printers. Mephisto should be 11.9x7.9x4.2 cm. None of the elements of the enclosure should need support material. You might have to adjust the orientation of some of them in Blender or directly in the slicer if it allows it. An infill of 12% should be enough to have a strong case.

Putting Things Together

The first thing you need to do is to put the 4-40 nuts in their housing on the bottom top plates.

You can then insert the "rocker" power switch in face 0:

You might want to add a little bit of glue around it to hold it better. Theoritically, the switch linked in the parts list should have the right dimensions but you might want to make sure that it is not too big or too small.

Next, you can mount the Arduino and its WIFI shield on the bottom face of the enclosure using the 3 6" 6-32 screws. If you can't find 6" 6-32 screws, you can buy longer ones and cut them with a metal saw to the right length.

The screws should have just the right size to get through the holes on the Arduino so you might need to use a screw driver to get them through.

Next, glue the audio jacks to the bottom plate in their housing. As for the power switch, make sure that they have the right size to fit in there. If it is not the case, you might have to adjust the blender file and reprint the bottom plate.

You can now install the plastic feet on the other side of the bottom plate:

Now, it is time to wire up the LCD screen. Only ten of the sixteen pins are used. You need two ribbon cables of approximately 4" for that: one with six pins and one with four pins. The six pins cable should be connected on pins 14, 13, 12, 11, 6 and 4 of the LCD screen and the fours pins cable on pins 5, 3, 2 and 1 (see the figure below). The other end of the four pins cable will be soldered to the navigation buttons perf board so it can remain unconnected for now.

The six ribbon pins cable will be connected to the Arduino so its other end needs to be prepared for that and must end with solid wires. The nicest way I found to do it was to use crimps and to put heat shrink around them:

The following diagram shows how the different electronic components of Mephisto are connected together:

The next steps briefly describe how to implement this simple circuit.

Sensors are connected to Mephisto using audio 1/8" stereo Jack plugs. These have three pins that are used the following way for each sensor:

Therefore, the audio jack inputs that you previously glued on the bottom face of Mephisto should be wired as such:

The ground and power cables should be about 4" long and will be connected later to the navigation button perf board. The sensors output pins are connected to analog inputs 0 to 4 on the Arduino. Don't forget to bring the ground and the power to each Jack inputs!

The trimpot to control the LCD screen brightness can now be glued in its housing on face 2 of the Mephisto enclosure:

You must solder a wire of about 4" on each pin as shown above. They will be connected to the navigation button perf board later.

Face 2 can now be attached to the bottom face using two of the 4-40 screws:

A short solid wire that will connect to the Vin pin of the Arduino can be soldered to one of the pin of the power button that was glued on face 0. The red wire of the battery snap connector can be soldered to the other pin of the power button. A solid wire extension can be added to the black wire. It will be connected to one of the two ground pins of the Arduino:

The navigation buttons just acts as a simple voltage divider and are connected to one of the analog input of the Arduino (see the circuit diagram above). Basically a different voltage is outputted by the system in function of the button being pressed and the Arduino firmware takes care of assigning a voltage to an event.

The navigation buttons are soldered on a perf board of dimension 17x11 holes and must be placed as follows on it:

The resistors of the voltage divider can be found in the back of the board and should be connected as such:

All right, now it's time to put everything together. First, mount the LCD screen on the inner element of the mephisto enclosure (topFBapp) using the four 2-56 screws and nuts. Then solder all the wires to the the perf board and make the connections to the Arduino following the informations given in the circuit diagram.

Now, pack things together and mount the LCD screen on the 6-32 screws coming from the bottom face and attach face 0 to it. Make sure that that the battery snap connector is at the right place in your Mephisto.

Finally, attach face 1 and 3 and the bottom face using the remaining screws and close the enclosure by adding the top face.

Uploading the Firmware

In order to work, a custom firmware must be uploaded in Mephisto's Arduino. A simple JAVA program that can be used to configure Mephisto has been created for that and can be downloaded here. Before you try to run it, don't forget to read the README: there are a few dependencies that need to be installed.

Once the JAVA interface is up and running, plug Mephisto to your computer. For now, the default parameters should be enough to give it a first try so press the "upload" button. If everything went well, your Mephisto should be ready to use! Once again, if you encountered any problem during one of the previous step, don't hesitate to e-mail me.

Preparing the sensors

As it was said before, all the sensors compatible with an Arduino can be connected to Mephisto. Most sensors have only one output, in this case they can be connected to a male 1/8" jack audio plug using this mapping. For example, a trim pot could be prepared this way to be connected to Mephisto:

While the output of some components like a trim pot shouldn't have to be electronically normalized, it might be good in some cases to scale the signal created by some sensors. In the JAVA interface, "Knob" basically corresponds to "no computed scaling" so if you don't know what the range of a sensor is, you can test it using this mode. For sensors with more outputs such as an accelerometer, you can use several jacks.

Using Mephisto

Mephisto is very easy to use. Any sensor can be plugged to any of the Jack inputs and it can connect to any network very easily. By default, Mephisto assumes that the range of the sensors your using has been electronically normalized. However, in most cases, you'll probably have to configure Mephisto with its JAVA interface program before you can use it effectively. This topic will be treated later in this chapter, first let's try to run Mephisto for the first time!

To begin with, plug a trim pot into the first Jack input of Mephisto. Sensors have to be plugged in before you start it. Then, turn on Mephisto using the power switch. The screen should display: "Std. params?". At this point, Mephisto is asking you if you want to connect to the network preconfigured with the JAVA interface. For now, we want to scan the available networks and choose one of them. With this technique, Mephisto will only be able to connect to open networks. If you wish to connect to a network protected by a password (WEP), you'll have to configure this in the JAVA interface (it would be too long to enter the password by end with the navigation buttons). To start the scanning answer "no" to the question by pressing the left button.

Once the scan is completed, you can browse the network list using the up and down buttons. To chose one of them, use the central select button. Mephisto will now connect to the selected network, this can take up to 30s sometimes. After that, you need to enter the IP address of the host that will receive the OSC messages on the network. By default, it should be 192.168.0.1. Use the up and down button to increase or decrease the value of the current number and the left and right buttons to navigate between elements of the address. Press the central button when you're done. After that, Mephisto should be sending OSC messages to the default OSC addresses.

For most cases, you probably want to be able to configure more precisely Mephisto. For that, you can use the JAVA interface to select which sensor is used on which Jack input and the range of the OSC messages it will create. You can also pre-configure the network to which Mephisto will connect and even provide a password for protected networks. Finally, the update rate parameter is the time interval in ms between each OSC message.

The sensors in the sensor list are the following and can be ordered on Sparkfun:

If you want to add more sensors to the sensor list or modify their range, shoot me an e-mail and I'll explain you how to do it: it is very easy.