Tones can be played from stream in the same way as sampled audio and MIDIs.
First create InputStream
to tone data and pass
that stream to the Player
InputStream is = getClass().getResourceAsStream("/ukkonooa.jts"); Player player = Manager.createPlayer(is, "audio/x-tone-seq");
Once the player is created, you can add a listener, and then realize
and prefetch the Player
:
player.addPlayerListener(this); player.realize(); player.prefetch();
Start the player when the tone should be played:
player.start();