Fourier Analysis on musical chords in different instruments

In summary, the conversation discusses the investigation of how the same musical chord can have different sounds on different instruments. The approach to this investigation is suggested to be analyzing the timbre and harmonics of the instruments using Fourier analysis. However, the conversation also mentions the broader and more complicated aspects of western diatonic scale musical theory and the timbre of different instruments. The speaker suggests focusing on one aspect, either the theory or the timbre, and poses a question about why certain instruments have different sounds. Overall, the conversation emphasizes the importance of focusing the inquiry and using tools such as spectrum analyzers to understand the differences in the sound of the same chord on different instruments.
  • #1
dobbygenius
30
10
TL;DR Summary
What approach should I use to analyze chords on different musical instruments using the Fourier analysis?
I wanted to do an investigation about how the same musical chord can have the same pitch but sound different on different musical instruments. Like how chord C major would sound higher played in the electric guitar than a C major played on piano. How should I approach this investigation?
 
Mathematics news on Phys.org
  • #2
When you say higher do you mean in a different octave or that chords sound richer on one instrument over another?

On a piano for example, you can play a C-major chord in 7 different octaves or so. They will all sound different from one another as should be expected.

If the chords are based in the middle octave range then they should largely sound the same except for the richness of harmonics provided by the particular musical instrument.

Computing a Fourier spectrum will show the harmonics too.
 
  • #3
A spectrum analyser would let you look at the frequency content of the input audio. You might be able to see different harmonics or other frequencies that make the same note sound different on different instruments. I have no experience with this myself. You might start with a free Windows PC program and see if that works. Here is a reference.
 
  • Like
Likes hutchphd
  • #4
dobbygenius said:
Summary:: What approach should I use to analyze chords on different musical instruments using the Fourier analysis?

I wanted to do an investigation about how the same musical chord can have the same pitch but sound different on different musical instruments. Like how chord C major would sound higher played in the electric guitar than a C major played on piano. How should I approach this investigation?
This is a very interesting subject and you will learn a lot . It is much broader and more complicated than you may know and I recommend that you first need to focus your inquiry. There are really two aspects to your question and you will need to choose one or the other (both are fascinating).
One has to do with western diatonic scale musical theory, the "circle of fifths" and the idea of "even tempering" the scale. It turns out that one can produce perfect thirds and fifths (i.e. a major chord) for only one Key at a time. If the key of C Major is in "perfect tune", F# Major will not be.
The other has to do with the tambre (timbre) of a note produced by various instruments i.e why do instruments sound different even for the same note. This is linked to the overtone structure. Here is a good starting question: why do an oboe,English horn and clarinet sound different?
Your choice. Have fun
 
  • Like
Likes olivermsun and FactChecker
  • #5
jedishrfu said:
When you say higher do you mean in a different octave or that chords sound richer on one instrument over another?

On a piano for example, you can play a C-major chord in 7 different octaves or so. They will all sound different from one another as should be expected.

If the chords are based in the middle octave range then they should largely sound the same except for the richness of harmonics provided by the particular musical instrument.

Computing a Fourier spectrum will show the harmonics too.
I mean the latter (chords sound richer on one instrument over another). I will start by computing the timbre of different instruments and see if I can compare/find a relationship between them, thank you!
 
  • #6
FactChecker said:
A spectrum analyser would let you look at the frequency content of the input audio. You might be able to see different harmonics or other frequencies that make the same note sound different on different instruments. I have no experience with this myself. You might start with a free Windows PC program and see if that works. Here is a reference.
I've looked into them and I think I can work with it, thankyou for the suggestion!
 
  • Like
Likes FactChecker and hutchphd
  • #7
hutchphd said:
This is a very interesting subject and you will learn a lot . It is much broader and more complicated than you may know and I recommend that you first need to focus your inquiry. There are really two aspects to your question and you will need to choose one or the other (both are fascinating).
One has to do with western diatonic scale musical theory, the "circle of fifths" and the idea of "even tempering" the scale. It turns out that one can produce perfect thirds and fifths (i.e. a major chord) for only one Key at a time. If the key of C Major is in "perfect tune", F# Major will not be.
The other has to do with the tambre (timbre) of a note produced by various instruments i.e why do instruments sound different even for the same note. This is linked to the overtone structure. Here is a good starting question: why do an oboe,English horn and clarinet sound different?
Your choice. Have fun
I will go with tambre (timbre), to answer your question, is it because oboe, English horn, and clarinet have different/unique overtone structures..?
 
  • Like
