Note: I do NOT want to "read audio file foo.bar and play it."
I want to programmatically generate audio files on the fly and play them.
Does Java have built in libraries for this, or does this fall into the system-dependent libraries?
Thanks!
Note: I do NOT want to "read audio file foo.bar and play it."
I want to programmatically generate audio files on the fly and play them.
Does Java have built in libraries for this, or does this fall into the system-dependent libraries?
Thanks!
Using Andrew's approach, here's an example that plays an equal tempered scale.
This low-level approach may be suitable for older, less capable platforms. Also consider
javax.sound.midi
; a complete example is shown here and the Synthesizing Sound tutorial is cited here.