I'm trying to create some sounds in java and I wanted a really simplistic way of doing so. I tried looking over the APIs on Sun, but they seem really overly complicated. Either that or I don't understand much about how sounds work so I might as well be reading a foreign language.
Basically I have created a separate program that creates "Notes" for a piano. What i want to do in a separate file is to be able to play the sounds, but alas I am at a complete loss as to what I should do.
My notes have 3 things, the number of the Note (which basically tells you whether the key is A, A#, B etc), and the length of the note (Whole, Half, Quarter etc), and the frequency of the note in Hertz.
So my question is:
1: What class do I import that will create sounds?
2: How do I go about creating/playing the sounds with this? (Some simple to read examples would be nice, the ones over at the Sun Java site does not provide easy to read/understand material). I'm really looking for a rough example to be able to create sound in Java.
An example of a simple example:
import example.java* //this contains the class library so you can make sounds
//skip some setup code
sound blah = new sound (2, 34, 3000); //explain what 2, 34, 3000 are
blah.play(); //plays the sound