Package net.paulhertz.pixelaudio.granular

# Interface PASource

All Superinterfaces:
  `PAFloatSource`

All Known Implementing Classes:
  `PABurstGranularSource`

public interface PASource extends PAFloatSource
PASource A PAFloatSource with an additional pitch policy hint. Designed for used with granular synthesis engine, now implemented in the PixelAudio library with calling chain: PAGranularInstrumentDirector -> PAGranularInstrument -> PAGranularSampler -> PAGranularVoice, where PABurstGranularSource is PASource that handles the complexities of the granular synthesis sample by sample. Implemented by `PABurstGranularSource`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default ddf.minim.MultiChannelBuffer`
  `getMultiChannelBuffer()`
  Optional access to an underlying MultiChannelBuffer, if this source is fundamentally buffer-backed (e.g., plain sample playback or a rendered granular "tape").
  `default PitchPolicy`
  `pitchPolicy()`
  Pitch policy hint for the instrument: should the instrument apply its pitch (playback rate) on top of this source?
  `default void`
  `seekTo(long absoluteSample)`
  Optional seek/rewind hook, mainly for transport or "note-on" start time.
  `default void`
  `setGrainWindow(ddf.minim.analysis.WindowFunction wf, int grainLenSamples)`

  ### Methods inherited from interface net.paulhertz.pixelaudio.granular.PAFloatSource

  `lengthSamples, renderBlock`

- ## Method Details

  - ### pitchPolicy

    default PitchPolicy pitchPolicy()
    Pitch policy hint for the instrument: should the instrument apply its pitch (playback rate) on top of this source?

  - ### seekTo

    default void seekTo(long absoluteSample)
    Optional seek/rewind hook, mainly for transport or "note-on" start time. Default implementation does nothing.
    Parameters:
      `absoluteSample` - absolute sample index to seek to.

  - ### setGrainWindow

    default void setGrainWindow(ddf.minim.analysis.WindowFunction wf, int grainLenSamples)

  - ### getMultiChannelBuffer

    default ddf.minim.MultiChannelBuffer getMultiChannelBuffer()
    Optional access to an underlying MultiChannelBuffer, if this source is fundamentally buffer-backed (e.g., plain sample playback or a rendered granular "tape"). Implementations that are not backed by a fixed buffer (true streams, procedural sources, etc.) should simply return null.