BoLMar2-3

Table of Contents


FFT A Tutorial on the Fast Fourier Transform

{{ed note This was not posted to Pianotech just the url ---ric}}

From:

http://www.intersrv.com/~dcross/fft.html

A Tutorial on the Fast Fourier Transform
1. Introduction to digital audio
If you are already familiar with general digital audio concepts, you can skip this section.
The most common type of digital audio recording is called pulse code modulation (PCM). Pulse code modulation is what compact discs and most WAV files use. In PCM recording hardware, a microphone converts a varying air pressure (sound waves) into a varying voltage. Then an analog-to-digital converter measures (samples) the voltage at regular intervals of time. For example, in a compact disc audio recording, there are exactly 44,100 samples taken every second. Each sampled voltage gets converted into a 16-bit integer. A CD contains two channels of data: one for the left ear and one for the right ear, to produce stereo. The two channels are independent recordings placed "side by side" on the compact disc. (Actually, the data for the left and right channel alternate...left, right, left, right, ... like marching feet.)

The data that results from a PCM recording is a function of time. It often amazes people that a sequence of millions of integers on a compact disc recording can yield music and speech. People tend to wonder, "How can a stream of numbers sound like an entire orchestra?" It seems magical, and it is! Yet the magic is not in the digital recording; it's in your ear and your brain. To understand why this is true, imagine that you could place a microscopic movie camera in your ear to film your ear drum in slow motion. Suppose the movie camera was so fast that it could take a picture every 1/44,100 of a second. Also, suppose that the images this camera captured on film were so crisp and sharp that you could discern 65,536 (64K) distinct positions of the ear drum's surface as it moved back and forth in response to incoming sound waves. If you used this hypothetical technology to film your ear drum while listening to your best friend saying your name, then took the resulting movie and wrote down the numeric position of your ear drum in every frame of the movie, you would have a digital PCM recording. If you could later make your ear drum move back and forth in accordance with the thousands of numbers you had written down, you would hear your friend's voice saying your name exactly as it sounded the first time. It really doesn't matter what the sound is - your friend, a crowded party, a symphony - the concept still holds. When you hear more than one thing at a time, all the distinct sounds are physically mixed together in your ears as a single pattern of varying air pressure. Your ears and your brain work together to analyze this signal back into separate auditory sensations. It's literally all in your head!

2. Frequency information in a function of time
An organ in our inner ears called the cochlea enables us to detect tonality in the sounds we hear. The cochlea is acoustically coupled to the eardrum by a series of three tiny bones. It consists of a spiral of tissue filled with liquid and thousands of tiny hairs. The hairs on the outside of the spiral are longer than the hairs on the inside of the spiral. In fact, the hairs get gradually smaller as you wind your way around the spiral to the inside. Each hair is connected to a nerve which feeds into the auditory nerve bundle going to the brain. The longer hairs resonate with lower frequency sounds, and the shorter hairs with higher frequencies. Thus the cochlea serves to transform the air pressure signal experienced by the ear drum into frequency information which can be interpreted by the brain as tonality and texture. This way, we can tell the difference between adjacent notes on a piano, even if they are played equally loud. The Fourier Transform is a mathematical technique for doing a similar thing: resolving any time-domain function into a frequency spectrum, much like a prism splitting light into a spectrum of colors. This analogy is not perfect, but it gets the basic idea across.
3. The Fourier Transform as a mathematical concept
http://www.intersrv.com/~dcross/fft.html

The Fourier Transform is based on the discovery that it is possible to take any periodic function of time x(t) and resolve it into an equivalent infinite summation of sine waves and cosine waves with frequencies that start at 0 and increase in integer multiples of a base frequency f0 = 1/T, where T is the period of x(t). Here is what the expansion looks like:
 

An expression of the form of the right hand side of this equation is called a Fourier Series. The job of a Fourier Transform is to figure out all the ak and bk values to produce a Fourier Series, given the base frequency and the function x(t). You can think of the a0 term outside the summation as the cosine coefficient for k=0. There is no corresponding zero-frequency sine coefficient b0 because the sine of zero is zero, and therefore such a coefficient would have no effect.
Of course, we cannot do an infinite summation of any kind on a real computer, so we have to settle for a finite set of sines and cosines. It turns out that this is easy to do for a digitally sampled input, when we stipulate that there will be the same number of frequency output samples as there are time input samples. Also, we are fortunate that all digital audio recordings have a finite length. We can pretend that the function x(t) is periodic, and that the period is the same as the length of the recording. In other words, imagine the recording repeating forever, and call this repeating function x(t). The duration of the repeated section defines the base frequency f0 in the equations above. In other words, f0 = sampling rate / N, where N is the number of samples in the recording.

