Things I’ve learned, published for the public benefit
Hope This Helps header image

Online Tone Generator

Screenshot of the Online Tone Generator

I made an online tone generator based on the Firefox Audio API HTML5 Web Audio API. It’s basically a large logarithmic slider that allows real-time, smooth frequency changes.

Features

  • Fine-tune the frequency in 1 Hz, 0.01 Hz and 0.001 Hz increments
  • Pick a music note from a list (added Sep 2014, revamped May 2016)
  • Increase/decrease the frequency by one octave (added Aug 2015)
  • Can change the frequency smoothly as you move the slider
  • Keyboard shortcuts (added Aug 2015)
  • Generate a link to a specific tone, so you can share it (added May 2016)
  • Choose sine/square/sawtooth/triangle wave (added Aug 2017)
  • Input frequency as a number (added Aug 2017)
  • Works well on Chrome, Firefox & Safari – including mobile devices (iOS, Android) – requires a browser with support for the Web Audio API.

There are other tone generators on the Web, but they are not as cool (if I do say so myself) and/or they require Java or Flash.

What can you use a tone generator for? You can do a science experiment with resonance, tune a musical instrument, test your new audio system (how low does it go?), test the limits of your hearing (I can hear virtually nothing above 18,000 Hz, even at maximum volume), or figure out your tinnitus frequency to better target therapy.

