piano - Virginia Tech Department of Physicskimballton/home/pub/piano/piano.pdf · 2 Piano Tuning...

Post on 19-Jul-2018

218 views 2 download

Transcript of piano - Virginia Tech Department of Physicskimballton/home/pub/piano/piano.pdf · 2 Piano Tuning...

1

Pian

o Tu

ning

For Physicists & Engineersusing your

PianoTuning

Laptop, Microphone, and Hammer

Bruce Vogelaar313 Robeson Hall

Virginia Techvogelaar@vt.edu

at

Room 130 Hahn NorthApril 21, 2011

by

2

Pian

o Tu

ning

What our $50 piano sounded like when delivered.

So far: cleaned, fixed four keys, raised pitch a half-step to set A4 at 440 Hz, and did a rough tuning…

3

Pian

o Tu

ning

Bravely put your ‘VT physics education’ to work on that

ancient piano!

Tune: to what? why? how?Regulate: what?Fix keys: how?

4

Pian

o Tu

ning

A piano string is fixed at its two ends, and can vibrate in several harmonic modes.

02

;2

nfnLvvf

nL

n

The string vibrating at a given frequency,produces sound with the same frequency.

Depending where you pluck the string,the amplitude of different frequencies varies.

What you hear is the sum.

...)2sin()2sin()2sin()( 332211 tfatfatfatp

L

5

Pian

o Tu

ning

5th (3/2)

4th (4/3)

3rd (5/4)

Why some notes sound ‘harmonious’

Octaves are universally pleasing; to the Western ear, the 5th is next most important.

Octave (2/1)

6

Pian

o Tu

ning

A frequency multiplied by a power of 2 is the same note in a different octave.

7

Pian

o Tu

ning

Going up by 5ths 12 times brings you verynear the same note(but 7 octaves up)

(this suggests perhaps12 notes per octave)

f

log2(f)

log2(f) shifted into same octave

“Wolf ” fifth

We define the number of ‘cents’ between two notes as1200 * log2(f2/f1)

Octave = 1200 cents“Wolf “ fifth off by 23 cents.

Up

by 5

ths:

(3/

2)n

“Circle of 5th s”

127 5.12

8

Pian

o Tu

ning

log 2/1

log 3/2

log 4/3

log 5/4log 6/5log 9/8

We’ve chosen 12 EQUAL tempered steps; could have been 19 just as well…

Average deviation from ‘just’ notes

1=

0

log2 of ‘ideal’ ratios Options for equally spaced notes

9

Pian

o Tu

ning

from: http://www.sengpielaudio.com/calculator-notenames.htm

Typically setA4 to 440 Hz

10

Pian

o Tu

ning

5th (3/2)

4th (4/3)

3rd (5/4)

for equal temperament:

tune so that desired harmonics are at the same frequency;

then, set them the required amount off by counting ‘beats’.

Octave (2/1)

What an ‘aural’ tuner does…

11

Pian

o Tu

ning

I was hopeless,and even wrote asynthesizer to tryand train myself…

but I still couldn’t‘hear’ it…

From C, set G above it such that an octave and a fifth above the C

you hear a 0.89 Hz ‘beating’

These beat frequencies are for the central octave.

12

Pian

o Tu

ning

Is it hopeless?

not with a little help from math and a laptop…

we (non-musicians) can use a spectrum analyzer…

13

Pian

o Tu

ning True Equal Temperament Frequencies

0 1 2 3 4 5 6 7 8C 32.70 65.41 130.81 261.63 523.25 1046.50 2093.00 4186.01C# 34.65 69.30 138.59 277.18 554.37 1108.73 2217.46D 36.71 73.42 146.83 293.66 587.33 1174.66 2349.32D# 38.89 77.78 155.56 311.13 622.25 1244.51 2489.02E 41.20 82.41 164.81 329.63 659.26 1318.51 2637.02F 43.65 87.31 174.61 349.23 698.46 1396.91 2793.83F# 46.25 92.50 185.00 369.99 739.99 1479.98 2959.96G 49.00 98.00 196.00 392.00 783.99 1567.98 3135.96G# 51.91 103.83 207.65 415.30 830.61 1661.22 3322.44A 27.50 55.00 110.00 220.00 440.00 880.00 1760.00 3520.00A# 29.14 58.27 116.54 233.08 466.16 932.33 1864.66 3729.31B 30.87 61.74 123.47 246.94 493.88 987.77 1975.53 3951.07

With a (free) “Fourier” spectrum analyzer we can set the pitches

exactly!

14

Pian

o Tu

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

-2

-1

0

1

2

timedomain

frequencyspectrum

Forward and Reverse Fourier Transforms

Destructive Constructive

15

Pian

o Tu

ning

Any repeating waveformcan be decomposed intoa Fourier spectrum.

But that doesn’t mean theysound good…

frequency content determines ‘timbre’

16

Pian

o Tu

ning

Given an arbitrary waveform, how does one find its spectral content (Fourier transform)?

• Collect N samples x dT = T seconds,f0 1/T.

• Multiply the input by harmonics of f0 [sin(2nf0t)], and report 2x the average for each.

eg: 200 x 1/200 = 1 sec

f0 (1 Hz in this case)

2f0

3f0

4f0

1 sec

17

Pian

o Tu

ning

Input 4Hz pure sine wave

Look for 2Hz component

Multiply & Average

2xAVG = 0

200 Samples, every 1/200 second, giving f0 = 1 Hz

1 sec

18

Pian

o Tu

ning

Input 4Hz pure sine wave

Look for 3Hz component

Multiply & Average

2xAVG = 0

1 sec

4+3 = 7 Hz

4 - 3 = 1 Hz

19

Pian

o Tu

ning

Input 4Hz pure sine wave

Look for 4Hz component

Multiply & Average

2xAVG = 1.0

1 sec

4+4 = 8 Hz

4 - 4 = 0 Hz

20

Pian

o Tu

ning

Input 4Hz pure sine wave

Look for 5Hz component

Multiply & Average

2xAVG = 0

1 sec

21

Pian

o Tu

ning

Great, picked out the 4 Hz input. But what if the input phase is different?

0.25

Use COS as well. For example: 4Hz 0 = 30o; sample 4 Hz

2 x (0.432 + 0.252)1/2 = 1.0 Right On!

1 sec 1 sec

sin cos

0.43 0.25

22

Pian

o Tu

ning

From a “math” perspective:

time average is 0, unless = R

23

Pian

o Tu

ning

Signal phase does not matter.What about input at 10.5 Hz?

Sample 2xAverage7 0.098 0.139 0.2110 0.6411 0.6412 0.2113 0.1314 0.09

Finite Resolution

24

Pian

o Tu

ning

Remember, we only had 200 samples, so there is a limitto how high a frequency we can extract. Consider 188 Hz,sampled every 1/200 seconds:

Nyquist Limit Sample > 2x frequency of interest;

25

Pian

o Tu

ning

Fast Fourier Transforms• 100’s of times faster

• uses complex numbers…Free FFT Spectrum Analyzer:

http://www.sillanumsoft.org/download.htm“Visual Analyzer”

26

Pian

o Tu

ning

But first – a critical note about ‘real’ strings (where ‘art’ can’t be avoided)

• strings have ‘stiffness’• bass strings are wound to reduce this, but not

all the way to their ends• treble strings are very short and ‘stiff’• thus harmonics are not true multiples of

fundamentals– their frequencies are increased by 1+n2

• concert grands have less inharmonicitybecause they have longer strings

27

Pian

o Tu

ning

Tuning the ‘A’ keys: Ideal strings

With 0.0001 inharmonicity

Need to “Stretch” thetuning.

Can not match all harmonics, must compromise ‘art’

sounds ‘sharp’ sounds ‘flat’

24);2(4400 nf n

32 f0

33.6 f0

28

Pian

o Tu

ning

(how I’ve done it)

for octaves 0-2tune to the harmonics in octave 3

for octaves 6-7set ‘R’ inharmonicity to ~0.0003and use R(L) ‘Stretched’

.

29

Pian

o Tu

ning

but some keys don’t work…

pianos were designed to come apart

(if you break a string tuning it,you’ll need to remove the ‘action’ anyway)

(remember to number the keys before removing themand mark which keys hit which strings)

“Regulation”Fixing keys, and making mechanical adjustments

so they work optimally, and ‘feel’ uniform.

30

Pian

o Tu

ning

a pain on spinets

31

Pian

o Tu

ning

32

Pian

o Tu

ning “Voicing”

the hammersNOT for the novice

(you can easily ruin a set of hammers)

33

Pian

o Tu

ning

Let’s now do it for real…

pin turningunisons (‘true’ or not?)tune using FFTput it back together