Package net.paulhertz.pixelaudio.voices
Interface PASamplerPlayable
- All Superinterfaces:
PAPlayable
- All Known Implementing Classes:
PASamplerInstrument,PASamplerInstrumentPool,PASamplerInstrumentPoolMulti
Specialized playable interface for sample-based instruments.
Extends PAPlayable with buffer position, length, and envelope parameters.
Includes multiple overloads of playSample(...) for backward compatibility.
-
Method Summary
Modifier and TypeMethodDescriptionintplay(int samplePos, int sampleLen, float amplitude, ADSRParams env, float pitch, float pan) Core playback method: start playback from a given buffer range with start index, duration, amplitude, envelope, pitch, and pan control, arguments in standard order for PixalAudio library.default intSimplest: play whole buffer at default amplitude and pitch.default intplaySample(float amplitude) Play with amplitude only.default intplaySample(float amplitude, ADSRParams env) Play with amplitude and envelope.default intplaySample(float amplitude, ADSRParams env, float pitch) Play with amplitude, envelope, and pitch.default intplaySample(float amplitude, ADSRParams env, float pitch, float pan) Play with amplitude, envelope, pitch, and pan.default intplaySample(int start, int length, float amplitude) Play subrange with amplitude only.default intplaySample(int start, int length, float amplitude, float pitch) Play subrange with amplitude and pitch (no envelope).default intplaySample(int start, int length, float amplitude, ADSRParams env, float pitch, float pan) Play a subrange of the buffer with full parameters.
-
Method Details
-
play
Core playback method: start playback from a given buffer range with start index, duration, amplitude, envelope, pitch, and pan control, arguments in standard order for PixalAudio library. -
playSample
default int playSample()Simplest: play whole buffer at default amplitude and pitch. -
playSample
default int playSample(float amplitude) Play with amplitude only. -
playSample
Play with amplitude and envelope. -
playSample
Play with amplitude, envelope, and pitch. -
playSample
Play with amplitude, envelope, pitch, and pan. -
playSample
default int playSample(int start, int length, float amplitude, ADSRParams env, float pitch, float pan) Play a subrange of the buffer with full parameters. -
playSample
default int playSample(int start, int length, float amplitude, float pitch) Play subrange with amplitude and pitch (no envelope). -
playSample
default int playSample(int start, int length, float amplitude) Play subrange with amplitude only.
-