You're here:

Welcome to the music lab!

Collection of various tools related to sound in any form - from pure physics to the music theory. Let's experiment, discover, learn and have big fun.

Guitar tuner

Universal instrumental tuner. It's designed to tune instruments like guitar o violin in chromatic scale.

Initializing

How to use it?

To tune Your guitar properly, You must first accept permission for access to microphone of Your device. To do this, simply click 'Accept' button on dialog box in left upper corner. Then just get Your guitar closer to the computer, and play sound of each string to tune it up precisely. The letter displayed on the screen corresponds to each of chromatic scale notes. For example in standard guitar tune, model notes are(from lowest string) E,A,D,G,H,E. LEDs show how far from this note is sound of given string. Red LEDs on left side indicates that string is in lower pitch, so You must bend it up by adequate tuning machines on guitars head. If LEDs on right side will shine, it means that string is to high, so you should loosen it instead, by turning machine in opposite direction. If green LED will light up, the string is in tune, and it's pitch is pitch of displayed note of chromatic scale. You may repeat this process until every string is in right pitch(ex. E,A,D,G,H,E).

How does it works?

The tuner works by comparing the frequency of the sound from the microphone of Your computer to the sounds of the chromatic scale (c, d, e, f, g, and h). Checks each of the frequencies and remembers this, which are most congruent to the frequency received by the microphone. Frequency comparison algorithm is based on calculation of the Fourier transform. Operation of the transformation is in this case multiplying successive points of the input waveform (usually 1 / 44100s on the time axis) to the corresponding values ​​of the sine wave with frequency of reference standard. Then, all those products are summed. The result sum illustrates how wave entered through a microphone is similar to the pattern. The higher the score, the greater the similarity. In order to take account of the so-called phase shift, there is also performed a comparison with the cosine wave reference frequency. Cosine wave is the sine wave shifted by & Pi / 2 (one-fourth of the period). Additionally, program checks slightly higher frequency and lower than the standard frequencies (kind of surroundings of sound reference). This allows catching out of tuned sounds. They are more similar to the sound of sound reference surroundings (higher or lower) than the specific sound scale. Such situations are indicated by the corresponding red LED on the screen. Process of searching right sound is repeated ten times per second, for currently processed sample sound from a microphone.That makes it possible to tune the instrument in real time.

More about this module...

... that is chromatic scale (twelve-tone scale) and scales in general

To well understanding of the concept of chromatic, you must first become acquainted with the concept of the musical scale in a more general sense. Recall that every sound has a frequency expressed in hertz (eg. adopted by convention that the sound "a" in basic octave has a frequency of 440Hz). In theory, we can play sounds freely selected frequencies and create music in this way (I encourage you to self-experimentation with the module "creating signals" available on this site). This effect can also be obtained, by untuning randomly strings of a guitar, or pressing the strings of a violin or fretless bass at random points in the neck. Sounds created in this manner, however, are very specific in perception and far from music, to which we are accustomed and for which the human brain responds positively. Almost all the music, we encounter and that we want to listen to is based on a jumps between the frequencies according to some scheme. Such scheme "choosing" specific frequencies of their infinite spektum is called the scale. Scale which is designating almost all the sounds used practically in music is the title chromatic scale. According to the chromatic scale arranged are, for example, a piano keyboard (including black and white keys), or sounds of guitar string on the each following freet. These sounds are organized in sequence c1, c # 1, d1, d # 1, e1, f1, f # 1, g1, g # 1, a1, h1, c2, c # 2, d2, etc ... (numbers indicate the number of octave 1 ). And music beyond this pattern is practically unheard, except specific music of eastern lands using instruments such as the sitar, where besides tones of the chromatic scale are used sounds between them (so-called quarter tones), and blues, which are often use so-called "blue note" - the sound between the sixth and seventh degrees of the chromatic scale, which is usually achieved by bending the strings. Chromatic scale clearly determines the frequencies that can be used to compose music. And this is very practical, because only these sounds work well together. This rigid definition of frequency, should be understood as the ratio of the initial sound Frequencies scale and not as immutable selection of available frequencies. Because although for simplicity and compatibility of the pitch in the whole world, it was adopted the standard frequency of a basic sound "c1" at approx. 262Hz 2 , we can set the frequency freely (while they are in chromatic scale schema). Interestingly, it does not matter for receiving a scale by human! The most crucial thing connected with human perception of music is in fact the ratio of frequencies of played sounds, not the same frequency. An exception here are people with so-called. absolute pitch. It is a very rare innate skill. Such persons can hear clearly the differences in the frequencies of sounds, in contrast to most people focused on the relationship of those frequencies. So then, people with absolute hearing, may consider a song made in a different key (another reference frequency) for less, or more attractive than the original. For the vast majority of people, the tone is of secondary importance and is heared only as change in timbre, keeping all features of a song unchanged. This property is often used by singers, in order to adjust the key of the song to thir vocal possibilities and the timbre of their voice in different frequencies. Chromatic scale can be understood so as a kind of filter applied to the entire space frequencies and filtering only those in ratio defined by the general formula of a geometric sequence: an = a1 * 1,059463n-1, where an is the frequency of the n-th scale, a1 is the frequency of the first (reference) the degree of the scale.

