Detecting the tuning frequency?

y0, Im using Audacity to change the pitch for some songs, now Im unable to detect the tuning frequency, or standard (concert) pitch of the input signal. Is there any way to have this information?

Also, the right formula for changing the frequency will be: 100 x (new frequency - original frequency)/original frequency ?

thanks :slight_smile:


A song does not have “a frequency”, it has a wide range of frequencies.
To find the “tuning frequency” you need to find somewhere in the song where there is a single note, then you can analyze that note to find its frequency.

For example, if you have the written music for a song and it says that the tune goes:
C, E, Bb, E…
and in the recording the third note is a single note and not a chord, then you can select that third note (which your score says is a Bb) and analyze it to find the actual frequency.
To find the frequency/pitch of a selected note there is a plug-in available here: Missing features - Audacity Support .
Installation instructions: Missing features - Audacity Support

You can then use the “Change Pitch” effect (or “Sliding Time Scale/Pitch Shift”, or “Change Speed”) to adjust the pitch as required.

If you are using Audacity 2.0.5 and you want to change the pitch by a whole number of semitones you do not need to worry about the formula - just enter the number of semitones or use the “from / to” pitch settings. See here for more details: Audacity Manual

Yes, to calculate a precise frequency change, the formula is:
100 x (new frequency - original frequency)/original frequency
but again, if you are using “Change Pitch” in Audacity 2.0.5 you can just enter the “from/to” frequencies and this will be calculated for you automatically.

firstly thanks a lot :slight_smile:
I believe I didn’t explain my self as I wish to.
When I refer to the frequency of the song I mean in general, I don’t understand it my self very well, but I have in my head this example that when I tune my guitar I adjust A4 = 440 hz, from this the tuner calculates all the others and tunes them accordingly to be harmonic with 440hz (I guess so), and if so the whole composition will be “tuned” to the 440 hz, right?

I found some app exactly for what I am searching for(but there is no input for MP3 or FLAC), maybe it will help to explain myself for what I am searching in Audacity:

You are trying to detect the key signature or tonality. Audacity’s Change Pitch only attempts to detect the pitch of the first meaningful note in your selection - nothing more.

You can still detect tonality by ear in Audacity. Select a note (this works best for a solo piece). Play the note. You can tell the scale relationship of the note, for example it’s on the major third of the scale. Open Change Pitch and it gives you the detected pitch. For example, if it says “E” and you heard that the note is the major third, then the key signature is C Major.

That’s a very interesting application - the first one I’ve seen myself that attempts tonality detection. According to that page, a few applications like Audio Mixcraft 3 have licensed the app.

As you may have noticed, there is an online demo of the app that accepts at least MP3 - you have to sign up and log in to upload files: -- audio processing web service .

I assume the “tuning frequency” it detects is the pitch of the A4 (middle A) in the song. If so, you can select middle A in the Audacity waves once you know the key signature and Change Pitch will show you its frequency.


How that?
That’s a rather common feature for all automatic transcription tools, e.g. Audio to Midi in Band-in-a-Box".

Yes but only for single lines?

According to Missing features - Audacity Support , Audio to MIDI is a “challenging research problem”. Is it commonplace now to detect all the MIDI notes in a polyphonic piece such as a recording of Beethoven’s “Eroica”? tONaRT has been surprisingly successful so far in guessing the tonality in the few polyphonic pieces I’ve tried.

What tool do you suggest ATok uses to detect the tonality in MP3 and FLAC audio files?


Not at all commonplace. It is still a very challenging task.

I’ve only tried a few test pieces and found the results moderately successful. It seems a bit hit and miss whether it detects the correct key or a related key.
The tuning detection appears to work well, but that is the easier part of the task.

The most successful method that I have found is to select a note or chord that is the tonic (often the final note/chord of a melody). Then use “Plot Spectrum” and look for the biggest spike. In most cases this will correspond with the key. This method seems to work pretty well, but requires some musical knowledge.