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

Advertisements

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).

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.

My impressions about the iOS and music apps

Music, Synthesizers

During the past weeks my brain has been suffering a transformation due to the use of my new iPod (yes, I’m exaggerating).

The first thing that I did It was to configure my emails. And now easier than ever I can check all mi accounts in less than 20 seconds. Before I used to spent at least 7 minutes waiting for the laptop to start just to check my once my email. Now I check my email a few dozen times a day… I even read the spam…

Advantages and disadvantages… actually It was very cool that I didn’t had to carry my netbook during my last trip because I could check emails, maps, and touristic information in the iPod.

The frustration

Since I’m a developer there are many ideas that I have of possible apps that I could create. The bad thing is that I just can’t. First I don’t have a mac, therefore I cannot use the development tools 😦 … and even when I have a mac, I need to pay 100 bucks (a year) if I want to transfer my app to my iPod.

Until I get the money for that, I just can consume but not create.

My opinion on (a few) music apps

The first App that I downloaded was Rebirth (before Figure was out). I got it because Propellerheads makes Reason that is a great and easy to use program. I could say that using Rebirth in the iPod was a little bit disappointing. Since it was an a adaptation of the PC version, it was hard to use in a small touch screen.

Then I got iKaossilator from Korg

I really like this app. It is very easy to use and fun. Since it is like drawing, you can let your subconscious mind trace the music patterns.

I hope they upgrade the application by letting us add our own instruments… and a grid would be useful too.

The next application in  my list is Thumbjam.

This app sounds great and it is very easy to create expressive  parts. It has so many features that I haven’t explored all of them. Maybe the menus are not well designed but it is a great app. I specially like the sound of the acoustic instruments.

One of the apps that I use more often is iMaschine

This app has a very good balance among, features, sound and simplicity. Today this is my favorite (lets see how Figure evolves).

There are other apps that I like a lot, specially when using a MIDI input like iRig MIDI or Line6 MIDI Mobilizer. Animoo and Alchemy Mobile have very cool sounds and I specially like the way yo can manipulate the sound thanks to the touch screen. I use these apps more as instruments, but it would be great if I could assign the knobs of my MIDI controller to tweak parameters.

Amplitube is a nice app, the sound is good taking into consideration that it is using the iPod to simulate the effects, amp, cabinet and microphone. However it has one disadvantage for me… if I have my guitar I also have my POD HD300 that sounds by far better. I never travel carrying mi guitar, therefore I almost never use it.

 The full music studio in an iPod

There are very nice apps like Garageband, FL Studio Mobile, Nano Studio and Energy XT. These apps have very cool features, however, I think that the iPod/iPhone is too small and sometimes it feels slow for the task. I guess that in the new iPad these apps have more sense…

Maybe it just needs a little bit of help… things like the MPC Fly for the iPad seem very promising…

We just need to wait a few months to see the revolution.