STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP...

25
FX Basics Dynamics Effects STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015

Transcript of STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP...

Page 1: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics

Dynamics Effects

STOMPBOX DESIGN WORKSHOP

Esteban Maestre

CCRMA - Stanford University August 2015

Page 2: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics: Dynamics Effects

Dynamics effects were the earliest effects to be introduced by guitarists.

The simple idea behind dynamics effects is to amplify or attenuate the amplitude of the electrical signal coming out from the pickup or microphone.

They first appeared in the 1940s as simple on/off switch boards, evolving to volume pedals in the 1950s.

Ex: volume pedal, boost, tremolo, noise gate, dynamic range compressor

Page 3: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Gain control

0.05 0.055 0.06 0.065

-1

-0.5

0

0.5

1

seconds

am

plit

ude

0.05 0.055 0.06 0.065

-1

-0.5

0

0.5

1

seconds

am

plit

ude

FX Basics:Dynamics Effects

XInput signal Output signal

Gain

Gain > 1

Achieved by means of a simple multiplication.

Page 4: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Volume BoostFX Basics:

Dynamics Effects

XInput signal Output signal

Gain ON/OFF

Generally used for boosting volume during solos and/or preventing signal loss in long effect chains.

Ex: when switching from rhythm guitar to lead guitar, a guitarist may use a clean boost to increase the volume of his or her solo.

Page 5: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Volume Boost (ii)FX Basics:

Dynamics Effects

0.68 0.7 0.72 0.74

-1

-0.5

0

0.5

1

seconds

am

plit

ude

0.68 0.7 0.72 0.74

-1

-0.5

0

0.5

1

seconds

am

plit

ude

0.68 0.69 0.7 0.71 0.72 0.73 0.74

-0.5

0

0.5

1

1.5

seconds

OF

F/O

N

0.68 0.69 0.7 0.71 0.72 0.73 0.74

-0.5

0

0.5

1

1.5

seconds

gain

X

00_stomp_dynamics_1.pd

Page 6: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 24

4.5

5

5.5

6

seconds

LF

O f

requency

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 21

1.5

2

seconds

LF

O a

mplit

ude

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-2

-1

0

1

2

seconds

LF

O o

utp

ut

sig

nal am

plit

ude

TremoloFX Basics:

Dynamics Effects

X

Output signal

Produces a slight, rapid oscillation of the signal amplitude; not to be confused with tremolo bar (pitch oscillation).

Based on the use of a Low Frequency Oscillator (LFO):

~

FREQUENCY (f0) AMPLITUDE

Oscillator

LFO

1/f0

Page 7: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Tremolo (ii)FX Basics:

Dynamics Effects

XInput signal Output signal

ON/OFF

Typically, two controls are offered:RATE: Sets the frequency of the volume oscillationDEPTH: Sets the amplitude of the volume oscillation

LFO

AmplitudeFrequency

+

1

RATE DEPTH

Page 8: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Tremolo (iii)FX Basics:

Dynamics Effects

0 0.5 1 1.5 2-1

-0.5

0

0.5

1

seconds

input

0 0.5 1 1.5 24

5

6

7

8

seconds

LF

O f

requency

0 0.5 1 1.5 20.1

0.2

0.3

0.4

0.5

secondsLF

O a

mplit

ude

0 0.5 1 1.5 2-1

-0.5

0

0.5

1

seconds

outp

ut

0.62 0.625 0.63 0.635 0.64 0.645 0.65 0.655-1

-0.5

0

0.5

seconds

input

X

Inputsignal

Outputsignal

ON/OFF

AmplitudeFrequency

+

1

RATE DEPTH

LFO

01_stomp_dynamics_2.pd

Page 9: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Noise gateFX Basics:

Dynamics Effects

Attenuates signal when its level falls below a given threshold. Both the attenuation and threshold are usually available as user controls (resp. RANGE and LEVEL).

Ex: avoid unwanted noise floor when there is no signal coming from the instrument

X

Input Signal

OutputSignal

LEVEL

Level Detector

RANGE

< ?

Page 10: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Noise gate (ii)FX Basics:

Dynamics Effects

LEVEL DETECTOR (Envelope Follower):

Often implemented as Root Mean Square (RMS) meter. RMS amplitude provides a measure of effective (short-time averaged) signal intensity.

‘Averaging time’ sets the responsiveness of the meter.

Input Signal

OutputSignal

AVG. TIME

AVG^2 SQRT

RMS ENVELOPE FOLLOWER

Page 11: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

TIME AVERAGE

Acts as a smoothing function:

Smoothing Function Output

Signal

y[n]x[n]

InputSignal

n

x

n

y

n n

Current sample

Current sample

Average of current and previous input samples

Page 12: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

SMOOTHING WITH RECURSIVE EQUATION:

Find coefficients a and b so that equation

y[n] = b0·x[n] + b1·x[n-1] + … + bN·x[n-N]

- a1·y[n-1] - … - aN·y[n-N]

results into a smoothing function.

…digital implementation of a Low Pass (LP) filter.

current and previous input samples

previous output samples

TIME AVERAGE:

y [n] = ( 1/M ) · ( x[n] + x[n-1] + … + x[n-M+1] + x[n-M] )

