The can be used to emulate the response

The
aim of this study is too research, design and begin the initial
development of software capable of recreating any acoustic space by
means of the mathematical process known as convolution. Using this
method of creating reverb it is possible to emulated the sound of any
physical space or even an algorithmic reverb unit using an impulse
response, a tone designed to excite the room across the whole
frequency spectrum such as a starter pistol. The technology also can
be used to emulate the response of different speakers and even
microphones as well as other more creative uses which are limited
only by what the user can think of.

Consider
a room of finite size with a single point source emitting an audio
signal within it. The audio signal can also be considered as a series
of sound pressure waves propagating throughout the room over time
these sound pressure waves interact with the boundaries of the space
by reflecting off of it or by being absorbed by it. This process is
known as reverberation.
Systems
by which to recreate reverberations or reverb have existed for a long
time initially
it involved a room often not very large covered with tiles or another
reflective material with
a loudspeaker to play the incoming audio signal and a microphone to
pick up the effected signal.
“The
loudspeaker (playing what was being sent from the echo send on the
console) would usually be placed not facing the room, but facing a
reflective wall. This increased the reflections in the room, and also
decreased the amount of direct signal that would be picked up by the
microphone(s).” (Granka
G. (2011) The History of Echo (Echo) Chambers (Chambers).
http://audiogeekzine.com).
Subsequent
developments such as the reverb plate, a method which uses a
transducer similar to that of a loudspeaker to create vibrations on a
large metal plate which is then picked up by contact microphones
which output an audio signal which could be then mixed in with the
dry signal and the spring reverb, a similar method which uses a
transducer at one end of a spring and a pickup at the other end of
the spring to create artificial reverberations.
With
the advent of digital technology digital ways to recreate
reverberations were also developed such as the delay-line tap which
in essence boils down reverb to its most basic form which is a series
decaying echoes. The most recent way to artificially recreate
reverberations is through a process known as convolution, a
process that is applied to two functions, in
this case it would be the incoming audio signal and the recording of
a rooms sound, known as an impulse response to
produce a third function that would be considered different to the
original functions, in
this case the reverb of the desired impulse response mixed with the
original dry signal.

When
designing the software even in the initial stage I need too take in
consideration the limitations potentially imposed by hardware as DSP
chips have limited computational power verses that of a normal
computer central processing unit.
“A
DSP is a special digital processor, optimized for performing
efficiently in a single clock cycle a number of simultaneous
operations: typically a DSP can perform a complete
multiply-and-accumulate (MAC) every clock tick. In order to filter an
audio signal correctly in real-time, the DSP must finish all
computations during the sampling period, so it will be ready to
process the next incoming data sample.” E.
Armelloni C. Giottoli A. Farina.
(2003).
IMPLEMENTATION
OF REAL-TIME PARTITIONED CONVOLUTION ON A DSP BOARD.
Available at:
http://http://pcfarina.eng.unipr.it/Public/Papers/188-Mohonk2003.pdf08/01/18.
Due
to the nature of convolution reverb all the calculations made by the
DSP must be completed within each clock cycle of the processor. Due
to these limitations it is not possible to use the standard finite
impulse response (FIR) algorithms also
known as direct convolution

“In
short, direct
convolution
directly processes an input signal with an FIR filter whose
coefficients are
all of the sample points of the impulse response. (Each input sample
is multiplied by EVERY sample in the impulse response.) Can get very
inefficient quickly, especially for longer impulse responses.” J.
Campbell. (2017). Convolution Reverb Part One: Overview.
http://www.jackcampbellsounds.com/programming/2017/4/1/convolution-reverb-part-1-overview
(08/01/2018)
therefore
using other algorithms will required due to the amount
of taps, “an
indication of 1) the amount of memory required to implement the
filter, 2) the number of calculations required, and 3) the amount of
“filtering” the filter can do”
Iowegian
International.
(Unknown). FIR Filter Basics
.
http://https://dspguru.com/dsp/faqs/fir/basics/ 08/01/2018.
Considering the standard sample rates used in audio (44.1KHz/48KHz)
around 80,000 would be considered sufficient. To get around these
issues other algorithms must be implemented, the
uniformly partitioned overlap and save algorithm. “This
algorithm was first proposed on a general-purpose computer by
Stockham in 1966 1, and ported on a DSP chip for audio applications
by Kulp in 1988” E.
Armelloni C. Giottoli A. Farina.
(2003).
IMPLEMENTATION
OF REAL-TIME PARTITIONED CONVOLUTION ON A DSP BOARD.
Available at:
http://http://pcfarina.eng.unipr.it/Public/Papers/188-Mohonk2003.pdf08/01/18.
Using this algorithm the incoming audio signal is split into blocks
of samples, all of equal size and length. Then is processed using a
fast fourrier transform to convert the blocks from the time domain
into it’s frequency components (the process uses a combination of
adjacent blocks and overlapping blocks so as to prevent artifacts
from entering the signal) at
this point the incoming dry signal is then combined with the impulse
response to add the reverberation effect after this an inverse fast
fourier transform is required to change the blocks from the frequency
domain back to the time domain. The main benefit of using this
algorithm is
it avoiding circular convolution, when the incoming audio signal is
longer than the impulse response which can add unwanted artifacts to
the signal and it also has reduced latency verses the unpartitioned
algorithm as
long as the blocks are kept too a small size. “Regarding the
computational load, in principle this increases only slightly over
the Overlap-And-Save algorithm, as shown by Kulp 2. In practice,
instead, due to the faster memory access available when processing
small data structures, the performance can be even greater than with
the Overlap-And Save” E.
Armelloni C. Giottoli A. Farina.
(2003).
IMPLEMENTATION
OF REAL-TIME PARTITIONED CONVOLUTION ON A DSP BOARD.
Available at:
http://http://pcfarina.eng.unipr.it/Public/Papers/188-Mohonk2003.pdf08/01/18.

