Sine Wave Sound Generator in Java
What's the simplest way to generate a sine wave sound at any frequency in Java? A sample size more than 2 bytes would help, but it doesn't really matter. Thanks Andrew Thompson See Beeper for a self-contained example. Perhaps something simpler? That 51 lines of snippet (repeated below - spaced out for single line & in-line comments) as shown at the top of the linked answer, is about as simple as generating a tone gets (OK, you can take out 5+ lines for the harmonic). People seem to assume it should be a method built into the toolkit to produce a pure tone. It is not, and takes a little