Class SamplerBrushEvent

java.lang.Object
net.paulhertz.pixelaudio.sampler.SamplerBrushEvent
All Implemented Interfaces:
Comparable<SamplerBrushEvent>

public class SamplerBrushEvent extends Object implements Comparable<SamplerBrushEvent>
Stores values used for SamplerBrush event staging, used in tutorial examples such as TutorialOne_03_Drawing. SamplerBrush objects implement AudioBrush and address the Sampler synthesis engine. A SamplerBrushEvent is a discrete audio synthesis process, complete with ADSR envelope.

There is no corresponding "GranularBrushEvent". Grains, which allow similar parametric control with the grain window equivalent to the ADSR envelope, are embedded in the audio synthesis process and hence are not discrete events.

  • Field Details

    • x

      public final int x
      x-coordinate associated with SamplerBrushEvent
    • y

      public final int y
      y-coordinate associated with SamplerBrushEvent
    • eventTimeMs

      public final int eventTimeMs
      time of event, typically a milliseconds offset from a trigger event
    • samplePos

      public final int samplePos
      audio buffer index, typically derived from event coordinates
    • durationMs

      public final int durationMs
      event duration
    • gain

      public final float gain
    • pitchRatio

      public final float pitchRatio
    • pan

      public final float pan
    • env

      public final ADSRParams env
    • isStale

      public boolean isStale
  • Constructor Details

    • SamplerBrushEvent

      public SamplerBrushEvent(int x, int y, int eventTimeMs, int samplePos, int sampleLen, float gain, float pitchRatio, ADSRParams env, float pan)
  • Method Details

    • getX

      public int getX()
    • getY

      public int getY()
    • eventTimeMs

      public int eventTimeMs()
    • isStale

      public boolean isStale()
    • setStale

      public void setStale(boolean stale)
    • getDurationMs

      public int getDurationMs()
    • compareTo

      public int compareTo(SamplerBrushEvent tl)
      Specified by:
      compareTo in interface Comparable<SamplerBrushEvent>