Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/26/06 16:02
Modified:
  09/26/06 16:35

Read: times


 
#125098 - How about generating the tones?
Responding to: ???'s previous message
Abhishek said:
Nowadays i'm trying to play violin. The first problem is tuning of violin strings to G,D,A,E notes. How can our friend micro can help me?

It's rather difficult to measure the oscillating frequency of a string. I once want ot build a tuning meter for my stratocaster to get exact tuning. But then I had to notice, that the oscillating frequency isn't stable at all! Immediately after the string is being hit the frequency is highest. Afterwards, when the oscillation slows down, the frequency falls and falls. So, you will never get an exact reading!

Amazingly, the variation of frequency is relevant enough to make the tone to appear mistuned. And furtherly amazing, the ear seems to compensate for that, when tuning the strings by ear. I don't know how the ear does it, but it seems to measure the frequency only during a short interval after the string being hit. I don't know...

So, a simple measuring and calculation procedure might cause more trouble than you expect at this moment.

Would the accurate creation of these tones be an alternative? Can you tune the violin by the methode of beats, where you tune the tones of your violin according to a reference, until the difference of both frequencies turns to zero? If so, you could use the 8052 to create the tones:

The strings of violin are tuned to frequencies, which can be calculated as follows:

fre(G) x 3/2 = fre(D)
fre(D) x 3/2 = fre(A)
fre(A) x 3/2 = fre(E)

This relation '3 to 2' is finally used for the tuning by ear: The third harmonic of the lower tone must beat with the second harmonic of the higher tone. Assuming fre(A) to be 440Hz this yields:

fre(G) = 195.56Hz
fre(D) = 293.33Hz
fre(A) = 440.00Hz
fre(E) = 660.00Hz

Take care, the exact values differ a bit from the frequencies of well tempered tuning, where the tones are at 195.99Hz, 293.66Hz, 440.00Hz and 659.25Hz, which is detectable for a musically trained ear. I guess your tones in India are tuned in a somewhat different way?

Ok, you can use the standard 16bit timer of 8052 to generate the tones quite accurately: Just you take a 11.0592MHz standard quartz and program timer0 to activate the overflow flag bit every half period of tone to be fabricated. Then, just toggle the output pin directly afterwards.

To get precise results you need to toggle the output pin exactly after

2356 machine cylces for 'G',
1571 machine cycles for 'D',
1047 machine cycles for 'A' and
698 machine cycles for 'E'.

The tones are then at

195.59Hz for 'G',
293.32Hz for 'D',
440.11Hz for 'A' and
660.17Hz for 'E'.

Of course, you need to take into account the run time of code lines needed to handle the timer after each timer overflow and to toggle the output pin. So, the actual timer period must be some machine cycles smaller than the above periods.

Kai




List of 31 messages in thread
TopicAuthorDate
Auto Violin Tuner            01/01/70 00:00      
   Tuner            01/01/70 00:00      
      You basically need a phase locked loop            01/01/70 00:00      
   use your ears?            01/01/70 00:00      
      you are right            01/01/70 00:00      
         the bane of much learning            01/01/70 00:00      
   suggested improvement            01/01/70 00:00      
      improved inprovement            01/01/70 00:00      
         Corrected            01/01/70 00:00      
   Drop the violin.. and git ya a fiddle!            01/01/70 00:00      
      how did I guess that came from the state where            01/01/70 00:00      
      Musician Joke            01/01/70 00:00      
   This is normally done by the ears            01/01/70 00:00      
      depends on what you really want ...            01/01/70 00:00      
         Now that *is* clever!            01/01/70 00:00      
            That's a good one !!!            01/01/70 00:00      
            somehow, Andy I got a mental picture of            01/01/70 00:00      
               Well, you do have to remove the BS first            01/01/70 00:00      
      440 Hz source            01/01/70 00:00      
         No suited quartz            01/01/70 00:00      
            I'd recommend a frequency synthesizer            01/01/70 00:00      
               Yes, that's standardly used in such an application            01/01/70 00:00      
                  would that be a problem?            01/01/70 00:00      
                     Jitter?            01/01/70 00:00      
                        years ago ...            01/01/70 00:00      
   strobe tuner!            01/01/70 00:00      
      Costly!            01/01/70 00:00      
   How about generating the tones?            01/01/70 00:00      
      you'll want to filter the output            01/01/70 00:00      
         Are they unwanted?            01/01/70 00:00      
            the string does produce harmonics            01/01/70 00:00      

Back to Subject List