Just wondering if there is a library in Java like the module PyAudiere in Python, that simply allows you to create tones and play them, like this sample Python code:
If you ok with installing additional libs like Xuggler, you can use this shorter way, but it loads an external file - sure, you can also generate the soundpackets on the run. It's an fragment from the tutorials site. http://www.xuggle.com/xuggler/downloads/3.1.final.jsp
IMediaReader reader = ToolFactory.makeReader("Your.MP3");
IMediaViewer viewer = ToolFactory.makeViewer();
reader.addListener(viewer);
while (reader.readPacket() == null)
;