Likes hutchphd
  • #8
Some years ago, my summer students did a project detecting gunshots from sound clips. They used Processing and the Minim library. There was an application in Minim that performed FFT and displayed the audio frequency spectrum.

https://code.compartmental.net/minim/index.html

https://processing.org/

Here's an example from Minim that computes and displays a dynamic frequency spectrum:

Java:
/**
  * This sketch demonstrates how to use an FFT to analyze
  * the audio being generated by an AudioPlayer.
  * <p>
  * FFT stands for Fast Fourier Transform, which is a 
  * method of analyzing audio that allows you to visualize 
  * the frequency content of a signal. You've seen 
  * visualizations like this before in music players 
  * and car stereos.
  * <p>
  * For more information about Minim and additional features, 
  * visit http://code.compartmental.net/minim/
  */

import ddf.minim.analysis.*;
import ddf.minim.*;

Minim       minim;
AudioPlayer jingle;
FFT         fft;

void setup()
{
  size(512, 200, P3D);
  
  minim = new Minim(this);
  
  // specify that we want the audio buffers of the AudioPlayer
  // to be 1024 samples long because our FFT needs to have 
  // a power-of-two buffer size and this is a good size.
  jingle = minim.loadFile("jingle.mp3", 1024);
  
  // loop the file indefinitely
  jingle.loop();
  
  // create an FFT object that has a time-domain buffer 
  // the same size as jingle's sample buffer
  // note that this needs to be a power of two 
  // and that it means the size of the spectrum will be half as large.
  fft = new FFT( jingle.bufferSize(), jingle.sampleRate() );
  
}

void draw()
{
  background(0);
  stroke(255);
  
  // perform a forward FFT on the samples in jingle's mix buffer,
  // which contains the mix of both the left and right channels of the file
  fft.forward( jingle.mix );
  
  for(int i = 0; i < fft.specSize(); i++)
  {
    // draw the line for frequency band i, scaling it up a bit so we can see it
    line( i, height, i, height - fft.getBand(i)*8 );
  }
}

You can find this sample in the Minim library of examples when running the Processing IDE, using the IDE to download Minim, and checking out the examples menuitem from the File menu. Under Minim FFT, look for AnalyzeSound.

I know there is a more sophisticated app written by David Sanz Kirbis for plotting an FFT spectrum for Android showing the spectrum in a graph with properly labeled axes but I'm at a loss to locate it.

POST SCRIPT -- However, I think this is it:

http://www.therandomlab.com/2013/05/fft-audio-frequency-analysis-with.html
 
Last edited:
  • #9
jedishrfu said:
Some years ago, my summer students did a project detecting gunshots from sound clips. They used Processing and the Minim library. There was an application in Minim that performed FFT and displayed the audio frequency spectrum.

https://code.compartmental.net/minim/index.html

https://processing.org/

Here's an example from Minim that computes and displays a dynamic frequency spectrum:

Java:
/**
  * This sketch demonstrates how to use an FFT to analyze
  * the audio being generated by an AudioPlayer.
  * <p>
  * FFT stands for Fast Fourier Transform, which is a
  * method of analyzing audio that allows you to visualize
  * the frequency content of a signal. You've seen
  * visualizations like this before in music players
  * and car stereos.
  * <p>
  * For more information about Minim and additional features,
  * visit http://code.compartmental.net/minim/
  */

import ddf.minim.analysis.*;
import ddf.minim.*;

Minim       minim;
AudioPlayer jingle;
FFT         fft;

void setup()
{
  size(512, 200, P3D);
 
  minim = new Minim(this);
 
  // specify that we want the audio buffers of the AudioPlayer
  // to be 1024 samples long because our FFT needs to have
  // a power-of-two buffer size and this is a good size.
  jingle = minim.loadFile("jingle.mp3", 1024);
 
  // loop the file indefinitely
  jingle.loop();
 
  // create an FFT object that has a time-domain buffer
  // the same size as jingle's sample buffer
  // note that this needs to be a power of two
  // and that it means the size of the spectrum will be half as large.
  fft = new FFT( jingle.bufferSize(), jingle.sampleRate() );
 
}

