# Democracy DEV

### A Raspberry Pi + FPGA Platform for Real-time Embedded Audio Processing

View all updates Nov 14, 2016

## First Week & Wah Effect Explained

Hi there!

First, thanks a lot to everyone supporting our Democracy DEV project.

We are receiving very good feedback from many developers and researchers working in the audio processing field. We look forward to get more and more backers, and reaching our funding goal!

In this first update, we are going to provide some technical details on the wah guitar effect demo shown in the video above.

## Wah Effect Technical Description

The wah effect is based on a bandpas filter with variable center frequency and a small bandwidth. Changing the bandpass center frequency leads to a spectrum shaping similar to speech and produces a kind of “wah-wah” sound.
The filtered wah signal is then mixed with the direct one to produce the final effect.

``````function y = wah(x,Fw,damp,mix,Fs,minf,maxf)

% difference equation coefficients
Q1 = single(2*damp);     % this dictates size of the pass bands
delta = single(Fw/Fs);

yw = zeros(size(x),'single');
y = zeros(size(x),'single');

% apply difference equation to the sample
for n=1:length(x)
% auto wah function
Fc = triWaveUpdate(minf,maxf,delta);
F1 = single(2*sin((pi*Fc)/Fs));
yw(n) = wahFilter(x(n),F1,Q1);
% wet/dry mix
y(n) = (1 - mix)*x(n) + mix*yw(n);
end

end

``````

Moving the center frequency may be achieved either with a control pedal or by defining a specific time varying function, for example a triangle wave.

``````function FcOut = triWaveUpdate(minf,maxf,delta)
persistent iFc zFc FcUp;
if isempty(iFc)
iFc = 1;
zFc = single(minf);
FcUp = true;
end
if (zFc >= minf) && (zFc < maxf) && FcUp
Fc = zFc + delta;
elseif (zFc >= minf) && (zFc < maxf) && ~FcUp
Fc = zFc - delta;
elseif zFc >= maxf
FcUp = false;
Fc = zFc - delta;
elseif zFc < minf
FcUp = true;
Fc = zFc + delta;
else
Fc = single(minf);
end
FcOut = zFc;
zFc = Fc;
end

``````

The time varying filter is implemented as a State Variable Filter, which allows independent control over the center frequency and the damping factor in charge of tuning the filter bandwidth.

``````function yb = wahFilter(x,F1,Q1)
persistent zyl zyb
if isempty(zyl)
zyl = single(0);
zyb = single(0);
end

yh = x - zyl - Q1*zyb;
yb = F1*yh + zyb;
yl = F1*yb + zyl;
zyl = yl;
zyb = yb;

end
``````

\$3,919 raised

of \$56,000 goal

7% Funded Time Expired
Dec 18 2016
ended

## Product Choices

\$349

### Democracy DEV Board

One Democracy DEV board. Democracy is an open Raspberry Pi 3 + FPGA Platform for Real-time Embedded Audio Processing. Including analog and MIDI I/O for audio processing, footswitch pedal inputs, and a universal control pedal interface for In/Out expression control purposes. \$299 USD is a campaign-only exclusive price. Orders placed after the campaign ends will cost \$349 USD, and the boards will eventually retail for \$399 USD.

## Credits

#### BENTI

We create highly portable and embeddable digital audio systems for sound analysis, emulation and synthesis.

ReDS

ReDS

ReDS

ReDS

BENTI

BENTI

ReDS

ReDS

BENTI