907 Comments so far

  • Leah

    Your tone generatort is the best I have seen. Would you consider repalcing the drop down menu for selecting a note, by a picture of a piano keyboard, that could be clicked on to select a note. I recently retired from Java programming, and it has been about 10 years since I hav done any web design, so I have no idea how hard this would be. If you are interested in the idea, I would love to help with any grunt needed.

    • Tomasz

      Thanks for the idea. I’ve given it some thought and while a piano keyboard would definitely look better, I can’t think of any functional benefits. In fact, one disadvantage would be that piano keys are quite narrow and it would be difficult to fit the frequency (e.g. “1760 Hz”) on the key. Did you have any particular use cases in mind?

  • Paul T

    Hi Tomasz,
    Thanks for the tone generator. I have used it to investigate the ideas in Ross W Duffin’s book “How Equal Temperament Ruined Harmony” – about the Equal Temperament system now almost universally used in tuning musical instruments, but which mostly does not correspond to mathematically (therefore harmonically) correct frequency ratios for chords.
    (The tip about opening the generator in several browser tabs was key for this!)
    With the tone generator it is easy to hear that the Eq Temp. A major chord (using A440, C#554.36, E659.25) is very different from the pure harmony of the triad played with 440/550/660.

  • Derek Rayburn

    Great Tone Generator. Was looking for something to generate low frequencies to drive away carpenter bees when the tone was amplified through large speakers mounted to my carport but low enough for my neighbors not to notice… this works! It also helped me identify my Tinnitus frequency; 4382hz! I found the freq my dog hates. I found what my laptop speakers are capable of reproducing (not much) and what my wife hates so badly she kept her fingers in her ears. This could be the most useful of my discoveries. However, ironically its the frequency that matches my tinnitus so its just as aggravating to me. I do believe these sine waves are better because Tom polishes them nightly with a special paste. This page has earned a rare bookmark from me!

    • Tomasz

      Derek, many thanks for the report. I’m glad you’ve put my creation to so many productive uses. Off to get my polishing paste…

      P.S. Did you find the special easter-egg frequency that makes you think you are a moose? That one’s fun.

  • Or dobkowski

    HI!
    well done, thanks
    What kind of tuning did you use?
    Because the lower octaves sounded offtune to me….. 🙂
    (A2-B2-C3 sounds weird, to my ear the B2 is too low for example)
    It’s intresting if there is a mistake in frequncies, or is it that the ET tuning is more notcible at such low notes

    • Tomasz

      The frequencies are calculated according to the formula for Equal Temperament (12-TET). For example, B2 is about 123.471 Hz. The frequency is listed next to the note, so you can check for yourself.

      • David Lewis

        Very promising tool BUT read on… I am looking for software which will play frequencies accurately so I can hear Byzantine chant scales – which are quite different from modern western major or minor scales. I was therefore very disappointed to find that doubling the frequency (e.g. A4 at 440 to A5 at 880) does not raise the played note by one octave, but only by about a major 7th. This seems to happen with all frequencies over C4, but C4 itself to C5 sounded OK. I am a lifelong professional singer and choir director with a very accurate ear – it needs to be! This problem, I’m afraid, renders your tool completely useless. Sorry!

        • David

          I don’t understand this comment. A change from 440 to 880 sounds like a perfect octave to me and also agrees with two tuning meters. An octave is a doubling of frequency in any temperament I’m aware of, equal, just Pythagorean etc.

  • Simon

    I liked it a lot maybe one day youll have it setup so that we can download a short sample a few seconds of a whatever tone were looking for huh

  • Markus

    Works nicely! I could hear sounds from around 45~17.600Hz being 20 years old.

  • paki

    I don’t know what tinitus means and why you have made up all this effort, but your tone generator is VERY VERY addictive. I have already spent 2 hours sliding the bar and listening to tones.

  • Dave

    Can I use your tone generator to show people what 50 DB sounds like?

  • Taei Zunnie

    Just wanted to say thanks for a “Great Audio Tool”!

  • elvear

    I just wanted to say thank you! I am using this tool to improve my intonation on the violin by playing a tone based on the key I’m practicing in. It’s a wonderful tool. Again, thank you!

  • Janice Wang

    Hi Tom, we would like to include your online tone generator in an experiment where we will ask people match the taste of food/drinks to a frequency. Would it be possible to embed it in an online survey platform in some way? Thank you!!

    • Tomasz

      Hi Janice. It should be possible to load it in an IFRAME. I understand you’re talking about noncommercial use?

      • Janice

        Yes it’s for an academic study, my PhD topic is the interaction between sound and taste. Would it also be possible to make some modifications to the range of frequencies generated? Please free feel to email me offline as well. Thank you!

  • Jay Johnston

    I wanted to let you know I am using this for Resonant Voice Therapy (used for treating hoarseness). This is the simplest most direct tool I’ve seen to help me get the right pitch. Thanks.

  • joe Sockit

    Most excellent Tomaz! I was about to buy a program to tune my sound system just to get the tone generator function since I have the DB measuring equipment. it didn’t occur to look online as I didn’t think anyone would post something this useful for free. I have been using one of my active crossovers to tune the passive crossovers I built for some mains. Now I can dial in exactly where I need to be component wise to get 1850hz as a Xover point for the horn drivers. Now, to compensate for the impedance changes!!. Thank you!!. I put out CD’s of local bands I do sound for (one CD a month). Tell me what type of music you like and I’ll send you some selections as a thank you for your most useful tool. Shortsville Sound.

  • joe Sockit

    All you youngsters, measure your hearing now and archive it somewhere.
    See where you are in 25-30 years. I’m an old musician and years of standing next to crash cymbals and screaming Marshall amps has my high end down to about 15k, and that is straining. Take care of your hearing my friends!

  • Chris Mel.

    Used it to test DIY led color organ. Thank you very much, job well done!

  • Tomasz

    I’ve just published an updated version of the generator. Here are the most important changes:

    – Added visual “playing” indicator to warn against sudden jumps in volume when you change frequencies
    – Added octave up/down buttons (frequency ×2 and /2)
    – Keyboard shortcuts: Spacebar toggles Play/Stop, Left/Right arrows change frequency (even if slider is not highlighted), Shift+Left/Right fine-tunes frequency by 1 Hz
    – Continued press on button keeps changing the frequency (no longer have to click on Left/Right buttons repeatedly)
    – Adapted to mobile devices – works on iOS and Android (Chrome).
    – Visual tweaks (e.g. retina-resolution images)

  • Jim McKenna

    Simply fabulous!..I restore & repair vintage synthesizers & use Tomasz’ Tone Generator at least twice a day, every day to calibrate them..Many thanks!

  • Greg

    I needed a constant tone to test a flaky VOIP phone connection and this worked great. Thanks!

  • Dirk

    Hey tom 🙂 Very nice tool and it works for me flawlessly 🙂
    The only thing I would like to see added is the ability to phase shift. 180 degrees would serve my purpose 🙂 I have no clue how hard that would be but if it was a simple thing, it would add alot for me 🙂

  • Christina Gabriel

    Thank you! I just got a basic audiogram as the first step toward understanding the tinnitus (+ weird tone at around 1KHz that I hear when I shake my head) that I started to get about a year ago. Your tone generator is an excellent tool for me to understand and validate what the audiologist measured. Now I can see just where my hearing begins to fall off in each ear and then roughly match the tinnitus frequency. I like having a quantitative measurement and I hope this also will help me give the clearest possible description of my symptoms to the specialists for the next steps toward diagnosis and (with luck) treatment. I do recognize that there may be no way to get rid of this, but it’s still helpful to be able to characterize it for myself. Something fun to do to balance being annoyed by the tinnitus!

  • userbarna

    Great great tool! Congratulations for building it! A real example of useful web apps, I found it while looking for exaclty what it does. You can train your ears to learn and recognize frequencies, the words of music! Thank you very much! Regards from Spain

  • cambieroilmondo

    Very nice 🙂
    thanks for that, I used it today in order to test a simple audio frequencymeter!

  • DreamMaster Pro

    This program is an example of perfection, pure sine wave with amplitude that fades up at the start and down at the end.

    I used it to find the frequency of a random (and unwanted) tone that lasts about 1/2 second, occasionally coming from the Atmega1284p processor I’m programming. I now know it’s 291 Hz. Hopefully that will help me locate the source and cause.

    • userbarna

      Lol! I did the same trying to match up to a neigbour vacuum cleaner motor and I remember it was something like five hundred and something Hz. Great great tool! It’d be nice to have a way of training all the notes within an octave, to start, at least, recognizing which frequency belongs to which piano frequency. What do you think?

      • userbarna

        Sorry, I wanted to write “to which piano octave”

      • DreamMaster Pro

        For matching up to piano frequencies, open this tool in another tab at the same time:
        http://virtualpiano.net/

        • userbarna

          Very interesting! Now I have a crucial question: I remember watching a Youtube video talking about the difficulties of tunning a piano and the Well Tempered Clavier… So, this is one more thing that I love about this page, the fact that what you hear are pure tones, pure frequencies, aren’t they?

          So this brings to my mind the question of … as you said, If I start using virtualpiano and train my ear to recognize C4 for instance… Would I be listening to the same tone coming from a piano and other from a guitar for instance? Or do they have little differences in its frequency number? Like 262 (C4) and maybe in the guitar I get 264 or sth?

          Great app and page who has also gathered we people that love pure frequencies, everything is a frequency!

          • DreamMaster Pro

            The frequency would remain the same, no matter what instrument you played it on. For example, A 440 is always A 440 (if correctly tuned). What changes is the other frequencies generated along with it, telling your ear the note is coming from a piano, or a guitar.

            The tempered scale is a compromise, because A-sharp and B-flat (for example) are not quite the same note, yet there is only one piano key to press for both of them. This is why people singing in harmony with no instruments at all can be so amazingly beautiful. It is because they can sing the actual true notes without any tempering at all.

  • Rennie

    It’s excellent for testing out resonant room modes. My current speakers and room love 50-60Hz and man does it resonate there XD

  • Mike

    This is a great tool, thanks for hosting it. Is there any chance you could add a balance slider? I have tinnitus but mostly in my left ear. I do not want to change the settings in Windows because I would like to listen to music at the same time I listen to the tone from your site. Any chance you could add that? And while I am asking, any chance you could add the ability to play more than one tone at a time?

    • Tomasz

      Why would you listen to the tone constantly?
      You can play more than one tone if you open additional browser tabs.

      • motorbit

        |Why would you listen to the tone constantly?

        newer studies indicate that tinitus often is caused by overamplification of the brain. it makes a lot of sense for me, as my tinitus is very close to frequencies i am almost deaf to on my left ear, and my tinitus is also louder on my left ear.

        these studies also indicate that listening to these sounds regularely can make the brain stop that overamplification.
        sadly, i dont have an english source. i did google it (a bit) but my source is german, and there was no transcript.

        anyway. as said, i think it makes sense to me, and in my homebrew understanding it also makes much sense that this overamplification gets triggered by the difference in loudness of a frequency between the left and the right ear.

        therfore, a stereo sound would not cut it. i need a balance setting to try for myself if i can influence my own tinitus this way.

  • Chanayvonne

    Thank you, your efforts are appreciated.

    • CypressTheCorruptOne

      I used this for my science project, it helped a lot! Thanks for your effort!
      However, my head always hurts after..But, that’s the price you must pay for science!

  • Mark

    I just used this wonderful app for a ‘dancing oobleck’ experiment in my science class at uni. I can’t wait to do it with the students when I am teaching primary school. Thanks Tomasz.

  • Steve Rutkowski

    I’ll be using this tone generator for the same reason that was posted last year by ‘Loren’. The only difference is that he was working on tube amps, and I’ll be troubleshooting solid state.
    I bought an older dual trace Tektronix scope yesterday and needed a way to generate a known signal to test it. This app worked perfectly and showed me that I had a fully functional T912 scope with two 10X probes (with all attachments) a scope cover, a Tektronix K212 cart, and all manuals for $50!!

  • Milk Brewster

    Having the parameters selected in the url, with the url updated when the interface is, would allow tabs to reopen with what was set in the last browsing session.

  • Sandy

    Would like to use your tone generator for an experiment with my students. Your volume adjustment is in %. Do you know the decibels of the volume?

    • mclainde

      The decibel is a measure of sound pressure, I think. (If someone knows better, please correct me!) So the volume of the source content (tone generator) cannot be given in decibels, since you are going to play it back through a headphone or speaker or amplifier and speaker combo that will all generate different levels of sound pressure. For instance, you can plug your phone into an amp and generate 110 decibels to fill a stadium, or you can plug it into a mini speaker and produce 20 or 30 decibels.

      • lwilhelm

        I have a similar question. I would like to use this to demonstrate the concept of equal loudness contours to my students. Does the source content amplitude change based on frequency or is it kept the same across frequencies? I realize that my audio equipment will determine the actual sound pressure output that could be measured in dB but if I keep the audio equipment the same and just change the frequency it seems like it could be a demonstration of equal loudness contours (i.e., needing to decrease the amplitude as the frequencies become higher to listen comfortably)

Leave a Comment