Harmonics into Semitones
- KVRAF
- 2703 posts since 9 Jul, 2015 from UK
Could anyone help me with this one please?
I want to find the difference in semitones for each step of a FFT (just the first 16 or 32)
So if we assume the fundamental is 0st.
The first harmonic is easy, it would be +12st.
The second sounds like it is around +6.5st, but I'm not sure.
Is there a mathematical way to work this out, or does anyone know of a resource I could look at?
Thanks.
I want to find the difference in semitones for each step of a FFT (just the first 16 or 32)
So if we assume the fundamental is 0st.
The first harmonic is easy, it would be +12st.
The second sounds like it is around +6.5st, but I'm not sure.
Is there a mathematical way to work this out, or does anyone know of a resource I could look at?
Thanks.
Jason @ Melda Production
- KVRAF
- Topic Starter
- 2703 posts since 9 Jul, 2015 from UK
Wow, I wish I understood that, ha ha!drewfx wrote:+1 semitone = multiplying the initial frequency by the twelfth root of 2 (in equal temperament).
Would you please be kind and give me the semitone values for the first 16 harmonics?
Jason @ Melda Production
- KVRAF
- Topic Starter
- 2703 posts since 9 Jul, 2015 from UK
I understand what you mean now.drewfx wrote:+1 semitone = multiplying the initial frequency by the twelfth root of 2 (in equal temperament).
This is not what I need, actually.
It has no relation to frequency.
I just need to know how many semitones each harmonic is, in the harmonic series.
Jason @ Melda Production
-
- KVRAF
- 1759 posts since 11 Nov, 2009 from Northern CA
OK, you're basically asking the wrong question (or at least asking it the wrong way, I think).
The frequencies or FFT bins are dependent upon two things: the sampling rate and the number of samples in the audio chunk being analyzed. If I recall correctly (don't have time to look this up right at the moment), the first bin frequency is fs/N (fs is sampling frequency, N is the number of samples). Each higher bin has a frequency of its lower neighbor plus fs/N. The 0th bin is the DC component of the audio chunk.
So, there's no particular relationship between the partials of a signal and the FFT representation. The more bins (the more samples in the chunk) the better chance that an FFT bin will have a frequency that's close to the frequency of a partial, of course.
Was this helpful?
The frequencies or FFT bins are dependent upon two things: the sampling rate and the number of samples in the audio chunk being analyzed. If I recall correctly (don't have time to look this up right at the moment), the first bin frequency is fs/N (fs is sampling frequency, N is the number of samples). Each higher bin has a frequency of its lower neighbor plus fs/N. The 0th bin is the DC component of the audio chunk.
So, there's no particular relationship between the partials of a signal and the FFT representation. The more bins (the more samples in the chunk) the better chance that an FFT bin will have a frequency that's close to the frequency of a partial, of course.
Was this helpful?
-
- KVRist
- 460 posts since 25 Jan, 2016
OK, I might have it (based on the # of semitones in the harmonic series request).
If we start the series from C0 we get:
C0
C1 [+12 semitones]
G1 (+2c) [+19 semitones, plus 2 cents]
C2 [+24 semitones]
E2 (-14c) [+28 semitones, minus 14 cents]
G2 (+2c) [+32 semitones, plus 2 cents]
Bb2 (-31c) [+36 semitones, minus 31 cents]
C3 [+36 semitones]
D3 (+4c) [+38 semitones, plus 4 cents]
E3 (-14c) [+40 semitones, minus 14 cents]
F#3 (-49c) [+42 semitones, minus 49 cents]
G3 (+2c) [+43 semitones, plus 2 cents]
etc.
This is a natural phenomenon as opposed to a musical one, represented by the equation 1+1/2+1/3+1/4...that you showed in your string diagram and demonstrates a form of just intonation as opposed to the equal temperament that Westerners are accustomed to hearing.
Another way to explore the harmonic series is to use an FM synth where you can just select the harmonics to add individually. MPS works great for this and it can go up to 256 harmonics. (Note that the number of harmonics between each successive octave increases, so you get further and further away from equal temperament divisions as you leave the fundamental far in the distance.)
...or maybe I misunderstood you and typed all of this for nada!
If we start the series from C0 we get:
C0
C1 [+12 semitones]
G1 (+2c) [+19 semitones, plus 2 cents]
C2 [+24 semitones]
E2 (-14c) [+28 semitones, minus 14 cents]
G2 (+2c) [+32 semitones, plus 2 cents]
Bb2 (-31c) [+36 semitones, minus 31 cents]
C3 [+36 semitones]
D3 (+4c) [+38 semitones, plus 4 cents]
E3 (-14c) [+40 semitones, minus 14 cents]
F#3 (-49c) [+42 semitones, minus 49 cents]
G3 (+2c) [+43 semitones, plus 2 cents]
etc.
This is a natural phenomenon as opposed to a musical one, represented by the equation 1+1/2+1/3+1/4...that you showed in your string diagram and demonstrates a form of just intonation as opposed to the equal temperament that Westerners are accustomed to hearing.
Another way to explore the harmonic series is to use an FM synth where you can just select the harmonics to add individually. MPS works great for this and it can go up to 256 harmonics. (Note that the number of harmonics between each successive octave increases, so you get further and further away from equal temperament divisions as you leave the fundamental far in the distance.)
...or maybe I misunderstood you and typed all of this for nada!
-
- KVRist
- 77 posts since 1 Aug, 2009
Harmonics are at multiples of the fundamental frequency - 2x, 3x, 4x, 5x, 6x. etc. But other than octaves, they don't match a number of semitones exactly in equal temperament. You can get an idea of what the ratios by looking at just intonation or other non-equal temperament tuning systems.
To figure it out, you just take the frequency ratio and answer the question, "What power do I have to raise the twelfth root of 2 to in order to get that ratio?". The way you do this is to take the logarithm of the ratio with a log base of the twelfth root of 2.
In excel, you can do this like this with an example of the 4th harmonic (4:1 frequency ratio): = LOG(4,POWER(2,1/12)) = 24 semitones or 2 octaves, as expected. The 4 is for the 4th harmonic and the POWER(2, 1/12) is the base of the logarithm: 2 to the 1/12th power, i.e. the twelfth root of 2.
For anything other than octaves, you'll find that in equal temperament the ratios don't match in semitones exactly; everything other than octaves are a little off in equal temperament, which is why other tuning systems can sound clearer.
To figure it out, you just take the frequency ratio and answer the question, "What power do I have to raise the twelfth root of 2 to in order to get that ratio?". The way you do this is to take the logarithm of the ratio with a log base of the twelfth root of 2.
In excel, you can do this like this with an example of the 4th harmonic (4:1 frequency ratio): = LOG(4,POWER(2,1/12)) = 24 semitones or 2 octaves, as expected. The 4 is for the 4th harmonic and the POWER(2, 1/12) is the base of the logarithm: 2 to the 1/12th power, i.e. the twelfth root of 2.
For anything other than octaves, you'll find that in equal temperament the ratios don't match in semitones exactly; everything other than octaves are a little off in equal temperament, which is why other tuning systems can sound clearer.
- KVRAF
- Topic Starter
- 2703 posts since 9 Jul, 2015 from UK
Thanks for everyone taking the time to try and explain this to me.
To be clear the reason I am asking is that, I am making my own harmonic OSC in MSF so I can experiment with per voice modulation for each harmonic individually. Here is a crude mock-up.
So to start with I am making this with 16 OSCs all set to sine. I needed to know at what pitch to set each OSC to make the harmonic series. In this scenario, I will not know the frequency, as I can not know what note someone will press when playing with the synth. So I needed a way to offset each OSC by semitones (and cents)
I believe Werzel came up with the correct solution for me here, thanks
So I will start to experiment with it and hopefully, it will work as expected.
My only worry is this: Will the difference in semitones change depending on which note I input, or will they always stay the same difference apart?
To be clear the reason I am asking is that, I am making my own harmonic OSC in MSF so I can experiment with per voice modulation for each harmonic individually. Here is a crude mock-up.
So to start with I am making this with 16 OSCs all set to sine. I needed to know at what pitch to set each OSC to make the harmonic series. In this scenario, I will not know the frequency, as I can not know what note someone will press when playing with the synth. So I needed a way to offset each OSC by semitones (and cents)
I believe Werzel came up with the correct solution for me here, thanks
So I will start to experiment with it and hopefully, it will work as expected.
My only worry is this: Will the difference in semitones change depending on which note I input, or will they always stay the same difference apart?
You do not have the required permissions to view the files attached to this post.
Jason @ Melda Production
- KVRAF
- Topic Starter
- 2703 posts since 9 Jul, 2015 from UK
Damn, there seems to be no way to do it!
If I use C3 as the note:
Fundamental = 0
1st harmonic = 1oct
2nd harmonic = 1oct, 6.5st (roughly, tuned by ear)
3rd harmonic = 2oct
If I use C4 as the note:
Fundamental = 0
1st harmonic = 1oct
2nd harmonic = 1oct, 7st (roughly, tuned by ear)
3rd harmonic = 2oct
So the harmonics that fall on exact octaves always stay the same distance from the fundamental.
However, the other harmonics seem to change depending on the note input.
I guess this means, I can not manually make my harmonic OSC using a bank of 16 sine OSCs.
If I use C3 as the note:
Fundamental = 0
1st harmonic = 1oct
2nd harmonic = 1oct, 6.5st (roughly, tuned by ear)
3rd harmonic = 2oct
If I use C4 as the note:
Fundamental = 0
1st harmonic = 1oct
2nd harmonic = 1oct, 7st (roughly, tuned by ear)
3rd harmonic = 2oct
So the harmonics that fall on exact octaves always stay the same distance from the fundamental.
However, the other harmonics seem to change depending on the note input.
I guess this means, I can not manually make my harmonic OSC using a bank of 16 sine OSCs.
Jason @ Melda Production
- KVRian
- 710 posts since 7 May, 2002 from Phoenix, Arizona, USA
I was surprised that it didn't work, I tried it the way I interpreted what your goal is and it appears to be working. We must have went a different way about it. Here's an mxxx preset.
-oops turn the volume down!
-oops turn the volume down!
You do not have the required permissions to view the files attached to this post.
- KVRAF
- Topic Starter
- 2703 posts since 9 Jul, 2015 from UK
Ah, thanks.
However, I am trying to make this in MSoundFactory.
Maybe you could have a try there and see if you can solve it?
I played your preset and it sounded ok, however, I did not test it by comparing it to a harmonic OSC to see if each harmonic matches the pitch with each OSC.
However, I am trying to make this in MSoundFactory.
Maybe you could have a try there and see if you can solve it?
I played your preset and it sounded ok, however, I did not test it by comparing it to a harmonic OSC to see if each harmonic matches the pitch with each OSC.
Jason @ Melda Production
-
- KVRist
- 460 posts since 25 Jan, 2016
Sorry jmg8, I'm not in the beta testing group (and would probably fill it up with clueless questions!) so I can't do it in MSF.
Does MSF have a pitch multiplier setting for the oscillators? If so, then you could set each harmonic quite easily.
Fundamental = x1
First harmonic = x2
Second = x3
etc.
If you open up MPS while you are checking things, you can use the Shape tab to check the tuning of your harmonics by selecting whichever one you are testing.
Does MSF have a pitch multiplier setting for the oscillators? If so, then you could set each harmonic quite easily.
Fundamental = x1
First harmonic = x2
Second = x3
etc.
If you open up MPS while you are checking things, you can use the Shape tab to check the tuning of your harmonics by selecting whichever one you are testing.
- KVRAF
- Topic Starter
- 2703 posts since 9 Jul, 2015 from UK
Actually the OSC in MSF works the same as MPS.
I wish there was a pitch multiplier, that would make it super easy.
You calculated the 2nd harmonic to be 1oct, 7st, 2ct
But when I compared it to the harmonic OSC they didn't sound the same pitch. I was pressing C3 for both. It sounded closer to 1oct, 6st, 50ct.
If you get time, would you please check it to see if I am doing it wrong. Thanks for the help.
I wish there was a pitch multiplier, that would make it super easy.
You calculated the 2nd harmonic to be 1oct, 7st, 2ct
But when I compared it to the harmonic OSC they didn't sound the same pitch. I was pressing C3 for both. It sounded closer to 1oct, 6st, 50ct.
If you get time, would you please check it to see if I am doing it wrong. Thanks for the help.
Jason @ Melda Production