Chromatic scale is the basis for the creation of all other scales. Like the chromatics, in a way defined by the formula, filtered full frequency range, all other scales filter certain sounds of the chromatic scale. Theoretically, one could not use any additional scales and base on the entire chromatic, however, such a restriction sounds allows you to better organize the construction of a melody and an accompaniment, which is created by selecting the sounds of scales. For example, very often used to create simple melodies pentatonic scale, has only five of chromatic scale tones. This is done according to the scheme - the first step, fourth, sixth and ninth (starting c: c, d #, f, g, and #)3. Another example would be probably the most popular in music - the Ionian scale (or major), which selects seven sounds (c, d, e, f, g, a, h). As I wrote above, a selection of sounds makes it easy to compose and organize songs and improvisations. Many songs of popular music is based entirely on Ionian scale, but there is nothing against to combine multiple scales in many different keys in one song, which is used commonly in jazz, but encountered also very often in classical music, rock, indie, electro, funk, and many other styles. So I invite you to further explore the ocean of music scales, this is a extremely useful thing both in composing and performing in fact all songs. Scales are the basis for improvisation!

1 Octave is the name of frequency ratio, or the interval. The sound, which is another octave is simply twice the frequency. Thus, sound c2, has frequency of approx. 524Hz, and it is c1 octave, cause c1 has frequency of 262Hz. Such multiples appear exactly at the eighth degree of diatonic scale, so the name derived from the Latin "octa", meaning eight. Sounds which are in octave interval, are very similar in perception, constitute a kind of analogy. Complete melody, played in the octave to the original melody, will be received as the same melody, but with a much "higher" timbre. 2 Historically, it is adopted that the standard model sound is 10 degree of the chromatic scale or so-called "a1". Its height is adopted on fixed a round figure of 440Hz. This value as a tenth grade of scale will be possible if the first stage (conventionally named "c1") has a frequency of just 261.626Hz. This is because the chromatic scale is based on a geometric sequence an = a1 1.059463 * n-1, where an is the frequency of the n-th degree of the scale, a1 is the frequency of the first (reference) degree scale. 3 each of the scales, you can start from any sound of chromatic scale. In this manner, the key of the scale is defined. The key is the first note of scale. The procedure that changes the key is called transposition. You can imagine it as moving the filter to the left or right on the steps of the chromatic scale. The scale of Ionic looks in the key of c as follows: c, d, e, f, g, a, h and in the key of D looks like this: d, e, f, g, a, h, So we simply change starting note, then go through the chromatic scale appropriate to the number of scale degrees (here is 7) according to the scheme of the scale (here the first, third, fifth, sixth, eighth, tenth, twelfth).

A bit of history

From the early begining of whole music history, to the fifties of the twentieth century the main and essentially the only method of tuning instruments was so called "tuning by ear".That means manipulating the pitch of instrument until a man judges that it is sufficiently well tuned. It was a technique that requires high skills to distinguish the smallest differences in frequency, as well as remembering the pitch standard. For this reason, it was very useful to have absolute hearing, if You want to bea a professional piano-tuner. Weary tuners were given some useful stuff only when John Shore appeared. He discovered first tuning fork in 1711. The easiest tuning fork fork is basically a piece of metal in the shape of a fork, which thanks to the selection of suitable material of which it is made, emits sound while hit (natural frequency). This sound is fixed and always has the same frequency (typically for tuning fork - 440 Hz, which corresponds to the sound a1). Another version of this tool is is pitchp pipe, which is basically a simple brass instrument, which forms the standing wave and produces a sound of constant frequency. However constantly to properly tune the instrument it was necessary to use help of adequately educated human ear in order to compare the pitch of the instrument with the tuning fork. For a real revolution that allows tuning of instruments without the sense of hearing we had to wait more than 200 years.

Tuner available on our website, is basically a browser-based program that simulates the operation of the physical device for tuning guitars. Before so popular today tuners with electronic LCD displays, based on pure software signal processing disseminated, on music scenes ruled mainly strobe tuners. The first strobe tuner introduced in 1948, the company Peterson Electro-Musical Products with Richard Peterson at the head. The tuner operates in the relatively simple physical principles. It uses rotating wheel. Placed in the circle painted in black and white stripes parallel to the rays of this wheel rotates at a speed corresponding to the reference frequencies (eg. 440Hz for tuning the sound a1). Rotation speed is choosen such, that the black and white stripes alternating exchange in the window at the edge of the rotating disk with a frequency of exactly 440Hz. At the same time the sound is entering to device from the tuned instrument. This sound, is the wave of ear with changing density (higher and lower alternatively), which are converted by the detector into electrical impulses, which turns LED light on and off in same frequency. Because the LED flashes with the frequency of the note played, illuminates the rotating wheel at regular intervals. If these intervals are compatible with those in which the strips on the rotating disc changes, wheel will look like stopped. This means that sound is tuned, if not, it has to be raised or lowered until the stabilization of the strips. Because of the simplicity of operation and accuracy, tuners such as described here are used today, although increasingly replacing them by fully digital, which, although more complicated are much cheaper. The computing power of today's electronic systems can successfully overcome the delay resulting from the need to carry large amount of processing in real time.

Do you know, that...?

  • Tuning fork is a tool used to pitch musical instruments.
  • Since 1939 binding sound for pitching musical instruments is in 440Hz frequency. Formerly it was 432Hz.
  • Laryngologists use tuning forks in 432Hz becouse that's the frequency human body transcribes the best.
  • Three crossed turning forks are in Yamaha brand logo.
  • Tuning fork was invented by lute musician.
Musiclaboratory.net is a website where you can explore the enchating world of sounds and compositions. The site is divided into modules and categories which refers to diffrent aspects of sound world. Here you can find easy and useful tools for musicans (online guitar tuner) or get to know how to play chords that may seem difficult to play at first. You can also familiaraze with concepts of musical theory. If you are into technical issues, there is also a subpage about contruction of various musical instruments and how various sounds are generated. How about seeing graph of your own voice scale on oscillscope or spectrum analyzer? Take your time to discover things that you haven't known about music before. Listen carefully and enjoy!