SoundPlayer
ceramic.SoundPlayer (Abstract)
Controls an individual sound playback instance.
SoundPlayer represents a single playing instance of a Sound. It allows real-time control over playback parameters like volume, pan, pitch, and position.
Instances are created by calling sound.play()
and remain
valid until the sound finishes playing or is explicitly stopped.
// Play a sound and control it
var player = sound.play();
player.volume = 0.8;
player.pan = -0.5;
// Pause and resume
player.pause();
Timer.delay(null, 2.0, () -> player.resume());
// Fade out over 1 second
player.fadeOut(1.0);
See: Sound