My visit to the MIDI HACK

Electronics, Music, Synthesizers

Last May 17-18 I attended to the MIDI HACK, which is by far the coolest Hackathon out there (IMO). Is not that I have been in others, but this one matched perfectly the kind of hacks that I like to make.

I had a great time surrounded by people with the same obsessions as me: music, electronics and computers. The event was great, it had nice food, a lot of drinks, coffee and the most important thing: the aura.

At the beginning I had no idea what I was going to build. So I spend the first three hours moving ideas in my brain and trying to come up with something feasible and not repeated. After looking at my bag I decided to do something that I wanted to do two years back…

I had in my bag a Monotron, a Meeblip and some Arduinos. So I decided to put them together and add some extra sauce by connecting a Raspberry Pi to handle OSC messages.

After some hours I decided to drop the Raspberry Pi because I couldn’t connect it to the Spotify’s  WIFI but it works fine otherwise.

 

This is a picture of the project:

Monobleep/Meblitron

 

And this is a more detailed diagram of the connections.

Diagram

So, The RPi runs Node.js and connects to the Arduinos by using the Arduino Firmata. One of the Arduinos sends CV signals to the Monotron in order to control the gate, pitch and cutoff. The second Arduino connects to a custom-made board containing knobs, buttons and LEDs.

The Meeblip is connected by using a standard USB to MIDI converter. The audio of the Meeblip is fed into the Monotron and it uses a potentiometer to control the amount of audio.

The custom controller is used to adjust a few of the parameters of the Meeblip.

Here you can find the code that runs in the RPi.

https://github.com/modlfo/monobleep-meeblitron

And here is the entry to the hackathon http://www.hackathon.io/29648

MicroBruto: a Max For Live simplesizer

Create, Music, Synthesizers

I have been watching demos and reviews of the Arturia MicroBrute and it seems like a very interesting synthesizer. It’s analog, cheap and flexible. But before even thinking about getting one, I wanted to “experience” the user interface. That’s why I decided to make the MicroBruto. ‘Bruto’ in Spanish can be translated as gross or stupid, but I have to clarify that the name does not reflects my option about the synthesizer. I just thought it was funny.

 

Arturia MicroBrute

Arturia MicroBrute

The MicroBruto

The MicroBruto is not an emulation, is just a digital synthesizer with controllers inspired by the MicroBrute. I tried to imitate the functions of the oscillator, the envelope, filter, LFO and most important: the modulation matrix.

Here you can see a screenshot:

MicroBruto

MicroBruto

The beauty of this synthesizer is that is does not need a manual. That’s why it is a Simplesizer.

You can get the device from the maxforlive.com page. HERE

HMH Mixer

Create, Projects, Synthesizers

This is an educational project I made to get a better understanding on mixing sound. Mixing is all about hearing but it’s always ok to  get a little help from the eyes; that’s the place of spectrum analyzers.  When mixing two sounds we have to be careful on how they interact with  each other in frequency domain. A bad mix may have moments in which certain frequencies get to loud or where one sound shadows the presence of other.

Being capable of detecting (and fixing) those problems of a mix requires training and talent. Since I don’t have to much training yet (lets not talk about the talent) I made this program to help me hear. The HMH (Help-Me-Hear) Mixer provides features that can help you in times of doubt. This is a screenshot of the interface:

HMHMix

The HMH Mixer was inspired by the youtube tutorial of dude837: Pfft~ is your friend where he explains the use of the pfft~ object in Max.

The program has can load two audio files (A and B). Use the “Open” button to load your files, and select “Loop” if you want your files to repeat when they end. With the level you can control the volume.

HMHMix_ChannelsWhen playing the files you can see a spectrogram of both files where the “x” axis is the frequency and “y” is the time.

HMHMix SpectrumBelow the spectograms we have a filter that is applied to channel B only. Later I will explain the purpose of this filter.

HMHMix Filter

At the bottom we have the master section where we can start reproducing the sounds and see the spectrogram of the mixed signals.

HMHMix FMaster

