Concept of Octave Higher
First Harmonic and Second Harmonic Frequencies
Do you wonder how to generate a code that can simulate the Open D string, its first harmonic, and second harmonic?
![](https://static.wixstatic.com/media/4dd2e1_1f3b22eebcbc47d18e7215289a38d2b4~mv2.jpg/v1/fill/w_980,h_471,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/4dd2e1_1f3b22eebcbc47d18e7215289a38d2b4~mv2.jpg)
Here is the ChatGPT-generated Python script. Please feel free to run the script in your myenv environment. Please do not forget to install the numpy and sounddevice libraries.
pip install numpy sounddevice
Tech-awesome: The output of the Python script is the sound of each frequency. We would be able to hear how the Open D string, First Harmonic, and Second Harmonic sound like on the guitar.
Music Theory of Pythagoras:
Distances between notes in a piece of music that sounds good should always be whole numbers. Example:
First Harmonic: Half the length of the open D string shall produce double (2x) the frequency of the open D string.
Second Harmonic: One-third the length of the open D string shall produce triple (3x) the frequency of the open D string.
Observe: Please look at the snippet and divide the first harmonic Hz by the open D string Hz. What is the quotient? Is it a whole number? Do the same for the Second Harmonic.
Divide the second harmonic Hz by the open D string Hz. What is the quotient? Is it also a whole number?
What are your findings and conclusion?
תגובות