As a concrete example, if you are using a sampling rate of 44100 samples/second, and the length of your recording is 1024 samples, the amount of time represented by the recording is 1024 / 44100 = 0.02322 seconds, so the base frequency f0 will be 1 / 0.02322 = 43.07 Hz. If you process these 1024 samples with the FFT, the output will be the sine and cosine coefficients ak and bk for the frequencies 43.07Hz, 2*43.07Hz, 3*43.07Hz, etc. To verify that the transform is functioning correctly, you could then generate all the sines and cosines at these frequencies, multiply them by their respective ak and bk coefficients, add these all together, and you will get your original recording back! It's a bit spooky that this actually works!

4. The Discrete Fast Fourier Transform algorithm
The discrete FFT is an algorithm which converts a sampled complex-valued function of time into a sampled complex-valued function of frequency. Most of the time, we want to operate on real-valued functions, so we set all the imaginary parts of the input to zero. If you want to use my source code, here are some things you need to know.

Your input arrays and output arrays all must have a common size, which we will call n.

[ Top of Page ]


BoL to EoL (Editors)

Please note that the name is now EoL as explained in [ Announcing EoL ]

[ Top of Page ]


Announcing EoL (Richard Moody)

----- Original Message -----
From: Richard Moody <remoody@midstatesd.net>
To: Pianotech <pianotech@ptg.org>
Sent: Sunday, March 04, 2001 1:35 AM
Subject: Announcing EoL

If you ever wondered how a digest of Pianotech posts with an interactive toc
(table of contents) would be, your dream is about to become true.

Pianotech is already offered in at least two forms; a continuous post by post
version curtesy of PTG software, the efforts of Andy Rudoff and the ECC
(electronics communication committee) and a digest of those posts compiled
automatically and sent out once every twenty four hours.

When I saw the digest version I wished there was a table of contents that was
hyper linked to the topics, so that I could click on the topic and go directly
to the content without having to scroll down through all the posts. After
learning the basics of html
(hypertext mark up language) I realized it would be a daunting task to do this
day after day. Finally I found a quick and efficient program that allows you to
create a table of contents and link it to the subject matter automatically

I gave it a whirl and liked the results and announced it (once or twice) to the
list back in Dec. Since then an html digest has been prepared and sent out to
the "pioneer subscribers" about every other day. This settled the question if
it could be done at all and also what kind of effort it would take. Now the
remaining question is how much interest there is in such a list.

If you are interested in this project please send an email to

                remoody@midstatesd.net

You will receive about every other day EoL, which can stand for "Essence of
List"
"Edited List", or "E List" as in "ezine" or "e-commerce". This will be emailed
as an attachment that will (should) open in your browser when you click on it.
There you will be able to click on the subject you are interested in and be
taken directly to the post or posts on that topic. If you do not wish to
subscribe I hope very soon to announce an archive of past EoL at a personal
website.

The purpose of EoL ultimately will be up to its members. Right now it consists
of pertinent posts from Pianotech List relating to the profession of Piano Tuner
Technician, with the busy practicing professional in mind when selecting posts
which are edited for clarity, repetition, redundancy, grammar and spelling.
(this encourages posts from those with English as a second language). As a
digest it eliminates posts that are mistakenly posted or unrelated to pianotech,
off topic subjects, personal comments, and material that is duplicated (as in
email quotes) from other posts. As an edited digest it contains the "best
answers" to questions by combining duplicate responses, or choosing the best of
4 or 5.
The topics are arranged in cognizant and logical subject lines.

Such a digest must necessarily profess (at least) a criteria of selection. As
mentioned before the busy professional technician is the target audience, so if
it is in Reblitz, or Braid White, or any of the many technical manuals it
doesn't really need to be on EoL.
Of course there is always a new twist, or angle or development to an old process
or procedure, or a better way of explaining so these hopefully will be included.
A key word here is update. The specifics of selection though will be up to the
EoL membership.