The master signal has 4 different play modes:

A+B Mix

This mode mixes the A and B sounds. What you hear is simply the sum of the sounds.

Overlap

In this mode the magic starts happening. This mode is controlled by the “Threshold” slider. Set it as low as possible and increase it gradually. As you increase it you will hear only the frequencies that the two sounds have in common. The first frequencies that are heard are the ones that once overlapped are above the threshold. These frequencies are the ones that overlap and have a high volume. If you play a kick drum and a bass, you will hear how they interfere specially in the low end. This is what we have to prevent when mixing.

Using the spectrogram we can determine if there are specific moments in which the overlap is higher.

B Auto

This mode uses the amplitude of the frequencies that overlap and applies a reduction (filtering) of the signal B. This acts as a frequency compressor. The reduction is controlled by the “Reduction” slider, the higher it is the more that the overlapped frequencies are taken from the B signal.

This is interesting because you can hear how the signal B need to filtered in order to reduce the overlapped frequencies.

A+B Auto

In this mode you can hear the signal of “B Auto” mixed with the channel A. This would be a kind of “very good blend” of the two sounds. The xix is not perfect, but listening to this will give you an idea of how it should sound if the common frequencies do not affect too much.

As I mentioned before, you can achieve this results by using a side-chained  frequency compressor. But I think that those kind of plugins would consume a lot of processing power in a DAW (correct me if I’m wrong). I would like to fix the mix problem by using the tools that are already available in my DAW, that are basically compressors and equalizers. That’s the purpose of the Filter in the B channel. I play with the filter in order to reduce the offending frequencies in channel B and reduce the overlapping. So once I have a decent sound using only the filter, I copy the setting of the filter to my DAW.

Feel free to play with the program and let me know if you have any suggestions.

Download

You can download the main Max patch HERE.

For Windows users. You can download an executable HERE

Making an extension board “Extendra”

Electronics, Synthesizers

The problem was very simple: adding more I/O to any of my boards (XMOS, Arduino, ChipKit, etc.) And the solution could have been simple as well: buying a board to do that, like a cheap Arduino clone or any other alternative that I don’t know.

But this time I decided to do the hard (and fun) way. I designed my own board.

I have made other PCB’s before, mostly etched and milled boards, but I never made a manufactured PCB. I decided to do it this way because I found that SeeedStudio sells very affordable PCB’s. So I started reading an Eagle tutorial (I used Altium at the University) and I found very little intuitive. Anyway, there’s a lot information about it and in a few hours I got my design and ordered the PCB.

I made a few mistakes, for example not labeling all the components and connectors. But electrically was correct.

I decided to use a PIC microcontroller the PIC16F1516. Why? because it has many analog inputs, low speed and cheap. However I found a few problems. I wanted to make an SPI Daisy chain, but seems that the PIC produces an interrupt every time a new byte is received and not when the chip is deselected (using the CS pin). The second problem is that the C compiler that Microchip provides for free practically performs no optimization. So if you check the generated assembly code it hurts your eyes. For any future project I will use AVR because they have free tools that are much better.

Apart from that, the board works correctly. I made two versions, one that is configurable using basic command like a Firmata board and other that makes a faster dump of values.

Extendra boards

Extendra boards

Here you can find the code here https://github.com/modlfo/extendra

The next step is connecting it…

My editor for the Meeblip

Projects, Synthesizers

Some time ago I got a Meeblip Micro http://meeblip.com/

Since I got the Micro version, I does not have any controls. However it is possible to control it via MIDI. I made a simple editor using Max 6 and you can get it here:

https://dl.dropboxusercontent.com/u/26650040/meeblip.maxpat

This is a screen shot:

Image

You can use it by installing the Max 6 Runtime (that is free).

The marketing of shiny things

Absurd, Art, Synthesizers

This week I saw on http://www.synthtopia.com/ the following video (that amazingly it has more than 3 million views):

If you don’t want to check it all I’ll give you a small summary. The video presents a new software for making music, in which the marketing was made by professionals that do not have a clue about the music software market. I said professionals because it seems that they are doing a correct campaign. However I think is not really effective.

