It happens that a melody comes to mind and “you can’t knock it out of there with a stake” - you want to play and play, or even better, write it down so as not to forget. Or at the next band rehearsal you learn a friend’s new song, frantically selecting chords by ear. In both cases, you are faced with the fact that you need to understand in what key to play, sing or record.

Both a schoolchild, analyzing a musical example in a solfeggio lesson, and an unfortunate accompanist, who was asked to play along with a vocalist who demands that the concert continue two tones lower, are thinking about how to determine the key of a melody.

How to determine the key of a melody: the solution

Without delving into the wilds of music theory, the algorithm for determining the key of a melody is as follows:

  1. determine the tonic;
  2. determine the mode;
  3. tonic + mode = name of key.

He who has ears, let him hear: he will simply determine the tonality by ear!

Tonic is the most stable sounding level, a kind of main support. If you select the key by ear, then try to find a sound on which you can end the melody, put a point. This sound will be the tonic.

Unless the melody is an Indian raga or Turkish mugham, determining the mode is not that difficult. “As we hear,” we have two main modes – major and minor. Major has a light, joyful tone, minor has a dark, sad tone. Usually, even a slightly trained ear allows you to quickly identify the fret. For self-test, you can play a triad or scale of the key being determined and compare it to see if the sound is harmonious with the main melody.

Once the tonic and mode have been found, you can safely call it. Thus, the tonic “F” and the mode “major” make up the key of F major. To find the signs at the key, just refer to the table of the correlation of signs and tonalities.

How to determine the key of a melody in a sheet music text? Reading the key signs!

If you need to determine the key of a melody in a musical text, pay attention to the signs at the key. Only two keys can have the same set of characters in the key. This rule is reflected in the circle of fourths and fifths and the table of relationships between signs and tonalities created on its basis, which we already showed you a little earlier. If, for example, “F sharp” is drawn next to the key, then there are two options - either E minor or G major. So the next step is to find the tonic. As a rule, this is the last note in the melody.

Some nuances when determining tonic:

1) the melody can end on another stable sound (III or V stage). In this case, of the two tonal options, you need to choose the one whose tonic triad includes this stable sound;

2) “modulation” is possible - this is the case when the melody began in one key and ended in another key. Here you need to pay attention to the new, “random” signs of alteration that appear in the melody - they will serve as a hint to the key signs of the new key. Also worth noting is the new tonic support. If this is a solfeggio assignment, the correct answer would be to write the modulation path. For example, modulation from D major to B minor.

There are also more complex cases in which the question of how to determine the key of a melody remains open. These are polytonal or atonal melodies, but this topic requires a separate discussion.

At the moment, I know of two specialized software products that solve the problem of tonality determination. The first one is Mixed In Key, which, thanks to clever marketing, made a lot of noise in the DJ community. A copy of this program, which has earned favorable reviews from stars such as Pete Tong, costs $58 at the time of writing.

The second product, in the shadow of Mixed In Key, but no less interesting for that reason, is the same Rapid Evolution, with which we are already familiar. In terms of functionality, it is not inferior, if not superior, to MIK, and at the same time it is completely free.

Automatic key detection in Rapid Evolution is very simple. First you need to add the compositions you are interested in to the program library. To do this, in the main window, click on the add songs button. In the dialog box that appears (see left, click on the picture to enlarge) click browse and select a track or folder on the disk. Finally, click add all to add all the tracks in the folder to the library.

Then, in the search table, select the tracks whose keys you want to determine. Click on the right mouse button and in the context menu that appears, select detect, and then key (see below right) to start the process of detecting sentiments. Be patient, because... this will take some time. Finally, in the key column next to the track names, their keys, determined by Rapid Evolution, will appear.

By the way, RE can determine the tonality of not only music files on your computer, but also the “live” signal coming from the linear input of the sound card! This is extremely useful, for example, for determining the keys of tracks in your vinyl collection.

As I said, Rapid Evolution and Mixed In Key are specialized programs for determining keys. At the same time, the growing popularity of harmonic mixing leads to the fact that this function appears in computer emulators of a DJ setup. What has been said above all concerns the well-known Virtual DJ And MixMeister.

To automatically detect the key of a track in Virtual DJ, you need to do two things. First, right-click on the title of the track table at the bottom of the screen and in the menu that appears, check the box next to Key. A Key column will appear in the table, which will later display the keys of the tracks.

Finally, much like Rapid Evolution, select the desired tracks in the table, right-click and select Scan for BPMs (see right). After a short analysis of the tracks, Virtual DJ will display their keys in the corresponding column.

A few words about accuracy. I haven’t tried Mixed In Key in action, but I can say about Rapid Evolution that it is quite reliable, but not always. The creators of RE claim that the program correctly determines the key in 67-71% of cases, which, in general, is not so bad. However, RE identified the key of Martin Solveig – Rejection (Ian Carey Remix) from the previous article as D# instead of D#m.

