Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Musical note problem

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
AU
I want to make a small app so that a friend of mine who is learning the violin (at the age of 65) can tune it properly.
I need to produce the exact G, A, D and E.

I tired the beep API but it only sounds through the tiny motherboard beeper.

Is there a way of making it sound thru the normal audio output or another way entirely other than playing prerecorded wav files?
 
Ted, perhaps you could go about this a different way. Instead of getting the computer to produce a note and your friend have to tune it, why not get the computer to listen to the note he's playing and say whether it's in tune or not?

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
I could be wrong, but I don't think that's really the way musicians work ...
 
Actually strongm, that is pretty exactly the way many musicians work.
They'll use an electronic tuner that will tell you whether your tune is too high or too low; they will also automatically adapt to the tune you're playing, be it an A or a C or whatever.

That online violine tuner Joe mentioned might be just the thing though.

:)


[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
The subject of musicians using pitch detectors instead of using their ears is one of some controversy.
Such detectors are usually mainly used by amateur or inferior players of fixed pitch devices like guitars because they don't need to be able to tell if an individual note is in tune or not. The fret sets the pitch once the string is tuned.

Use of such musical detectors will inhibit the development of the 'ear' and a true 'musician' will never use them.

Simply if you can't tell if it is in tune or not by your ear you will never become a true musician.

Contrary to popular belief, the ability to determine pitch is a learned thing, not some magical gift some people have and others don't. There is no such thing as a tone deaf person. The more you use your ear the better you will become - just like computer programming!

True, some people are better at it than others but generally because of early environment factors - even to the extent of whether their mother sang a lot when pregnant.

 
if you can't tell if it is in tune or not by your ear you will never become a true musician.
Sorry Ted, but this is simply not true.
Such ability requires perfect pitch. Perfect pitch is a precious gift and not all musicians are gifted with it.
True, it can be developed over time, but if you start late, the odds for that rapidly decrease.
There are loads of famous musicians who do not have perfect pitch.


[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
>Such ability requires perfect pitch

Perfect pitch is normally defined the ability of a person to identify or recreate a given musical note without the benefit of an external reference.

And that's not what we are talking about here. We are talking about recreating a note with the benefit of an external reference.

Certainly all the professional (orchestral) musicians I know tune by ear.
 
I looked at the code for the violin tuner but cant see how on earth it works. It sounds like it is playing a sampled violin sound.

>if you can't tell if it is in tune or not by your ear you will never become a true musician.

I'm sorry but the above IS true, sadly resulting in a lot of musicians that don't really play 'in tune'

I never mentioned perfect pitch which is another thing entirely. It is the relative pitch that is important and if you don't use it, you lose it.

Perfect pitch is an imaginary thing. Such people who appear to have it are either remembering a reference note for the much longer period than normal. Everyone who has sung in a choir can easily remember a note for a short while it's just perfect pitch people remember it much longer.
The same as some people can remember obscure facts or do mental arithmetic (or remember which API to use for an application!)

Alternately you can fairly easily determine any note very accurately be singing the lowest note you are capable of in your mind then jumping up (in your mind) to the one you want. I can generally get to a few cycles from the right note this way. When you have a cold and sing lower you can easily correct for this by singing the note softly.

It is wrong for instance to tune to a piano or electronic keyboard because fifths and fourths must be miss-tuned slightly to achieve keyboard tempering otherwise you can never play them in all keys correctly.

In conclusion I would suggest that tuning detectors only be used for setting the A string and the ear for the others.
 
Well we don't seem to be any closer to getting you a solution Ted, I guess you'd better fork out (ahem) for a tuning fork!

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
>Well we don't seem to be any closer to getting you a solution Ted


Er ... actually, we do. My suggested method as implemented by the code that Hypetia provides in his link above does exactly what Ted requested - which is to play a pure tone of a requested frequency (and duration) from the soundcard without requiring the creation or loading of a WAV file.

i.e it completely answers in the affirmative, with working code, Ted's question: is there a way of making it sound thru the normal audio output or another way entirely other than playing prerecorded wav files?
 
Oh ok, I assumed that since Ted was trying the online tuner and hadn't starred Hypetia's post that none of the suggestions had worked.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
I didn't miss the solution thank you. I am still examining it.

Reading of my later posts would have revealed I was attempting to refute erronious matters raised on musicians and commenting on suggestions on using alternative methods to the problem I originally sought answers for.
 
Reading of all your posts would also reveal no response other than "Should I look elsewhere for this?" to the approach I suggested (a response that would indicate you didn't think that was a valid solution), and no response whatsoever to Hypetia's link.

It's hard for us to read your mind ...
 
Perhaps the answer is for your aged friend to take up some other instrument which doesn't require tuning such as:
a) triangle
b) drums
c) mouth organ
d) xylophone
e) spoons (popular in my area of the world, North Yorkshire)

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top