Due
to my
own limitations in computer programming it is unlikely I would be
able to implement such
a piece of software into a DSP chip but
using
a computer such as the Raspberry
Pi, The
Raspberry
Pi
however lacks a high quality way of recording audio with all out
going audio being routed through the on-board HDMI port so it must be
used
in
conjunction with a sound card such as the Wolfson
Audio Card or
the Cirrus
Logic Audio Card,
both
cards
have
on board audio digital/digital audio conversion and
are
capable of handling 24 bit 192KHz audio with stereo
3.5mm
jacks for recording and for playback, these inputs and outputs are
not ideal for the requirements of implementing the software into a
guitar pedal.
Using
a Raspberry
Pi would
also allow me to use Pure
Data a
visual programming language created by Miller
Pucket for
music and multi-media projects or
via Python
an
object based programming language. I
have
decide to use Pure
Data due
to its freeware nature meaning that it will be able to be accessed
anywhere and on any computer without having to pay. Pure
Data is
designed by Miller
Pucket
also the creator of Max/MSP,
another
visual programming language designed for use with music and other
multi-media projects. Pure
Data
differs from Max/MSP
as
it has been designed from the ground up to use central processing
unit power as opposed to off-loading signal processing to a digital
signal processing board,
thus negating the need for a development board at the initial design
phase. Pure
Data
being a member of the patcher
family of programming languages means that the language already
contains an ecosystem of objects, objects are created
using a publicly available application programming interface which
allow other developers to add there own routines to the program
and abstractions, which
are reuseable pieces of code written within Pure
Data
which act as the building blocks of anything designed within the
software therefore this negates the need to create the program using
hard coding in a language such C.
Pure
Data does
have some limitations when it comes to processing large quantities of
data in parallel due to the lack of a constructor function but there
are workarounds available.
Due
to the visual nature of Pure
Data complex
processes such as those required for the partitioned overlap and save
algorithm required by the convolution process may becoming so large
and complex that it is impractical to work with on a visual level if
this stage is reached then using a language such as Python
would be more efficient. Using
Pure
Data
on the Raspberry
Pi is
not completely stable running with issues arising with power
consumption, resolvable
by using a a power supply that maintains 5v and can have up to 2A
drawn, this however could be an issue with a guitar pedal powered by
batteries where the supply decreases over time
and also due
to the small low powered nature of the Pi
several
tweaks will need to be made to improve the Pi’s
low
latency performance such as overclocking the processor and running
the unit with out keyboard and mouse so as too free up as much
processing power avaliable.
Python
is an open source language that is compatible with the Raspberry
Pi
its guiding principles are
“Beautiful is better than ugly. Explicit
is better than implicit. Simple is better than complex. Complex is
better than complicated” T.
Peters. (2004) The Zen of Python
https://www.python.org/dev/peps/pep-0020/
(08/01/18). Compared
with languages used to program DSP chips such as C or C++ it is much
simpler with as the language emphasises readability and uses much
simpler syntax allowing less lines of code to be used and leaving
less white space. To
complete an algorithm such as the partitioned overlap and save
required an add on to the basic python development environment such
as ScyPi
would
be required, “The
ScyPi Library, a collection of numerical algorithms and
domain-specific toolboxes, including signal processing, optimization,
statistics and much more.” Unknown. (Unknown) The ScyPi Ecosystem
https://www.scipy.org/about.html
(08/01/18).