In that video these guys present a simple and affordable solution that will help you make good music. They claim that is so easy that you don’t need to study music theory, learn complicated stuff o buy expensive gear… and the weirdest thing is that they say that your friends will envy you…

Guys of Dr. Drum, I have to tell you that when I buy software or hardware I search exactly for the opposite.

I don’t like shiny things,  I like it dirty.

We love complex stuff, we love learning.

That’s one of my principles. That’s what I pray every morning.

Music software and hardware is complex by nature. It’s mysterious and intriguing, but is friendly. Even the simplest machine plays an important role. For example this AB Switch pedal.

It’s function is to route the guitar signal to two different destinations. It’s easy to use and it allows doing amazing stuff.

When I see one of these images I start drooling…

These images are pure beauty.. these are machines of controlled chaos…

I think that all the music is chaotic, and harmony it’s just a piece of it that our senses got used to.

The perfect balance

Ernst Nathorst-Böös nailed it with Reason. In this talk he mentions the key point of a music software.  The software needs to be simple but still having a level of complexity.

We need to feel that every song, every sound we make is our own sound.

Even if my songs are crap they are still my crap and I’m happy. That’s why I can spend long hours preparing a sound.

In the chaos I can let myself go…

BTW. The Reason screenshot is one of my songs.

Developing Pure data externals in Visual Studio

Create, Music, Synthesizers

Some weeks ago I started learning Pure Data. I have known it for a long  time but I never used it since I made my music in other tools.

During the years I have seen amazing stuff  made using PD.  You can create 3D graphics, connect it with Arduino,  using OSC protocol and many more thing.

Connecting blocks with PD is very easy and the combination of text and wires makes it very effective. For example if you want to make a simple block that adds a constant to a signal you just need to type “+ 2″… amazing isn’t it?

In my case, PD is great to prototype and test algorithms, and the fact that you can create your own blocks using C language is great.

I was checking the developer documentation and the tutorials to create extensions. This one was very useful to understand how  the things work.

HOWTO write an External for puredata

However this document is platform independent  and I wasn’t sure what I needed to create and extension using Visual Studio. For that reason I made this small tutorial.

Compiling the hello world example.

The “HOWTO write an External for puredata”  contains the following code:

helloworld.c


#include "m_pd.h"

static t_class *helloworld_class;

typedef struct _helloworld {
 t_object x_obj;
} t_helloworld;

void helloworld_bang(t_helloworld *x)
{
 post("Hello world !!");
}

void *helloworld_new(void)
{
 t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);

return (void *)x;
}

void helloworld_setup(void) {
 helloworld_class = class_new(gensym("helloworld"),
 (t_newmethod)helloworld_new,
 0, sizeof(t_helloworld),
 CLASS_DEFAULT, 0);
 class_addbang(helloworld_class, helloworld_bang);
}

Just put the code in a file named “helloword.c”.

In order to simplify the project creation I used CMake. Download the latest version and install it. Note: I have added the path to the binaries to the PATH variable.

You need to create the following two files.

helloworld.def


LIBRARY helloworld
EXPORTS helloworld_setup

This file is to let know the compiler that we are exporting the symbol “helloworld_setup”. The following file is the cmake project file. This one is going to make most of the magic.

CMakeList.txt


project(helloworld)

add_definitions(-DMSW)

set(SRC helloworld.c)

include_directories("C:/Program Files (x86)/pd/include")
link_directories("C:/Program Files (x86)/pd/bin")

add_library(helloworld SHARED ${SRC} helloworld.def)

target_link_libraries (helloworld pd)

Generating the project files

CMake files are very simple to understand, you define the sources (line 5), you add the includes and libraries directories (lines 7 and 8). The includes and the libraries are located in the folder of your PD-extended installation.  In line 10 we define that we are creating a shared library using the sources in variable SRC  and we also supply the helloworld.def file.

The new step is to open the command line. Note: you need to able of calling the compiler (cl.exe) from the command line. For that reason I use the shortcut included in the Visual Studio tools menu.