I suppose the best way to get an idea of what EoL is all about is to subscribe
for a while and see. EoL is not intended to replace Pianotech List which would
be impossible because EoL can only exist from posts to Pianotech List. A policy
I favor is that nothing on EoL will appear that hasn't before been posted to
Pianotech. EoL is intended to fill a niche that is created when a "free" and
"open" mail list grows to the point where some (read enough) of the members
desire an additional edited digest of the "essence of the list". ---ric

remoody@midstatesd.net

[ Top of Page ]


Prelude # 1 Bach in two temperaments wav (Marcel Carey)

----- Original Message -----
From: Marcel Carey <mcpiano@globetrotter.net>
To: <pianotech@ptg.org>
Sent: Saturday, March 03, 2001 8:47 AM
Subject: Re: Prelude # 1 Bach in two temperaments wav.

"L'achri-connu" looks like a typo and should read "l'archi-connu" which means
the all famous or too well known.
"téléchargez les fichiers sonores" means "download the sound files".

Marcel Carey
Marcel Carey, accordeur technicien
(819) 564-0447
mcpiano@globetrotter.net
----- Message d'origine -----
De : "Richard Moody" <remoody@midstatesd.net>
À : "Pianotech" <pianotech@ptg.org>
Envoyé : 2001-mars-03 00:50
Objet : Prelude # 1 Bach in two temperaments wav.

>
............................................................................
....
> ..
> http://193.51.78.161/thmusique/temperaments/exmus.html
>
> J'ai choisi de vous faire entendre les 19 premières mesures de
l'archi-connu
> premier prélude du premier livre du Clavier bien tempéré de Bach, jouées
en
> accords (et non en arpèges comme dans la partition originale) dans deux
> tempéraments différents (téléchargez les fichiers sonores, vous pourrez
les
> écouter, par exemple avec SoundMachine):
>
............................................................................
....
> .
>
> Forgive my French but the above roughly says that the first 19 measures
from the
> Prelude #1 from WTC is rendered into chords formed from the arpeggios, and
then
> played in two different temperaments. If someone would give a complete
> translation si vous plait , merci beaucoup. like "de L'acrhi-connu" or
> 'telechargez les fichiers sonores,"
> ---ric

[ Top of Page ]


Erard Piano Questions (Fred Sturm)

----- Original Message -----
From: Fred Sturm <fssturm@unm.edu>
To: <caut@ptg.org>
Sent: Thursday, March 01, 2001 1:04 PM
Subject: Re: Erard Piano Questions

Some specific responses inserted in the text below:

Stickney, Jeff P wrote:
>
> List,
>
> I serviced a 1912 Erard grand piano today, and have a few questions for you
> who have more experience with pianos of this variety than I. First
> question: Was this piano designed/scaled to be tuned to 440?

International pitch standard was A435 at the time. The piano should take
440 just fine, assuming no structural defects (like cracked plate).

