MENU
Making music on a minimal setup

Making music on a minimal setup

 

This article is adapted from the material presented at a workshop I gave at the University of York (5/02/2021) :

 

Homemade Music Production and Sound Design:

Making music on a minimal setup

By Michele Pizzi

 

Limiting the equipment we’re using doesn’t necessarily mean limiting the quality of the music we can produce. In fact, it can even spark our creativity and force us to think outside the box. Whether we’re currently working from home on a limited setup or we would like to try out a different workflow, we can build our own audio processing tools and digital instruments. If we can’t access it, we code it ourselves. The beauty of this approach is that not only we can build tools truly fine-tuned to our needs, but also we’re learning new skills as we do so.
I’m going to share my creative process for sound design and music production for a small home studio and on a budget. We’ll take a look at some tools and techniques that are implemented within open-source software and cheap equipment. You can try out the techniques below right away. You will need a computer, an audio interface, and a microphone. Anything else (e.g. instruments and more plugins) is optional. If you plan to work with synthetic sound sources, the microphone is also optional. No previous coding experience is required. Just copy the example codes and experiment with them. The techniques and ideas described below are by no means the only way to get started with building digital instruments. This is just an example of my personal approach and I hope I can share some useful information or point out some tools that I consider to be very powerful for sound design.

 

Why ’Homemade’?

• I produce music from home all the time and I would like to share some of the tools I use daily on a minimal setup.
• I code my own audio effects and synthesizers.
• I hope to give some useful information to anyone interested in building their own custom-made tools.
• We’ll discuss tools and techniques that you can try right away.
• Limited equipment: laptop, software, one microphone, and a guitar (optional).

 

My favourite tools for music production:


• Praat
• Matlab

• Csound

• Rode M3 versatile microphone, under 100 pounds. Sturdy design, ideal for experimenting with foley recordings and musique concrete composition.

 

My workflow

 

When I write a new composition, I very often start with prototyping an audio processor or a synthesizer. I focus on an idea/goal that I would like to achieve. Building the tools is part of my creative process.

 