Once in the command line, go to the path where you have the files located and run the following command to generate the project files for Visual Studio 2010:  cmake ./ -G “Visual Studio 10″.  This will generate all the project files you need.

If you have problems following these steps, you can also refer to the cmake tutorial in HERE

Compiling and debugging your extension

Compiling is straight forward. Open the “ALLBUILD” project in visual studio and build the solution.

In order to debug you new extension you need to make it like any other DLL. You need to make PD use the DLL and attach the debugger. To use the DLL in PD you need to add the path to your debug DLL. You can find where the DLL is by looking at the project properties.

To add the path into PD go to File->Path menu and add a new entry.

After that you need to tell PD to load the DLL when it starts. In the menu File->Startup add the “helloworld” entry.

The next step is to configure the debugger. Since we are compiling a DLL we need to to configure the debugger to run PD instead. In the Properties of the helloworld project, in the debugging tab set the “Command” to the path of pd.exe and preferably the working directory to the same path.

Now just add a breakpoint, run the debugger and see it stop when you’re using your extension.

Hope this small tutorial simplify some steps for you. I’m planning to make a few more explaining other aspects.

I would love to make guitars

Nostalgia

Since I got my first acoustic guitar it has been  in my mind the idea of making my own guitar. My first guitar was a cheap but effective “Guitarra de Paracho”. It was a heavy duty guitar, I dropped it a few time to the floor, I was in the middle of the rain with it and I hit some of my friends. Paracho is the name of the town in Mexico, and it is very famous for their guitars. Here you can see a picture of the entrance to the town.

My guitar cost around 15 dollars and it was really good.

My girl has a very nice guitar as well. A Kremona made in Bulagria. I’m not sure if this is the model, but looks just like this:

If you want to get one of these in the US you need to pay at least 300 dollars… and they have some models that are reaching the 2000. If you wonder how can they be so expensive, just take a look at this video.

“Pedazos de madera, amor, esmero, celo, conocimiento y 299 horas de trabajo, concentradas en una peli­cula de algo mas de 3 minutos”.

Some time ago I though about making my own electric guitar. Therefore I started looking at books, manuals, tools and material suppliers… and my conclusion was that is not an easy hobby. First I don’t have the space neither the money to to get all the tools. The perfect situation would be to have access to one of these machines like the ones that DBZ guitars uses. Check this video, it’s amazing the way the drill creates a beautiful guitar body.

But we don’t need to get fancy, I just need to go again to IKEA and get some materials… then I would be able to build something like Seasick Steve’s hubcap guitar…

Me, the great DJ

Music

The past few weeks I have looking at DJ stuff. Since the reduction in cost of Traktor and the release of the new F1 controller, I have felt very tempted…

I cannot see those knobs and shiny colors, because I start drooling…

I think I should become a DJ… but I have mixed feelings.

I come from a place in which we believe that music is made with musical instruments… guitars, drums and maybe a keyboard. The only machines that you’re allowed to use are amplifiers and distortion pedals. But the DJ stuff has a very bad reputation.

The main reason is that any guy that is able of fading one song into another calls himself a DJ. The world is full of “song gluers”…

Is hard to quantify if these song gluers have musical talent or not.  I the past it was a challenge to combine two songs: matching the tempo, matching the pitch and effectively using  parts of different song in order to create new melody. But the guys of Native Instruments and many others have made great job simplifying the DJ workflow; anyone can mix. However, the fact simplifying the things, in the reality it makes them more complex.

Traktor is not anymore a software that only allows you fading songs. It is now a real time sequencer, an instrument that allows you to improvise and create full song from small pieces of audio.

In my opinion, the talent of a DJ lies on its capability of  creating. We just need to look at big artist like the Chemical Brothers, Daft Punk or the Prodigy.

The other predominant idea is that the talent of a DJ is the ability of connecting with the people… to make them dance and play the music that they want to listen.

In that case, I’m screwed…

One of my abilities is that I always play the music that the people does not want to listen.