Class TutorialOne_06_WindowBuffer.WindowedBuffer

java.lang.Object
net.paulhertz.pixelaudio.example.TutorialOne_06_WindowBuffer.WindowedBuffer
Enclosing class:
TutorialOne_06_WindowBuffer

public class TutorialOne_06_WindowBuffer.WindowedBuffer extends Object
  • Field Details

    • buffer

      private final float[] buffer
    • window

      private final float[] window
    • windowSize

      private final int windowSize
    • hopSize

      private int hopSize
    • index

      private int index
  • Constructor Details

    • WindowedBuffer

      public WindowedBuffer(float[] buffer, int windowSize, int hopSize)
  • Method Details

    • nextWindow

      public float[] nextWindow()
      Returns the next window, advancing the read index by hopSize. Wraps around the buffer as needed.
    • gettWindowAtIndex

      public float[] gettWindowAtIndex(int idx)
      Returns the window at a supplied index. Wraps around the buffer as needed. Updates current index and advances it by hopSize.
    • reset

      public void reset()
      Reset reader to start of buffer
    • getIndex

      public int getIndex()
      Current buffer index
    • setIndex

      public void setIndex(int index)
      set current index
    • getBufferSize

      public int getBufferSize()
      Expose the underlying array size
    • getWindowSize

      public int getWindowSize()
      Expose the reusable window array size
    • getHopSize

      public int getHopSize()
      Expose hop size
    • setHopSize

      public void setHopSize(int hopSize)