> Would this
> piano have originally had quite small tuning pins? It does not look like
> the pin block was replaced although the current pins seem to be 2/0 - my
> Hale #3 tip (which I use on most pianos) has a quite sloppy fit, and the #2
> tip (which I usually use on Shimmel's, etc.) is just right.

I would expect 1/O or smaller, originally. I'd pull one of the loose
ones (that is slipping), measure it with micrometer, and replace with a
size or two larger.
>
> Second question: Although they didn't ask, would there be any special
> value/interest in this piano? The action has a wooden frame, the shanks are
> attached to individual brass flanges, and the back checks are metal and come
> up through the forked end of the shank just before it attaches to the
> hammer. The back checks catch on leather which is wrapped around the forked
> opening opposite the hammer (a picture is worth how many words??). The
> dampers rest underneath the strings and are pulled *down* by some spoons
> which protrude from the back of the action.

Erard is kind of like the European version of Chickering. Always
experimenting with everything, so there is never a standard, and
replacement parts are problematic. I would downplay the "special"
"antique" etc value. There are plenty of instruments of it's ilk in the
attics and drawing rooms of Europe. Kind of like squares here in the
U.S.
Fred Sturm
University of New Mexico

[ Top of Page ]


Overs piano review and prices (newspaper article)

----- Original Message -----
From: Ron Overs <sec@overspianos.com.au>
To: <remoody@midstatesd.net>
Sent: Friday, March 02, 2001 12:50 AM
Subject: Concert review

From; The Australian, Sat Feb 17

THORPEDO OF THE PIANO WORLD

It's not every day you're asked to clap a piano-maker. So it was
refreshing to hear Australian improvising trio The Necks requesting,
and receiving, applause for Sydney piano-maker Ron Overs during a
recent gig, in which they gave his new instrument a public test drive.

Fifteen years in development, the Overs-Steinbach Piano One (the only
one Overs has so far completed) is a special instrument. You recall
swimmer Ian Thorpe's fast suit? This is the fast piano - an
instrument that reduces the amount of energy lost to the player via
friction by as much as half. One reason is that the keys, once
struck, return to the resting position much faster, "enabling the
pianist to play more notes per second", says Overs. This also means
it produces more volume for less effort.

Says Necks bassist Lloyd Swanton: "At high volume it seemed
limitless, where the note seemed to almost bend back on itself and it
really seemed to give extraordinary depth." His colleague, pianist
Chris Abrahams, has a way of creating otherworldly overtones by
repeating note clusters incredibly fast, and while these can be
produced on any good instrument, the Overs-Steinbach is particularly
suited to the technique.

The Necks are not alone in being fans: classical pianist William Chen
told Overs that the instrument is the fastest he has every played.

Cost: $70,000 (a Steinway of similar size is around $140,000). See
www.overspianos.com.au

Lynden Barber
The Australian, Feb 17 2001
--
Overs Pianos
Sydney Australia
________________________

Web site: http://www.overspianos.com.au
Email: mailto:ron@overspianos.com.au
________________________

[ Top of Page ]


Bass String Making from Sanderson class (Richard Oliver Snelson)

----- Original Message -----
From: Richard Oliver Snelson <rsnelson@dave-world.net>
To: <pianotech@ptg.org>
Sent: Friday, March 02, 2001 9:54 AM
Subject: Re: splicing bass strings

Hello Ron, I just attended a class taught by Al Sanderson and his son
David on the subject of strings and winding problems. They had studio
recording of piano strings with various "unwraps" and other problems. It
was very easy to hear the big change in the sound as the strings
inharmonicty is increased by removing the wrap. They were making the
point of how important it is to get the copper closer to the end
termination's. As we all know that doesn't always happen when you send a
string to be duplicated.

Sandersons sell a set of small tape measures that hook on the bridge
pins and help to get uniform string length measurements.

Can you unwrap? Sure. Will it change the sound. Yes. I would take care
and not unwrap past the point were the string is swaged. This will get
you a loose wrap pronto if you do. Sanderson's have a patent on their
swaging method. It's a triangle shape instead of the normal flat swage.

Dr. Sanderson does the scaling for string replacement and then Sanderson
Accu-Strings , David Sanderson, does the winding.

Their class made me aware of string problems I had been facing, where
all help and advice had pointed to voicing the problem out.

Richard Oliver Snelson
Oliver Piano

[ Top of Page ]


Cost of Bass Strings and Sanderson (Terry Farrell)

----- Original Message -----
From: Farrell <mfarrel2@tampabay.rr.com>
To: <pianotech@ptg.org>
Sent: Saturday, March 03, 2001 4:32 AM
Subject: Re: Only one bass string scale for the M&H AA?

Not so Dale. At least not with David Sanderson. I don't know what GC or Ari
Isacc charge for their strings, but the last job I did on a small (really
small - 55 wound strings!) grand cost $440 for the Sanderson set. I looked
up in the catalog and see that I could have gotten by with $180 for a Schaff
set of strings. Although, I guess it would actually have been $24 less,
because I would have had 8 fewer wound strings from Schaff. I always have
David rescale my pianos and on this particular one, he added four bicord
wound notes (8 strings).

So, I guess the premium do cost more - perhaps up to about $260 more. BUT,
your point is still valid. These strings sound WAY better. They match sooooo
well and are so smooth. He does perfect lengths every time (only one time
did he make a boo-boo - started the winding in the wrong place on one
string - I had the replacement within 24 hours with one phone call).

IMHO, with the final results firmly in mind, it is still a small difference
in price to pay for a BIG difference in the quality of your product. I guess
one just needs to look at the overall quality of their work, and pick a
supplier that is consistent with it. ;-)

