Interface PASamplerPlayable

All Superinterfaces:
PAPlayable
All Known Implementing Classes:
PASamplerInstrument, PASamplerInstrumentPool, PASamplerInstrumentPoolMulti

public interface PASamplerPlayable extends PAPlayable
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 Type
    Method
    Description
    int
    play(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 int
    Simplest: play whole buffer at default amplitude and pitch.
    default int
    playSample(float amplitude)
    Play with amplitude only.
    default int
    playSample(float amplitude, ADSRParams env)
    Play with amplitude and envelope.
    default int
    playSample(float amplitude, ADSRParams env, float pitch)
    Play with amplitude, envelope, and pitch.
    default int
    playSample(float amplitude, ADSRParams env, float pitch, float pan)
    Play with amplitude, envelope, pitch, and pan.
    default int
    playSample(int start, int length, float amplitude)
    Play subrange with amplitude only.
    default int
    playSample(int start, int length, float amplitude, float pitch)
    Play subrange with amplitude and pitch (no envelope).
    default int
    playSample(int start, int length, float amplitude, ADSRParams env, float pitch, float pan)
    Play a subrange of the buffer with full parameters.

    Methods inherited from interface net.paulhertz.pixelaudio.voices.PAPlayable

    play, play, play, play, play, play, stop
  • Method Details

    • play

      int play(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.
    • playSample

      default int playSample()
      Simplest: play whole buffer at default amplitude and pitch.
    • playSample

      default int playSample(float amplitude)
      Play with amplitude only.
    • playSample

      default int playSample(float amplitude, ADSRParams env)
      Play with amplitude and envelope.
    • playSample

      default int playSample(float amplitude, ADSRParams env, float pitch)
      Play with amplitude, envelope, and pitch.
    • playSample

      default int playSample(float amplitude, ADSRParams env, float pitch, float pan)
      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.