void draw()
{
  background(0);
  stroke(255);
 
  // perform a forward FFT on the samples in jingle's mix buffer,
  // which contains the mix of both the left and right channels of the file
  fft.forward( jingle.mix );
 
  for(int i = 0; i < fft.specSize(); i++)
  {
    // draw the line for frequency band i, scaling it up a bit so we can see it
    line( i, height, i, height - fft.getBand(i)*8 );
  }
}

You can find this sample in the Minim library of examples when running the Processing IDE, using the IDE to download Minim, and checking out the examples menuitem from the File menu. Under Minim FFT, look for AnalyzeSound.

I know there is a more sophisticated app written by David Sanz Kirbis for plotting an FFT spectrum for Android showing the spectrum in a graph with properly labeled axes but I'm at a loss to locate it.

POST SCRIPT -- However, I think this is it:

http://www.therandomlab.com/2013/05/fft-audio-frequency-analysis-with.html
Thank you for letting me know about this!
 
  • Like
Likes jedishrfu
  • #10
My student used the Processing IDE to create an android app that they then sideloaded onto an Android tablet.

It would display a live FFT and the students modded the app to trigger when certain specific high frequency sounds were detected that were correlated with known gunshot frequencies. Sadly though, the app would trigger when the student laughed.
 
  • #11
jedishrfu said:
My student used the Processing IDE to create an android app that they then sideloaded onto an Android tablet.

It would display a live FFT and the students modded the app to trigger when certain specific high frequency sounds were detected that were correlated with known gunshot frequencies. Sadly though, the app would trigger when the student laughed.
I saw the video just now, it's so cool!
 
  • Like
Likes jedishrfu
  • #12
dobbygenius said:
I will go with tambre (timbre), to answer your question, is it because oboe, English horn, and clarinet have different/unique overtone structures..?
Also I believe the Flugelhorn and trumpet provide an interesting pair to contrast (If I remember correctly they are the same range but the Flugelhorn taper misses the odd harmonics? And it sounds great)
 
  • Like
  • Informative
Likes jedishrfu and FactChecker
  • #13
hutchphd said:
Also I believe the Flugelhorn and trumpet provide an interesting pair to contrast (If I remember correctly they are the same range but the Flugelhorn taper misses the odd harmonics? And it sounds great)
I see, that's interesting, I'll look into it! thankyou again
 
  • Like
Likes jedishrfu
  • #14
In addition, the attack - sustain - decay envelope is very different from instrument to instrument. If you take a piano note and replace the envelope with that of a violin, the note will sound very much like a violin note.
 

1. What is Fourier analysis?

Fourier analysis is a mathematical technique used to decompose a complex signal or function into simpler sinusoidal components. This allows for the identification of individual frequencies and their amplitudes within the signal.

2. How is Fourier analysis applied to musical chords?

In the context of musical chords, Fourier analysis is used to break down the combined sound of multiple instruments or notes into their individual frequency components. This can help identify the specific notes and harmonics present in a chord and how they contribute to the overall sound.

3. Can Fourier analysis be used to compare chords played on different instruments?

Yes, Fourier analysis can be used to compare chords played on different instruments. By analyzing the frequency components of each chord, it is possible to identify any differences or similarities in the sound produced by different instruments.

4. How does the timbre of an instrument affect Fourier analysis of musical chords?

The timbre, or tone quality, of an instrument can affect Fourier analysis of musical chords by altering the relative amplitudes of the frequency components. This can make it more difficult to identify individual notes and harmonics in the chord, especially if the timbre of the instrument is very different from that of other instruments in the chord.

5. What are some practical applications of Fourier analysis on musical chords?

Fourier analysis on musical chords has various practical applications, such as in music production and audio engineering. It can also be used in music theory to understand the harmonic structure and relationships between chords in a piece of music. Additionally, it has applications in instrument design and tuning, as well as in the study of psychoacoustics and the perception of sound.

Similar threads

  • Art, Music, History, and Linguistics
2
Replies
37
Views
3K
  • Art, Music, History, and Linguistics
Replies
2
Views
1K
Replies
1
Views
2K
  • Art, Music, History, and Linguistics
Replies
12
Views
2K
  • Other Physics Topics
Replies
18
Views
2K
Replies
8
Views
547
Replies
7
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
200
  • General Math
Replies
1
Views
976
  • General Math
Replies
7
Views
1K
Back
Top