Terry Farrell
Piano Tuning & Service
Tampa, Florida

[ Top of Page ]


Rippen, Lindner info (Tony)

----- Original Message -----
From: tonythetuner <tonythetuner@ntlworld.com>
To: <pianotech@ptg.org>
Sent: Friday, March 02, 2001 10:20 AM
Subject: Re: Rippen Upright

Hi,
This piano may be labelled Rippen, but it is actually a Lindner, pronounced
lintner. Rippen pianos are actually made in Holland and are quite nice.
Lindner pianos are made in Ireland and are quite horrid. Yes Glue is the
only way out of this. Repairs to these are a nightmare. There are no spares
available. The company is long gone, and were a breed unto themselves. They
are vile to tune as they are terminally false. The plastic keys are operated
by spring steel on the balance rail. This is stronger than the plastic key
which eventually breaks. Shortly after that the rest break. THERE IS NO
SOLUTION TO THIS!
So once you run out of ingenuity the customer will have to scrap what looks
like a not very old piano.
Jolly good luck old chum!
Regards, Tony.

----- Original Message -----
From: Ralph Black <ralphbl@mindspring.com>
To: <Pianotech@ptg.org>
Sent: Friday, March 02, 2001 2:43 PM
Subject: Rippen Upright

> I need some input about this piano. In ten years of work, I had never seen
> one of these until this week. Pierce shows it as a Dutch company but this
> was made in Shannon, Ireland. The challenge is that the hammer butt of one
> key (F#3) is loose and flopping around. The bridal strap is glued at both
> ends and is a string rather than cloth tape; there do not appear to be any
> screws holding the butt to rail. The rail is sort of "U" shaped and the
> butt appears to just fit or clip in. Unfortunately, it will not stay! So,
> how does one secure it so that the key will function? (Other than
gluing.)
>
> On this instrument, the entire key is plastic! Lots and lots of plastic!!!
> But that's another story.
>
> Any input gratefully received.
>
> Thanks,
> Ralph Black
> Nashville
>

[ Top of Page ]


Welcome New EoL Members

Welcome to EoL, an edited html version of Pianotech list.

        The first thing to know is if everyone is getting EoL to work. It is sent as an attachment to an email. By clicking on the attachment icon it should open up in your browser. You might be presented with a choice to save or open. If you choose "open" you should see a table of contents in blue print. By clicking on a line you are taken to the text of that topic. If you choose "save" you will be presented with a pop up box asking for a name to save it as and where to save it. This you should not need to do unless you want to archive EoL outside your email software.

        If you have any trouble accessing EoL in its html form please let me know right away. Please give the name of your software and version. I am anxious to know if there are any Mac users and how they are able to see EoL.

        I do not have EoL archived at a web site yet. I may try at a free site I am still trying to get the hang of at Lycos. There is a possibility of applying to PTG for web archive space. With EoL sometimes having a two day lag some members may wish to view the archives rather than actually subscribe.

        EoL is free. However if you feel like contributing something, offers for turns at editing will gladly be accepted. It is actually very easy with the software I am using. It is called Note Tab and costs only $9.00. There is a "Pro" version for $19.00 but I only use the nine dollar one. It even has a great spell heck! ; )

        What appears on EoL is chosen from Pianotech list. I would like to include material from the CAUT list but feel I should get permission first and only if EoL actually looks like it will continue. The criteria of selection is based on what is useful knowledge to the practicing piano technician. Beyond that members should have input as to what they would like to see included.
For now I am not including refinishing posts unless it is very general. Also not much on ETDs unless it has a broad range of interest. But that is not to say that specific material can't be included. If several SAT users were to say, "we think so and so's post should be on EoL" no problem, it is actually easier to include posts than mulling about passing them over.

        Member input is vital so if you have questions, suggestions, comments, please send them in.
Those strictly related to EoL will be kept on EoL in a topic line such as this. If you want to reply to a post on EoL that should be sent to Pianotech. If you are subscribed only to EoL and want to post to Pianotech I can forward it for you. ---ric

remoody@midstatesd.net

        

    ---ric

[ Top of Page ]