CamillaDSP with Moode – build a simple filter pipeline

This tutorial demonstrates how you can build your own filter pipeline with CamillaDSP and moOde. Building your own filter pipelines with CamillaDSP maybe can look challenging the first time, how ever in practice it isn’t that hard to do.

We will use a very basic filter; a biquad low pass filter. No intended to be very useful, but to have an easy to hear divergent sound to check the working of the filter.

Before we start

Before we can start it is very important to comply to the preconditions:

  • moOde 7.1 or higher installed (how ever 7.2 or higher is advised).
  • moOde works correctly (plays music)
  • Use a moOde music source that supports CamillaDSP (like local, network files and UPnP for example)
  • If used disable all other DSP/EQ functions of moOde.
  • Correct working CamillaDSP chain (test with the default flat config)

Especially validation that the default supplied CamillaDSP config ‘flat’ is working is important to make sure before our ‘experiment’ start our system in ok.

If not sure how to do this see my CamillaDSP and moOde.

Steps of creating a new configuration

In basic creating a CamillaDSP config be can summarized as:

  • Create new configuration
  • Create filters
  • Add the filters to a pipeline (at least one pipeline per channel)
  • Activate the changed configuration

We walk through all this steps.

What will we create

The image below show the configurations we will create:

It contains:

  • A two channel input (= capture device).
  • A two channel mixer.
  • A low pass filter called lp applied two both channels.
  • A two channel output (= playback device)

The mixer is used:

  • If need to prevent clipped of the signal.
  • To normalize the level against my other filter configurations.

Opening the moOde CamillaDSP configuration page

  • Open from the moOde menu (Yes the M in the right upper corner)
  • And select configure
  • Pick from the qucik menu the CamillaDSP option.

The dialog that opens up is the moOde CamillaDSP configuration page. Not to be confused with the pipeline editor from CamillaDSP it self, which is also supplied with moOde. The pipeline editor is lateron needed to edit the configuration it self.

Creating a new configuration file

If you have tested the flat config from the moOde CamillaDSP config, we already have working config so we don’t have to start from scratch.

Let’s copy that configuration:

  • In the pipeline configuration section select the flat configuration from the list.
  • Next press copy
  • Provide a name for the new configuration.

Great we have now a new configuration. By creating the configuration file in this way, moOde will arange the following things for you:

  1. It will setup the correct input device for CamillaDSP
  2. It will setup the correct the output device CamillaDSP.
  3. It will have already an default mixer

By the way if you upload an already created CamillaDSP config, moOde will also update the config to use the correct capture and playback device.

Before we can actually use it, we nee to activate it:

  • Select the configuration lowpass from the list on top of the screen.
  • Press save

Before we proceed further this is a good to starting point to play some music. If you have music playing, the changes we will make hereafter will be direct audible.

Start CamillaDSP pipeline editor

  • Go to the botton of the screen.
  • If not already active toggle the pipeline editor status to ON. ( After a moOde restart it will turned off again).
  • Press the open button .

The web paged opened is the very nice pipeline configuration editor supplied by the CamillaDSP project it self, called camillagui.

Because moOde already arranged the correct basic configuration we can directly continue.

Create a filter

  • Press on the Filters tab
  • Press on the green plus

A new filter configuration box appears. If everything went well there is already default a Biquad Lowpass filter selected like below.

The only left to do is set the correct by:

  • Click on the name field
  • Provide a new name. In this case we will use just ‘lp’

If this filter isn’t present (or you want to select a different filter) use first the type selector to select Biquad filter.

Available filter types

Next the subtype can be selected:

Available Biquad subtypes

With the icon below you can show the bandwidth and phase response of the filter.

Bandwidth and phase respons.

Create the pipeline

Now we created a filter we have to add the filter to the pipeline.

Open the pipeline editor by click on the Pipeline tab

At the pipeline overview we already see the mixer with 2in, 2out present.
(It is configured at the mixer tab, no need to change the configuration this time).

  • Add a pipeline by pressing the green plus.
  • Default the pipeline is created for the first channel. Make sure it is channel 0 (step 1), not 1 that will be the second channel.
  • Select the filter from the list (step 2)

We now have only a pipeline for the left channel. Lets add a new pipeline for the right channel:

  • Press the green plus at the bottom.
  • Enter 1 at the channel input to assign it to the right channel
  • Select from the list the ‘lp’ filter again.

If you create new filters you can repeat the process by adding the filter to the two existing pipelines.

With graph button you can generate an bandwidth/phase plot over the entire pipeline. In our case it will be the same as from a single filter, but if you apply multiple filters it provides a great feedback.

Testing the new pipeline

Time to test the filter.

  • Press the Apply to CDSP button on the right side of the screen.

This will make it active and save the configuration. If you already have music playing it will be direct audible.

This make it very easy to tweak your settings. For example:

  • You can change the frequency setting of the filter at the filters tab.
  • After the change apply the configuration.
  • And check if your changes doesn’t result in clipping (in which you have the reduce the gain at the mixers tab.

Conclusion

We reached the end to this article. I hope you see that creating new CamillaDSP configuration isn’t that hard. Especially in combination with moOde, which will handle most of the hard parts for you.
Time for your own adventure to create more usefull configuration yourself.

2 Replies to “CamillaDSP with Moode – build a simple filter pipeline”

  1. Hello, I was fantasizing about a new project, I decided to restore the old speaker system. To align the frequency response, I decided to use the DSP on the ADAU1467 board, but I saw that you have implemented Kamila DSP. Hence my question,
    If, for example, I want to implement your version of the DSP, then I only need a hat for the Pi, which will convert the signal to I2S, and from it to a digital amplifier, for example SSM3582?
    And explain, please, in an accessible language, the potential of FIR filters with minimal delays is higher, isn’t it, isn’t PI?

  2. To prevent confusing; I’m not the author of CamillaDSP, this honor belongs to Henrik Enquist. The homepage of CamillaDSP is https://github.com/HEnquist/camilladsp together with the forum on diyAudio. I’m just working on the integration of CamillaDSP in moOde, this integration concerns a number of projects of different people.

    The Pi contains an I2S bus on the GPIO, no special hat required. It supports both slave and master mode (only the master clock is not very precise). On the net you can find a lot of information about the Pi and using the i2s bus.

Leave a Reply

Your email address will not be published.