Obtain M from ‘averaging time’ : M = avgTime · fs

Page 13: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

RMS Envelope…

With TIME AVERAGE:

With Smoothing Low-Pass Filter (RECURSIVE):

0.3 0.35 0.4 0.45 0.5

-0.5

0

0.5

1

seconds

0.3 0.35 0.4 0.45 0.5 0.55-1

-0.5

0

0.5

seconds

Averaging using 441 and 882 previous samples respectively(M=441; M=882)

Both filters only using1 previous sample(N=1) !!

Page 14: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

0.564 0.566 0.568 0.57 0.572 0.574 0.576 0.578 0.58

-1

-0.5

0

0.5

1

seconds

am

plit

ude

TIME DOMAIN

1/1200 1/500

0 0.5 1 1.5 2 2.5

x 104

0

0.2

0.4

0.6

0.8

1

magnitude

frequency (Hz)

FREQUENCY DOMAIN

Fourier Transform

500 1200

fs/2 (Nyquist)

Page 15: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

0.366 0.367 0.368 0.369 0.37 0.371 0.372 0.373 0.374 0.375

-1

-0.5

0

0.5

1

seconds

am

plit

ude

x(t) = 1.0·sin(2·π·500·t) + 0.4·sin(2·π·5000·t)

0 0.5 1 1.5 2 2.5

x 104

0

0.5

1

1.5

magnitude

frequency (Hz)

5005000

Page 16: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

f

Magnitude

Slower Components

fs/2 (Nyquist)

Quicker Components

Low Frequencies

High Frequencies

Page 17: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

f

Gain

Low Frequencies

High Frequencies

1 One can design a Low-Pass filterso that components above a certain ‘characteristic’ frequency (fc) get attenuated…

LP

Page 18: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

FX Basics:Dynamics Effects

y[n] = 0.0344·x[n] + 0.0344·x[n-1]

+ 0.9312·y[n-1]

0 0.5 1 1.5 2 2.5

x 104

0

0.2

0.4

0.6

0.8

1

magnitude

frequency (Hz)

5005000

0.382 0.383 0.384 0.385 0.386 0.387 0.388 0.389 0.39 0.391

-1

-0.5

0

0.5

1

seconds

am

plit

ude

How to ‘design’ the coefficients?(e.g. how many coefficients? which values?)

Basics of DIGITAL FILTERS (to come…)

Page 19: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Noise gate (iii)FX Basics:

Dynamics Effects

RMS Envelope Follower

x[n] y[n]LP filter^2 SQRT

RMS ENVELOPE FOLLOWER

0.3 0.31 0.32 0.33 0.34 0.35

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

seconds

Rapid oscillation (quicker components) have been attenuated

Page 20: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Noise gate (iv)FX Basics:

Dynamics Effects

Input

TH

Output

TH

Gain1

RANGEON ON

ON

Chattering

Abrupt ON-OFF / OFF-ON transitions

Example of basic operation

Page 21: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Noise gate (v)FX Basics:

Dynamics Effects

Input

THON-OFF

THOFF-ON

Avoids chattering

Gain

Output

1

RANGE

Release

Attack

Smoother transitions

02_stomp_dynamics_3.pd

Noise gates often include HYSTERESIS and ATTACK/RELEASE times

Page 22: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Dynamic Range Compressor

FX Basics:Dynamics Effects

Attenuates the signal when its level its higher than a certain threshold. Both the amount of attenuation and the threshold are the most typical user controls (resp. COMPRESSION/RATIO and LEVEL).

Ex: reduce intensity differences, soften the amplitude of very loud attacks

X

LEVEL

Level Detector

COMPRESSION

>?

InputLevel

Output Level

LEVEL

COMPRESSION

Bypass

Hard Limiter

Page 23: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Dynamic Range Compressor (ii)

FX Basics:Dynamics Effects

X

LEVEL

Level Detector

COMPRESSION

FEED-FORWARD basic structure

Gain Computer

X

LEVEL

Level Detector

COMPRESSION

FEED-BACK basic structure Gain

Computer

Page 24: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Dynamic Range Compressor (iii)

FX Basics:Dynamics Effects

Example of basic operation

InputLevel

Output Level

LEVEL

OFF: Gain = 1

ON: Gain < 1

1:1

2:1

4:1

Inf:1

Gain = 1

Gain < 1

ONOFF OFF OFFON

Input

Output

Gain

Page 25: STOMPBOX DESIGN WORKSHOP - CCRMAesteban/stompbox/2015/2015_Stompb… · STOMPBOX DESIGN WORKSHOP Esteban Maestre CCRMA - Stanford University August 2015 . FX Basics: Dynamics Effects

Dynamic Range Compressor (iv)

FX Basics:Dynamics Effects

Further available controls, depending on application:

• ATTACK / RELEASE TIMES

• HARD vs SOFT KNEE

• MAKE-UP GAIN

InputLevel

Output Level

LEVEL

SOFT KNEE

MAKE-UP GAIN

HARD KNEE

Make-up Gain

Reduced Gain

ONOFF OFF OFFON

Input

Output

Gain

03_stomp_dynamics_4.pd