Class GestureGranularRenderer.DefaultMapping

java.lang.Object
net.paulhertz.pixelaudio.granular.GestureGranularRenderer.DefaultMapping
All Implemented Interfaces:
GestureGranularRenderer.GestureMapping
Enclosing class:
GestureGranularRenderer

public static final class GestureGranularRenderer.DefaultMapping extends Object implements GestureGranularRenderer.GestureMapping
Default mapping for PixelAudio: - sample index from PixelAudioMapper.lookupSample(x,y) - optional mapping offset (totalShift) and modulo mapSize - soft pan range mapped from x across screenWidth Designed to be stateful: totalShift and panRange can change over time (e.g., sliding window through a larger buffer).
  • Field Details

    • mapper

      private final PixelAudioMapper mapper
    • totalShift

      private int totalShift
    • mapSize

      private final int mapSize
    • screenWidth

      private int screenWidth
    • panRange

      private float panRange
  • Constructor Details

    • DefaultMapping

      public DefaultMapping(PixelAudioMapper mapper, int totalShift, int mapSize, int screenWidth, float panRange)
  • Method Details