![]() Vibration is called a “cycle,” measured at one full peak and trough of a wave So, something oscillating at 1 Hz is vibrating once every second. Vibrations, we use frequency to describe how often something is vibrating.įrequency is measured in Hertz (Hz), which is simply “how often per second.” ![]() Only for your curiosity, this complex waves are called waves packets and the harmonics can be analyzed using Fourier Analysis.What is frequency? Frequency is “how often” something happens. To do this (it is not easy!) you can read about Fourier Series. You can try to approximate the real sounds as a sum of the frequencies of the harmonic series, using sines. But the real waves are something more complex. Note the example writes every sound as a simple sine wave. The example someone gave on Python will be functional, and you'll obtain a good sound, because fundamental frequency is the most important. Good composers know how to avoid this things by a correct voice conduction. The superposition of sounds can give intensity to a frequency which is not on the chord, making it sound awful. In a chord, you don't only get the sum of all the harmonics of every sound, but an superposition of them, which makes the thing even more complex.įor example, in a orchestra, "undesired harmonics" can arise when metals are playing a big chord. ![]() In order to have a realistic sound you must try to imit the spectrum of an instrument, which is really difficult (and that's why recordings of real instruments are very used). That's why every instrument has its proper soundwave. If you see which frequencies are sounding and which is its intensity when you play A, you'll realize that there're differences. This is the difference between piano and violin, for example. So when you play a note you hear more than one sound. But also the A5 and E5, and C#5, in less intensity (and many more frequencies, with lower intensity). That means that when play, for example A note, the 440 A vibrates very strong. Which ones? The corresponding to the harmonic series. However, on a real string, when you play a violin, for example, a lots of vibrations modes vibrate at the same time. This wave correspond to a vibration mode (the number of cycles of the wave). In an ideal string, a single wave of that type can be propagated. Where $f$ is the frequency of your sound (A4 = 440 Hz, for example) and $k$ is related with string properties, as density. For example, a wave propagating on a string can have the following form: In theory, a wave can be represented as a sine, a simple oscillation. Well, you ask for a "resultant sound" but, in fact, when you play a note, for example A4, not only one sound is played. Sample *= amp1*math.sin(factor*freq1* i)+ amp2*math.sin(factor*freq2*i)+amp3*math.sin(factor*freq3*i)į = wave.open('SineWave_' + str(freq1) + 'Hz.wav', 'w')į.setparams((numChan, dataSize, sampleRate, numSamples, "NONE", "Uncompressed")) NumSamplesPerCyc = int(sampleRate / freq1) import math, wave, arrayįreq1 = 440 # tonic (Hz) (frequency of the sine waves)Īmp1 = 0.2 # amplitude of freq1 sum of amplitudes should be bit depth = 16 Your user input could be used to generate any frequencies for the chord. wav file with a major triad of 440:550:660 Hz using sine waves. Here's a minimum working example of a python program which generates a.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |