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

  • Mark

    Wow. I test square waves for my piezoelectric buzzer and so far it works great. Awesome site.

  • Jack

    Hmmm. It might just be my computer, but this sounds a little sharp. 440Hz to my ears sounds like 435 on this device. It might just be me, but maybe someone can look into this?

  • Stepan

    This is brilliant. I wanted to match a gamma frequency tinitus and this worked! Gamma should be nested in theta or alpha, whereas tonic gamma indicates pathology and there are many other than just Alzheimer’s. Jay Gunkelman talks about this on YouTube.

  • Jeff Keen

    This is a fun website. Is there a reason the default frequency is set at 440 Hz?

  • Antonio Pina

    I start to play with frequencies to my dynaudio bm15a monitors, and after a while I breakdown my monitors!!!!
    Both stoped, it blow some fuses and more…!!!

  • Arnaud-Alexandre Kozic

    Hello,
    I use your tone generator with my pupils in physic’s lesson in middle school in France (age 10 to 15 y old)
    Thank you for this useful tool.

  • Metten

    Hi there,
    I use the online tone generator with a Rubens tube. One thing I could not find is an option to produce multiple frequencies. I have to use a frequency generator app on my cellphone to do this. It is for showing the effect of beats. Is it possible for you to upgrade the tone generator to a multiple tone generator?

  • Érik

    I leave in Brazil
    And i try write my opinion
    Good, must functional, easy and clean interface
    Congratulation

  • Dawid

    Dziękuję za darmowe i bardzo przydatne narzędzie jakim jest generator tonów online.
    Pozdrawiam.

  • John Cadd

    I am delighted with this wonderful tone generator but it only worked for ten minutes and then the sound stopped. I have an old Acer Aspire on Linux and Chrome. Hope it will crank up again soon . I`m missing it already . I sent $5. within minutes of finding the generator . It`s not much but it`s early days yet .

  • John Cadd

    I could not get it to worl properlt on my pc but then tried headphones and it`s perfect.
    There must be some circuit that interferes . Great site . Thanks .

  • John Hardegree

    This is a fantastic resource! I have two distinct forms of tinnitus, and I also I’m a writer on Quora.com. Just a few minutes ago, I wrote an answer to someone who is asking how they can explain to someone what their tinnitus sounds like.

    I did a search and found this site and was able to generate two web links that when played together, do a very good job of approximating what I actually hear most of the time.

    Two suggestions I would have, would be that you move the arrow buttons that raise or lower the frequency. The way they are now, when trying to fine-tune the frequency using those arrow buttons, it’s very difficult to avoid hitting the text field that contains the actual frequency.

    (Using chrome on my cell phone)

    Also, the slider that allows you to control frequency by siding left to right and also the volume slider, are extremely sensitive, and very difficult to use accurately.

    That’s just constructive criticism, but please don’t let it detract from the fact that I really seriously appreciate you making this available. I sent a little something to you with PayPal, to help out a little.

    Also, I put links to the two tones that I hear, in my answer on Quora. I also at the bottom said that I would appreciate it if people would donate to your site, and I put a link for that as well. I assume that’s okay with you, but if not let me know and I’ll change it in any way that you want me to.

    My tinnitus answers don’t usually get a whole lot of views, so don’t expect to get rich or anyting but maybe a couple people will donate based on that.

    I put the link to my quora answer in the website field above.

    Thanks again!

    • Tomasz P. Szynalski

      Thanks for the donation, John, I appreciate it. I agree that the up/down buttons are too close to the frequency readout. I’ll probably add more space to prevent accidental clicks. The sliders on mobile will always be harder to use than on your computer due to the small screen size. On my phone, they work well enough, especially given that you can fine-tune the frequency using buttons. The sliders are third-party components. It’s possible that they could be improved if I made my own sliders from scratch, but that would take a fair bit of time, so it’s probably not going to happen soon. Also, there’s no guarantee that the granularity would be any better because it could be an issue with how touch is implemented on mobile devices. It’s quite likely, in fact.

  • Chris K

    dear tomasz,
    very nice feature to choose the music notes.
    it would be perfect if it could be combined with an option to choose A4=440Hz, 441Hz, 442Hz 443Hz or 444Hz.
    I use this to practice intonation on my saxophone, but often i need to play in tune with A4=442Hz or 443Hz – would be amazing to be able to set it to other values and then choose any note from there..
    is it clear what i’m saying? 😉
    thanks anyway for this great site!!
    chris

  • tom hennessy

    I’m presently using a light and sound brand wave entrainment machine to help my wife with her Alzheimer’s. The 40 htz frequency has been reported to be beneficial so I tune the device to 40 htz and run it for 30-45 min. I’d like to over lay this with your tones. I can input to the device from a cd or a cassette. Is there a way I can down load one or more of your frequencies and try this out?
    Thank you
    Regards
    tom hennessy

  • Graham Dudfield

    Excellent . Just what I have been looking for.

    I have just had (very expensive ) hearing aids fitted and I have been testing with the different frequencies with and without the aids.
    When I had my hearing tests, the Audiologist randomly pick frequencies, volumes and L or R ears, sort of a blind testing.
    the standard test frequencies are
    500,1000,1500,2000,3000,4000,6000,and 8000hz
    Not sure why they dont test a lower frequency say 200Hz.

    I think that with this website I can test my own hearing more accurately by setting the frequency and turning the volume up and down (on the computer) and recording the lowest volume which I can just hear for each frequency for each ear. (I needed to have the volume on the generator set to 25%)

    I have also found my Tinnitus frequency by sliding the Hz up and down , finding the point where the tinnitus sound disappeared . 2349Hz in my case.

    Not sure why the Audiologist didn’t do this.

    So I’m going to take the results to my Audiologist and have my aids fine tuned
    on the basis of my tests, and also recommend that they look at the website.
    Donation coming thank you

    Cheers Graham

    • Tomasz P. Szynalski

      Hi Graham,
      Thanks for the donation.
      Actually, I don’t think the results will be more accurate, because the speakers on which you’re listening have a non-flat frequency response, which will skew the results. Also, you don’t have an absolute reference — there’s no way to tell how loud (in dB SPL) the sound that reaches your ear is. All you can do is compare your hearing at e.g. 8 kHz with your hearing at 1 kHz. But if your hearing is impaired at both 8 kHz and 1 KHz, you won’t be able to detect it.
      Tomasz

  • Jodro

    Nice and simple layout. Been using this squarewave to drive my solid state tesla coil. At high frequencies my touch screen stops working so i’ll be using hardware soon. Until then, Szynalski it is!

    Thanks!

  • Diaa

    I have loved using this, as all the apps kinda suck for one reason or another… BUT… I don’t know why, but lately, it seems like there is a problem that is getting worse each time I use it – the longer I leave it playing (I use it to help me sleep), the more the sound “POPS”… And it’s turning out to be more of a detriment to my sleep because of that, than a help… PLEASE fix this! :'(

    • Tomasz P. Szynalski

      Sorry to hear that. It’s probably due to some kind of power-saving measure in whatever device/browser combination you’re using. The popping happens when the program cannot deliver new pieces of the tone fast enough (probably because the device has slowed down the CPU), so eventually there is a break. Using a different browser (if that’s an option) could help. There’s nothing I can do about it on my level.

      • Diaa

        I understand, and thank you for your time replying. Unfortunately, I’ve experienced it not only on my Android Chrome browser (which is what I normally use, for convenience’s sake), but also my Dell laptop’s Chrome browser (Chrome is all I use anymore, now that Firefox seems to want to be slower than it used to)… and it’s pretty hefty to be a laptop. $800 worth of heft, lol. And just barely over a year old, and I do weekly maintenance and am completely OCD about keeping it “clean”. Though, I will admit, the popping happens FAR LESS on the laptop, than on the phone… so maybe I’ll just start lugging it into the bedroom at night, anyways. Haha. Thanks again for your time and reply. 🙂

        • Tomasz P. Szynalski

          Gotcha, so it appears to be an imperfection in the audio code in Chrome. I’m not surprised – Chrome is not primarily designed as a background music player. If you’re so inclined, you can try and file a bug report here:
          https://bugs.chromium.org/p/chromium/issues/list?q=component:OS%3EKernel%3EAudio

          Would it solve your problem if you could download about an hour-long WAV audio file with your desired tone? You could then play it on repeat in your audio player of choice (it might even work on some portable players). However, every hour or so there would be a slight gap (not an abrupt one, but a quick fade-out followed by a fade-in) because of the track ending.

      • Diaa

        Oh, and I may also try a different browser as well… If it’s just for this alone, I can do that much at least.

  • Merlin Marquardt

    Very nice tone generator. Very cool idea. Have you considered making a visual frequency (color) generator?

  • Johan Halmén

    Please, add a button, which adds the fundamental frequency. Starting with say 120 Hz, you’d get 240, 360, 480, 600, 720 etc. This would make audible the partial tone series, one of the most fundamental thing in western music.

  • Adam

    Hi Tomasz,

    I love your site – but I even more I would love to have it as a plugin – for Logic. To combine it – and also tune and control the internal tune of logic – while ajusting it to different tunes. You do not plan to do something like that? Thank you for your cool site.

  • Suzanne

    I wish this would not be louder when playing a higher pitch. I’m a teacher and am looking for an interactive like this that allows students to investigate how changing the pitch and volume of a sound (independently) change the shape of the waves themselves. Whenever I double the pitch (440 to 880, say) the volume also increases, which means both the wavelength and amplitude of the resulting waves change (I’m using this in coordination with an online oscilloscope). I do appreciate the tool though (it’s better than having students try to change their pitch themselves).

    • Tomasz P. Szynalski

      The volume does not change as you change the frequency.

      • Bernie Hutchins

        Hi Tomasz –

        Of course, it is the signal AMPLITUDE that does not change. The volume (perceived loudness) changes greatly, basically well-known (“Fletcher-Munson curves”). In particular, start with the SINEWAVE at 440 Hz at a comfortable level and turn the frequency down gradually. By about 150 Hz you note the roll-off. By 40 Hz it is very weak and by 20 Hz it is all but inaudible. That us supposed to happen that way.

        If you are listening for a 20 Hz sinewave, and have increased the volume, be sure to turn it back down before changing back to higher frequencies and/or changing to a non-sinusoidal waveshape.

        And while listening to 20 Hz at the 440 Hz volume level, be sure to try the other waveshape (square, triangle, and saw). These ARE audible (because of the harmonics) and we have a “pitch” (in some sense) as a repetition rate. The saw has a repetition rate of 20 “clicks”/second while the square has a click-rate of 40 time/second (two jumps/cycle).

        Your program is excellent by the way and much appreciated by those of us experiencing/investigating the annoying low-frequency (30 Hz to about 100 Hz) “World-Wide Hum”.

        – Bernie http://electronotes.netfirms.com/
        hutchins@ece.cornell.edu

  • Chewba

    Hello
    have this tinitus conditions for almost two years, and your tool it helps me to have control on it, its soften my nights, same my sister’s.

    Thank you so much for this very healthy tool

  • Hank

    My dad had Alzheimer’s, and I want to slow the progression of this in myself and my siblings. This looks like a great opportunity. I immediately ordered your recommended headphones.

    There is also evidence that 40 Hz light flashes do this as well.Do you have anything on the horizon to control LED lights?

    Thank you for doing this!

  • Derek Crager

    Great tool and exactly what I was looking for when I searched tone generator.

    I’m currently accessing your page from a mobile phone.

    Would you consider an option to pulse the active playing tone on off on off, the reasoning would be to create a plasticity type differentiation test where the actively generated tone by your generator is paused long enough to compare with the tinnitus tone that we hear within our own ears?

    While pulse would be one option of comparison while we’re dialing into the correct frequency match I just thought of another that may be more ergonomic.

    Option to have your tone generator only play when the button is actively touched so that when we are matching, trying to discern what frequency our personal tinnitus is that we can play each frequency in a manner that most reflects our individual on vs off timing preferences when comparing with our tinnitus.

    Kind regards,
    Derek

  • Miroslav

    Perfect tone control! Please create and add a tone table tuned for A4 to 432 Hz, please, please …

  • KERRICK MAINRENDER

    This is a very nice site. Thanks for the explanation of the fluttering heard below 20 hz. Each impact makes a burst of audible sound, that is, higher, which is what we actually hear. Like with a helicopter. However, when I moved up to the teens, I could hear a pitched low tone. Is that a harmonic or overtone of some sort? I kept it pretty low in volume/intensity, and I don’t have tinnitus. After all, many years back I got to experiment with a synthesizer and at one point I couldn’t hear a darn thing but kept wondering why the place was shaking…When I saw that woofer flapping like a flag in a gale, I dialed it back right away, you can be sure. When I built my own speakers, I added an infrasonic filter [all right, it was a kit] to control this.
    There is a (urban?) legend that 19 hz can disorient people, but it didn’t have any effect on me, at least not for the minute or so I tried. Infrasound is one of my interests. I saw the 2 Mythbusters vids where they claimed to debunk these myths–in one case the star had no ill effects from being bombarded by huge subwoofers, but the attendants felt odd, as I recall, this detail being passed over quickly. I think there is more to be found out. E.g., since more body parts than ears can be vibrated, are some folks immune?
    I am 63, with reasonably good hearing (and an abnormal sensitivity to sharp loud sounds.) And a liking for spectacular science. Would do my own experiments but there are power requirements, not to mention expenses.

    • Bernie Hutchins

      Kerrick said in part: “Thanks for the explanation of the fluttering heard below 20 hz. Each impact makes a burst of audible sound, that is, higher, which is what we actually hear. Like with a helicopter. However, when I moved up to the teens, I could hear a pitched low tone. Is that a harmonic or overtone of some sort?”

      Let’s look at this one step at a time. We need first to be specific; not just about frequency, but also about amplitude and waveshape.

      If you are talking about a sinewave, at an amplitude level that is comfortable at, say, 440 Hz, and just turn down the frequency (still sine, without changing the volume), you will hear the volume (apparent loudness) drop off noticeably as you get below 100 Hz, and almost certainly it is gone by 20 Hz. Don’t adjust the volume! You have just tested for normal low-frequency hearing.

      Leaving everything (i.e., original 440 Hz comfortable volume and 20 Hz frequency) the same, switch to sawtooth. You will immediately hear what is generally considered to be a 20 Hz “pitch”. It is likely a bit confusing to talk about a “pitch” for a frequency (more of a “buzz”) for which you just showed you can’t hear a sinusoidal fundamental, but we do call it that.

      If you turn the frequency up from 20 Hz, note that a “conventional” type of pitch comes back at about 50 Hz and above. The pitch is the same as that of the sinewave – but the “tone color” (timbre – pronounced tam-ber) is of a brighter or sharper nature.

      If instead you turn the sawtooth frequency down from 20 Hz, by about 8 Hz you can actually count 8 “clicks” per second.

      What is going on? Well the human brain is a pretty good pattern analyzer. In processing acoustic material, it listens for the repetition rate of sound events. WE easily recognize a repeat rate of about 1 Hz when pounding a nail. Note that you can count click rates of a sawtooth up to about 7 Hz (a musical “vibrato” rate), at which point there is an uncountable “buzz”) until about 40 Hz. At this point, the “cochlea” of the inner ear kicks in as an acoustic “pre-processor” reporting a single pitch (not the waveshape itself) to the brain (assuming a periodic stimulus).

      Here we get to the key point of what is called a “missing fundamental”. A waveform such as a sawtooth has a fundamental plus integer multiples (harmonics) of this fundamental. The harmonics greatly enhance the perceived pitch. In fact, even if the fundamental is very weak OR even completely inaudible, or if the fundamental and a few of the lower harmonics are missing, we can easily perceive a pitch corresponding to the missing fundamental.

      So, with a 20 Hz sawtooth, we don’t hear 20 Hz at all, and probably not 40 Hz (2nd harmonic), but do hear 60 Hz, 80 Hz, 100 Hz, etc. and “regenerate the perception of a missing 20 Hz.

      A square wave has strong harmonics although ONLY odd order. A triangle has the same harmonic content as the square, but much weaker. If you listen to a 4 Hz saw, you get 4 clicks per second. If you listen to a 4 Hz square, you get 8 clicks per second! Why – because there are two sharp discontinuities per cycle in each cycle of the square; only one in the saw. [Or, the square has odd harmonics 4Hz, 12 Hz, 20 Hz, 28 Hz, 36 Hz, 44 Hz, 52 Hz, 60 Hz, 68 Hz . . . . Remove a few of the lower harmonics (say 4, 12, 20, 28, 36) and sum sinusoids for a range above. You will see a pattern repetition rate of 8 Hz].

      If you DO IN FACT ”overdrive” a system intended for a sinewave; either in its electronic version (“clipping”), or mechanically (instability of cone motion) you no longer have a pure sinusoid possibility but are generating harmonics. A 20 Hz example would commence to buzz its complaint. It is well to avoid either such overdrive case. Simply turning down the amplitude (a simple test) in such cases should return the pure sinewave.

      -Bernie

  • gabriel smit

    i found that with 18khz plus on decent tweeters dogs in my immediate vicinity refrained from incessant barking 🙂

  • Hangcheng Liu

    Hello, thx for creat the website, and i have a suggestion is to add a function to get custom eq information personally, its like record the minium db(volume) when we can hear at each frequce.. and we can import that into Equalizer APO to get a stantard listening experice with existing earphone.

  • captainrex522

    i remember theres a frequency that makes a chromebook get rly warm, like the area where the battery is, the area right of the mousepad, anyone know the frequency for that?

  • Adam Bernstein

    This is a great site. Not all computer sound cards/speakers are created equally. On my Lenovo, things behave in the 10KHz-14KHz range, meaning I hear the tone getting higher from 10KHz up to my limit of hearing. On my Macbook, 10KHz-12KHz, okay, but above 12KHz, the tone sounds lower. Nyquist sampling rate is likely the culprit here.

Leave a Reply to Kenn