The
goal of this study is to create a working convolution reverb unit
initially
in a software format but also with goal of being able to implement it
into hardware.
To
achieve this I will be creating the initial software version using
Pure
Data or
Python.
Once
the initial version of the software has been developed a version test
version will be created in the VST formats so the software can be
tested by real world users so as any issues with the software can be
addressed before it is optimized for use with hardware. The users
will be provided with a VST host software such as Herman
Seib’s VSTHOST so
the users can evaluate the software without the need to load in the
plugin to their DAW so as to avoid issues specifically related to the
DAW. The users will also be provided with a selection of test audio
files of varying sample rates and depths as well as encouraging them
to use there own audio files so as to ensure compatibility
with as many different types of audio as possible.

Users
of the test plugin will be asked to fill out a questionnaire which
will allow me to gather qualitative
and
quantitative data on
any issues that arise within the initial version of the software and
allow them to be identified and resolved before being optimised for
hardware. As
well as distribution to other users I shall also spend time testing
myself using a selection of different impulse responses of
different lengths and recorded at different sample rates
and different audio sources at various different frequencies and at
different sample rates so
as to ensure that the software is able to handle a variety of
different instruments and different impulses. Once the data has been
gathered from the questionnaires has been gathered the quantitative
parts can be presented as graphs within a later report and the
qualitative parts could potentially be used as quotes within a
further report as well as been used to further the design.

Before
beginning serious research for this assignment I had assumed that
this project would be achievable using commercially available DSP
developer boards such as the Axoloti
created
by Johannes
Taelman (avliable here http://www.axoloti.com/product/axoloti-core/)
and
use visual programming languages such as Pure
Data, Axoloti uses
its own visual programming language similar in function to Pure
Data but
during my research I found that it is likely to be very impractical
to write such a complex program within an environment such as Pure
Data due
to it lacking in facilities such as zero padding which prevent the
discrete fast fourier transform, a periodic function a key part to
the partitioned convolution process. As previously mentioned there
are also some issues using Pure
Data on
a Raspberry
Pi such
as requiring a constant supply of at least 5v and 2A without which it
will cause the system to crash which would not be ideal for a gigging
environment in which the unit may be needed to run from battery power
or from a dedicated guitar pedal power supply.

During
my research I have come across a similar project created by students
of the University
of South Florida
that uses Rapberry
Pi’s instead
of a dedicated DSP board.
I
also feel that using a Raspberry
Pi in
conjunction with a sound card such as the Wolfson
Audio Card would
provide a good platform to host the software at this initial stage. I
have decided to use the Python
programming
language with the ScyPi
library to
design the software. I have decided this as Python
is
generally considered one of the easiest programming languages to use,
due to my limited knowledge in computer science it is also free and
open source and
is dynamic,
flexible, object-oriented, procedural, and functional.
For these reasons it’s simpler, easier to read code allows complex
functions to be expressed in less lines of code.