Note Synthesis, Harmonics (Violin, Piano, Guitar, Bass), Frequencies, MIDI

6.2k views Asked by At

I want to find, how notes were built. Example for a Instrument (Violin or Piano), The Note LA4 (A4) has main (or central) frequency FC at 440Hz with a Specific Amplitude AC, but also it must has other frequencies (harmonics?) FH with other amplitudes AH.

The Harmonics have other frequencies that are dependant of Main Frequency with amplitudes (almost) less than the amplitude of Main Frequency.

Forming (building) Notes

I want to know how is formed (established) the notes (No time is considered).

Example: A4 = AC(FC) + AH1(FH1)+ AH2(FH2) + AH3(FH3) + AH4(FH4)....AHn(FHn) Maybe, FH1 = 2*FC, FH2 = 3*FC, FH3 = 4*FC, and so on....

Comparing between instruments (Violin and Piano)

For Piano, The Note LA4 (A4) has main frequency FC at 440Hz, and Maybe, FC(Piano) = FC(Violin), FH1(Piano) = FH1(Violin), FH2(Piano) = FH2(Violin), and so on....

But, AC(Piano) != AC(Violin), AH1(Piano) != AH1(Violin), AH2(Piano) != AH2(Violin), and so on....

Example of my question is: http://www.phys.unsw.edu.au/jw/sound.spectrum.html

I want to play this notes avoiding MIDI format, this can be implemented in Java/C# (or other language programming) Later, and more control of my sounds.

Thank you.

Ana

2

There are 2 answers

0
guidot On

If I understand correctly, you are trying to do a fourier synthesis, hoping that something similar to the original instrument will result. I see the chances for success quite slim:

  • it won't work using midi, since this would require pure sine waves to combine (which are not available by standard MIDI GS instruments)
  • one needs huge amount of data difficult to come by; note, that your coefficients are not specific to "piano" alone but also vary with the pitch, so "piano a5" has different values from "piano a6"
    • this model assumes the stable state of the tone (a different goal is not achievable by adding sine waves); the characteristic of an instrument is however more determined by its attack phase

I would recommend John Pierce, The Science of Musical Sound for an introduction.

0
the_mandrill On

Be aware that what you are undertaking is a huge task. If your goal is to create your own synthesizer that can sound like a piano, violin, etc by adding together harmonics with specific amplitudes then it is incredibly difficult to create a sound that is in any way realistic. The harmonics of an acoustic instrument vary over time in a complex fashion. As guidot notes, the attack and delay parts of sound will be very different. If you try to measure the relative amplitudes of a real instrument at a number of points over time and then synthesise the sinusoids then the best you will achieve is something that will sound like a child's toy.

If that's what you want to do then you will need to analyse the spectrum over time of the sounds you want to emulate. The easiest way I would suggest is using something like Matlab, Octave or Scipy. If you want visualisations then try Sonic Visualiser or Marsyas.

If however you want to create realistic playback then you have two options. One is to use Wavetable synthesis, which is how many cheap synthesisers (especially ones on PC soundcards) work. The other is to look into Physical Modelling Synthesis which simulates the physics of an instrument to create realistic sounds.