I cannot vouch for the quality of the Virtual DJ definition, but overall I found it satisfactory. By the way, to determine the keys of the compositions in your collection, it is better to use the same program. Experience shows that even if a product “lies” from time to time, the tones it defines as compatible (more on this in the next article) often turn out to be so in reality.

Online sentiment databases

MixShare . The MixShare website, where Rapid Evolution comes from, has its own database of track information. It is located in the Music section and, apparently, was compiled using the results of the composition analysis of the above-mentioned program.

To access this section, you will have to register, but it is free and fast. Regarding the database itself, the page is very slow, and in it I could not find any of the dance tracks that interested me. Moreover, after a couple of searches, my account was blocked for “exceeding the traffic limit.” Well, maybe you'll have better luck.

Harmonic Mixing Database . The creator of this site took an interesting path. He builds a database of track information by analyzing tracks on Beatport (an online dance music store) in Mixed In Key. At the time of writing this article, there were about 400 thousand tracks in the site’s database, and finding the composition you were interested in seemed like a very real idea.

I will note that the track data on the Harmonic Mixing Database generally seems to be more accurate than the results of the Rapid Evolution analysis. This may indicate a slight superiority on the part of Mixed In Key.

I suspect that you already dream about determining the keys of tracks at night. It remains to learn about the most interesting things: how to translate quantity into quality, or information about the keys of compositions into the ability to create truly smooth mixes. I will talk about this in the last article of the series on harmonic mixing.

If you want to make your tracks more musical, but do not have sufficient knowledge about keys, scales and harmonies, then our article is definitely for you. This set of tools and tricks will help you learn how to add melodies and add bass to any of your songs, using the right notes and without much effort.

Step 1: Determine the Pitch of Your Audio

If you already know what key your sample is playing in or, say, you are building a melody from scratches, you can skip this step. Often, when using sound libraries, the key of the sample is indicated in its name (something like "C" or "Am") or if, for example, you buy a track on a service like beatport, then the key data can be written into the meta data track.

But if you don’t know what key your track is in and still want to add a couple of musical parts to it, you should find out so as not to spoil both the music and your nerves. There are quite a lot of programs that help determine the key of a song, including "Keyfinder", which we will use in this article. It's free :)

Just open the program, drop your audio into it with the mouse and click “Run Analysis”. The key of the track will be determined and shown on the right. By the way, you can throw many files into the program at once and determine the tone of all of them at once. Convenient if you want to create something from a bunch of samples or simply label them for the convenience of subsequent work. By the way, this is what I’ll do as soon as I finish it...

So, let's say the result is a guitar sample in G-flat minor (Gbm). That's all you need to move on to the next step.

Step 2: Choosing the Right Notes

Now it's time to select the notes that we will use for the purposes stated above. Don't panic, no special knowledge of musical literacy is required as long as we have good old Wikipedia! All you need is to download two pictures. Seriously?! Well, the author will not be offended if instead you add this article to your favorites and open it when necessary.

The first picture is for major scales, the second is for minor ones. If your audio corresponds to a key from a minor scale, then a small “m” is added next to its name. (as in the case of Gbm)

If the name has only one capital letter (for example A or D) and there may be symbols # - sharp major and b - flat major, then this, accordingly, refers to major scales.

Of course, there are many more of them, but mostly in electronic music the keys we are considering are used.



Typically each key has 7 notes that you can play that will sound in tune. What you see in the left column are the names of the keys themselves, and the vertical columns show (keyboard style) suitable notes for each of them. At the top are the names of the notes. So basically, the table shows which notes will work in a certain key. The numbers on the notes show their number in a given key and which of them we want to use first :)

If you start with scratches, then in principle you can take any of these keys and play the necessary melodies on it from the provided notes. Or you can just play something first, and then determine the key and work. If you don’t have a MIDI keyboard, you can do this on a regular keyboard, or even with a mouse in piano roll.

If we return to our sample from the first step and try to find its key (Gbm) in the table, then nothing will come of it. But don't panic, let's take a closer look! Looking at the note Gb, we can see that it is the same note as F#. It turns out that Gbm = F#m, although there is no mathematics! Pay attention to this feature so as not to be confused in the future with both this and other keys.

Now is the time to put what you have learned into practice. Take your sample, determine the key and create some amazing melodies. You are completely safe as long as you use the sheet music from the chart!

And if you decide to record a bass line, then now you will have no equal!

But that’s all for now 🙁

In the next article we will talk about chords...

There is such a thing in DJing that beginners don’t always figure out with their own minds. This is harmonic mixing.

What is it for?

This is to make the mix better. I believe that it is better to hear once than to read a hundred times. Let's start with an example:

Like? I doubt it :) Another example:

Now it is clear? :)

How to achieve this?

To achieve the effect and create a truly beautiful and euphonious transition between tracks, you need to know the key of this track (that is, its key), and how to alternate these keys.

Generally speaking, everything has already been invented and done for us, we just need to go and take it.