Praat (https://www.fon.hum.uva.nl/praat/)

Praat is an incredible tool. It is very light (11.9 MB) and it is also free. The user interface is fascinating and I find it brilliant that you can treat audio files and analysis data (e.g LPC) as building blocks. I use Praat as a sort of sound design workbench where I experiment with different combination of processing techniques and sounds. Each sound can be processed separately, combined and then processed again. Then we can combine the result with another sound! The possibilities are endless. The workflow in Praat provides a very refreshing approach that encourages experimentation. 

Software for phonetics with intuitive and powerful features for sound design:
• Audio editing and recording, audio analysis
• Reverse sounds
• Filters
• Pitch transposition with time compression / stretching
• Convolution
• Cross-synthesis

Working with Praat

Let’s perform some basic tasks:

  1. Open Files
  2. Audio Editing
  3. Read half-speed
  4. Resample
  5. Reverse

Step 1:

The first thing to do is to import the audio file we’re working with in Praat. To do this, we click on Praat’s icon and we simply click on the option Open at the top of the window. Then we select the option Read from file. We can now browse our computer to choose the.wav audio file to import in Praat.

The files we import in Praat appear on the left side of the window as Objects and they will display their name. On the right there will now also appear a collection of buttons that allow to perform different types of audio processing and analysis. If we import more than one file at a time, it is important that we carefully select the file we want to process to make sure we are always processing the correct one.

Step 2:

Now we want to remove some extra silence at the end of our file. To do this we click on the button View & Edit.

We can now see the waveform of our audio file. To edit the file, we select the extra silence by clicking and dragging the cursor towards the end of the selected area we want to remove. A simple way to remove it is to press ctrl+x. Alternatively, we can click the option Edit and choose Cut.

Step 3:

One of the most useful effects for sound design is to playback sounds at half-speed. This causes the sound to be an octave lower. In addition to that, the file will be twice as long as the original speed. The opposite is also true for double speed. The result will be an octave higher and half the original duration.

To achieve this effect in Praat we press the button Modify. Then we select Modify times and click on Scale times by…

In the window that opens at this point, we can type in a value for Factor. If we use 2 as factor, the sound will have double duration and will play an octave lower. If we use 0.5 as factor, the sound will be half its original duration and an octave higher.

Step 4:

Once we have changed the playback speed, we need to resample our audio file to its initial sample rate before exporting it to a new audio file. In my case I am using some guitar notes recorded at 48 kHz. To resample a file we simply click on the button Convert. Then we select the option Resample.

A window will appear and there we can specify our desired sampling frequency. In my case I typed 48000 in the box New Sampling Frequency (Hz).

Step 5

It is very easy to play sounds in reverse and it can be extremely useful for sound design. To do this, we click on the button Modify. And then we select Reverse. That’s it!

Finally, we want to save our amazing sounds so we can open them outside Praat. Select the option Save and then click on Save as WAV file.

Convolution in Praat

One of the most spectacular functions of Praat is the ability to perform convolution between two audio files. This means that Praat can be used as a convolution reverb processor. With just a couple of clicks we can convolve any sound source with the impulse response of our choice (not necessarily reverb! More on that later)

Let’s say we want to apply reverberation to our sound recording. First, we need to import in Praat both the sound file we want to process and an impulse response. We need to make sure that we select both the sound file and the impulse response before we click on the button Combine. Next, we click on Convolve…

The following window will open. We can perform the convolution by selecting the parameters shown in the figure below and then clicking Apply.

Done! We can now see that a new object has been added to the list which features both the names of the files we have combined.

 

This is a very powerful feature that we can use to experiment with different techniques by combining a variety of sound sources. These can be a different reverb IR, a reversed IR or other instruments and foley sound effects. These are some of my favourite techniques:

• Guitar -> Reverberation IR-> instant open source high quality reverb. You can explore a Reverb IR database such as https://www.openairlib.net/
• Guitar -> Foley sounds-> Sound Design of hybrid sounds
• Guitar -> Reverse reverb sound design -> This smooths down the attack if dry signal removed

 

Csound (https://csound.com/)

Csound is a powerful computer music tool. And it is also free!  It features an incredible variety of sound synthesis techniques. Csound has a vast collection of filters and sound generators that allows to quickly code and prototype your own digital instruments. Not to mention the amazing collection of tools for sample manipulation and granular synthesis. Opcodes such as diskin2 allows to control very easily playback speed. The score sections provides access to very detailed manipulation of parameters and sequencing techniques. The score sections allows to easily synthesize and control multi-layered sounds. One way to create interesting sounds is to write down multiple notes playing at the same time with each note featuring different parameters. Another great feature of Csound is the option to use it within Cabbage (https://cabbageaudio.com/) to quickly prototype ideas for VST plugins.

Find out more about Csound: https://csound.com/get-started.html

 

Sound synthesis in Csound

Now we can move on and try out some sound synthesis examples in Csound. We’ll take a look at a simple additive synthesis instrument that mixes several sinewaves in order to build our sound from the ground up. We can experiment by changing the parameters of the code below.

The opcode VCO2 provides some classic waveforms with their amplitude controlled by an adsr envelope. Next, we’ll introduce some filters to shape our frequency content such as the moogvcf2 resonant filters.

For the next example we’ll take a look at a subtractive synthesis intrsument featuring a noise generator. We will need a noise generator, some filters (LPF, BPF, HPF), an adsr envelope to control the amplitude over time. In this case we’ll use the butterworth band-pass filter (butterbp).

Csound can also open audio files and change their playback speed. We can easily experiment by layering many sounds and with sequencing techniques. Of course we can add more processing (e.g. filters, delays).


Example of Additive Synthesis and subtractive synthesis with some classic waveform oscillators in Csound

 

Copy in the Orchestra section:

 

; Example of Additive synthesis and subtractive synthesis with classic waveforms with vco2

; by Michele Pizzi 5/2/2021

sr = 48000
ksmps = 10
nchnls = 2
0dbfs = 1


instr 1
iamp  = p4
ifreq   = p5
ifn       = p6

kenv adsr 0.3,0.1,0.7,3.2
asig oscil3 iamp*kenv,ifreq,ifn

outs asig,asig
endin

instr 2
iamp              = p4
ifreq               = p5
iwaveform    = p6 ; 0 sawtooth 12 triangle 2 square with PWM
iphasew        = p7
icutoff            = p8
ires                 = p9
iratiotuning = p10
iampmod    = p11  ; in %
ifmod          = p12
ivar                 = p13


kmod randi (iampmod/100)*(ifreq*iratiotuning),ifmod,ivar
kenv  adsr 0.1,0.2,0.7,3.2
kenvf adsr 0.1,0.3,0.6,3.2
aosc1 vco2 iamp*kenv,(ifreq*iratiotuning)+kmod,iwaveform,iphasew
af    moogvcf2 aosc1,icutoff*kenvf,ires
outs af,af
endin

 

Copy in the Score section:


f1  0  8192  10  1

;

;p1  p2  p3  p4  p5  p6  p7  p8  p9  p10  p11  p12  p13
;i1  0  5  0.3  200  1
;i1  0  5  0.3  600  1
;i1  0  5  0.2  650  1

;i1  0  5  0.1  770  1
;i1  0  5  0.1  800  1
;i1  0  5  0.1  950  1

i2     5    7  0.5  80  2  0.25  2100  0.5  1  42  2.3  0.5
i2     5    7  0.5  80  0  0.75  2100  0.5  1.5     42  2.3  0.7
i2     5    7  0.5  80  0  0.45  2100  0.5  2       42  2.3  0.3

 

Example of Subtractive Synthesis with noise generator

 

Copy in the Orchestra section:

 

; Example of Subtractive Synthesis

; by Michele Pizzi 5/2/2021

sr = 48000
ksmps = 10
nchnls = 2
0dbfs = 1

instr 1
iamp  = p4
ifreq = p5
iband = p6

kenv adsr 1.3,0.1,0.7,3.2

anoise rand iamp*kenv,0.5,0.7

af      butterbp anoise, ifreq,iband

abal   balance af,anoise
outs abal,abal
endin

instr 2
ispeed= p4
igainL  = p5
igainR  = 1-igainL

kenv linseg 0,p3*0.2,1,p3*0.3,1,p3*0.5,0
asample diskin2 "C:/Users/Proprietario/Desktop/making_music_minimal_setup/csound_codes/glass_jar1.wav",ispeed,0,1

af1 butterbp asample,500,50


outs af1*kenv*igainL,af1*kenv*igainR
endin

 

Copy in the Score section:

;p1  p2  p3  p4  p5  p6
i1  0  7.4  0.4  520  20
i1  5.6  8.4  0.4  110  20
i1  3.7  8.4  0.4  370  20
;i1  2  1.4  0.2  820  50
;i1  2  3.4  0.2  1220  80

;i2  0  7  -0.125  0.5
;i2  0  27  -0.074  0.2
;i2  0  27  -0.1  0.8

 

 

 Matlab* /  Scilab / GNU Octave

Matlab is a scientific computing enviroment that is very powerful for signal and music processing. GNU Octave and Scilab are also very powerful open-source alternatives to Matlab and they allow to perform similar tasks. I use all of them to build interactive audio process tools for music production. I have created original compositions where sounds are processed entirely in Matlab. The sounds can then saved to WAV and mixed in any DAW. I used Matlab extensively to develop software for speech synthesis and vocal tract modelling. Also I recently developed Listening Lab. It is a collection Interactive GUI applications to train listening skills :  See Compressor GUI

 

*Matlab is not free. You can run the delay example in GNU Octave. At the moment, the LPC analysis example can run only in Matlab. However, I am writing a series of tutorials in both Octave and Scilab. They will be available soon, stay tuned for those!

 

Example of filter approximated from recorded vowels (Matlab)

 

% Simple LPC analysis for static vowel filtering of a noise source.

% Approximates the filters from recorded vowels.

%by Michele Pizzi 5/2/2021

clc;clear;

[sig,Fs]= audioread(’insert_your_recorded_vowels.wav’); %imports audio file

source = randn(Fs,1); %noise source

sec = 1.3; % start time of analysis framelen = Fs/20; %length analysis

marker = round(sec*Fs);

order = 100;  % order of analysis

segment = sig(marker:(marker+framelen)-1); %cuts a segment of audio

window = triang(framelen); %triangular window

coeff = lpc(segment.*window,order); %estimate the filter from the voice

vowel = filter(1,coeff,source); %filters noise with vowel resonances

 

Example of feedback delay (Matlab / GNU Octave)

Delays are the building blocks of other audio effects (e,gvibrato, chorus, flanger and FDN reverb). Let’s take a look at an example of feedback delay.

 

% Example of a feedback delay.

%by Michele Pizzi 5/2/2021

clc;clear;

Fs = 48000;

[sig,Fs] = audioread(’insert_your_file_name_here.wav’);

delay = 210; %delay in ms

silence = zeros(Fs*1,1);

sig = [sig;silence]; % adds silence ad the end of our signal

delaysamples = floor(delay*(Fs/1000)); % converts delay in ms to samples

feedback = 0.7;

buffer = zeros(delaysamples,1);

add = floor(delaysamples*8);

out = zeros(length(sig)+add,1);

for n = 1:length(sig)

  out(n,1)= sig(n,1)+ buffer(delaysamples,1)*feedback;

  buffer = [out(n,1);buffer(1:end-1)]; 

  end

plot(out) 

See also

Ask
Print