5

Back in my high school Pascal class, I had a fun little program that would take in an integer and then play a tone using the system speaker. The pitch of the tone would vary, based on the int.

Does functionality like this exist in the Java world? Would an alternative be to pull in a wav or ulaw, and then change the frequency?

Thanks,
IVR Avenger

IVR Avenger
  • 15,090
  • 13
  • 46
  • 57
  • Duplicated: http://stackoverflow.com/questions/269657/how-to-make-a-noise-on-the-pc-speaker-with-java – Damian Leszczyński - Vash Oct 08 '10 at 17:23
  • 1
    I don't think so; those questions don't indicate how to alter the pitch/frequency with different inputs. That question just shows how to do java.awt.Toolkit.getDefaultToolkit().beep(), of which I'm already aware. :-) – IVR Avenger Oct 08 '10 at 17:30

2 Answers2

3

You could use JFugue

Adam
  • 43,763
  • 16
  • 104
  • 144
3

You might enjoy this simple example that constructs and plays pure tones.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045