CAMERON KOO

Aspiring Audio Engineer

C-DJ: Incorporating Time Domain Convolution to Create A Basic DJ Controller with C

What's Time Domain Convolution?

Time domain convolution is an overlap save process. I have used it to perform a cicular convolution of filter & chunks of inputs. In the following diagram, it shows that K-1 points from the previous input chunk must be saved for use in the current input chunk. This complex function blocks have to work with real time and stereo audio inputs.

The way it works is that it copies the chunk into the end. Next, it convolves the whole thing, and copies out the end 1024 frames.

What's this project about?

The primary objective of the project is to create a basic user oriented program that can mix or add two different signals together in real time with effects.The program has to be compatible with stereo inputs and produce stereo real time output. The program prompts the user to put 3 arguments in its command line to run.

These are the command line options
This is a simple version of the project goal, which is to combine two different signals together with no interruption, unless user would like to.

How is it being processed from head to toe?

The user is required to enter a number within a restricted time frame of the music. The program will add signal 1 and signal 2 together at the selected time frame. Next, the program computes and starts playing both signals as desired, ncurses will ask user to add effects. These effects are "Speed Up", "Slow Down", "High Pass Filter", "Low Pass Filter" and "Band Pass Filter". The user can select one of these audio effects, it will complete the command as the name suggests.

This is the visual representation or flow diagram of the C-DJ Controller. It provides a step by step approach to each part of the processing.

What's the complexity of my project?

The program is MacOS compatible. Since it is a Time Domain Convolution, its "Big-O" complexity is O(N^2), which the performance is directly proportional to the square of the size of the input data size.

Example Code

Libraries used:

<sndfile.h>
<portaudio.h>
<math.h>
<ncurses.h>
<string.h>