Class GranularPaths

java.lang.Object
net.paulhertz.pixelaudio.granular.GranularPaths

public final class GranularPaths extends Object
TODO Candidate for removal
  • Constructor Details

    • GranularPaths

      private GranularPaths()
  • Method Details

    • fixedHopReport

      public static GranularPath fixedHopReport(long startIndex, int numGrains, int hopSamples, int grainLengthSamples, float pitchHint, float gain, float pan, long startOffsetSamples, long hopOffsetSamples, int sourceLengthSamples, GranularPaths.EdgeMode edgeMode)
    • applyEdgeMode

      private static long applyEdgeMode(long idx, int len, GranularPaths.EdgeMode mode, long dir)
    • mod

      private static long mod(long x, int m)
    • clamp

      private static long clamp(long x, long lo, long hi)
    • bounce

      private static long bounce(long idx, int len)
      Reflect index into [0..len-1] like a bouncing ball. Example for len=5: ... 3 4 3 2 1 0 1 2 3 4 3 ...