Mixed In Key and Co.

On the Mixed In Key website you can buy (or find it somewhere on Google for free - it’s a matter of religion) a program of the same name, which scans your music collection and produces a list of songs that can be mixed beautifully.

By the way, the same function is provided by MixMeister Studio and MixMeister Fusion (mixmeister.com), saving the resulting value directly in the library (which is much more convenient, I think).

Traktor DJ Studio, starting from the second branch, can also remember (but not determine!) key in its Track Collection. Can Ableton Live do this? - I don’t remember exactly, I hope for your hint :)

Harmonic circle and Camelot notation

A certain Mark Davis (to whom we all should say a big thank you) invented and wrote down the Camelot notation, grouping the most commonly found tonalities in European culture into a kind of “clock”:

To begin with, it would be a good idea to simply try mixing tracks whose keys are completely the same.

Then you can try moving forward or backward by an hour. That is, if the original track is D-flat Minor (12A), then the next one can be A-Flat Minor (1A) or F-Sharp Minor (11A).

Another experiment is transitions from the inner circle to the outer within the same “hour”, that is, from minor to major and vice versa. Here you need to be careful with the mood of the track: in the middle of a cheerful club house it’s not always possible to throw in some kind of dark electro :)

It can take a long time to explain in words, but the shortest way is direct practice. If the bear does not step on your ear, then it will immediately become clear what is good and what is bad.

Things to remember

On one foreign forum I came across a post where it was said that MixMeister products recognize tonality with an accuracy of up to 70%, in particular, they very rarely distinguish between major and minor. You can blame yourself here - no one canceled the ears, if it “doesn’t sound”, you need to take matters into your own hands. On the website of the same Mixed In Key, many DJs and producers admitted that they had previously used a piano keyboard or a synthesizer (which, by the way, is a much more accurate method, although it requires hearing and time).

Another subtlety is the “tempo-key” dependency. You need to know that if we accelerate or decelerate the track, then every 6% of speed the tone will change according to the direction. If the track was originally 140BPM and in the key of 12A, then slowing it down by 6% will result in 11A.

There is a simple rule: if the difference in speeds is less than three percent, then the tonality of the second track can be taken the same. If there are more than three, one more/less.

And remember Harmonic mixing is not a panacea for creating a high-quality mix, it is just one of the components. The creative component, as well as good taste when choosing music for a set, should never be forgotten.

At the moment, I know of two specialized software products that solve the problem of tonality determination. The first one is Mixed In Key, which, thanks to clever marketing, made a lot of noise in the DJ community. A copy of this program, which has earned favorable reviews from stars such as Pete Tong, costs $58 at the time of writing.

At the moment it is the most popular program, but this is actually a very controversial issue.

The second product, in the shadow of Mixed In Key, but no less interesting for that reason, is the same Rapid Evolution, with which we are already familiar. In terms of functionality, it is not inferior, if not superior, to MIK, and at the same time it is completely free.

Automatic key detection in Rapid Evolution is very simple. First you need to add the compositions you are interested in to the program library. To do this, in the main window, click on the add songs button. In the dialog box that appears, click browse and select a track or folder on the disk. Finally, click add all to add all the tracks in the folder to the library.

Then, in the search table, select the tracks whose keys you want to determine. Click on the right mouse button and in the context menu that appears, select detect, and then key to start the sentiment detection process. Be patient, because... this will take some time. Finally, in the key column next to the track names, their keys, determined by Rapid Evolution, will appear.

By the way, RE can determine the tonality of not only music files on your computer, but also the “live” signal coming from the linear input of the sound card! This is extremely useful, for example, for determining the keys of tracks in your vinyl collection.

As I said, Rapid Evolution and Mixed In Key are specialized programs for determining keys. At the same time, the growing popularity of harmonic mixing leads to the fact that this function appears in computer emulators of a DJ setup. What has been said above all concerns the well-known Virtual DJ And MixMeister.

To automatically detect the key of a track in Virtual DJ, you need to do two things. First, right-click on the title of the track table at the bottom of the screen and in the menu that appears, check the box next to Key. A Key column will appear in the table, which will later display the keys of the tracks.

Finally, much like in Rapid Evolution, select the desired tracks in the table, right-click and select Scan for BPMs. After a short analysis of the tracks, Virtual DJ will display their keys in the corresponding column.

A few words about accuracy. I haven’t tried Mixed In Key in action, but I can say about Rapid Evolution that it is quite reliable, but not always. The creators of RE claim that the program correctly determines the key in 67-71% of cases, which, in general, is not so bad. However, RE has identified the key of Martin Solveig – Rejection (Ian Carey Remix) above as D# instead of D#m.

I cannot vouch for the quality of the Virtual DJ definition, but overall I found it satisfactory. By the way, to determine the keys of the compositions in your collection, it is better to use the same program. Experience shows that even if a product “lies” from time to time, the tonalities it defines as compatible often turn out to be so in reality.


Close