Package wellen

Class Patch

java.lang.Object
wellen.Patch
All Implemented Interfaces:
DSPNodeOutputSignal

public class Patch extends Object implements DSPNodeOutputSignal
a Patch allows to compose complex DSP configurations. a Patch may be added to other Patches. NOTE this class is not tested yet …
  • Field Details

    • VERBOSE

      public static boolean VERBOSE
    • ID

      public final int ID
  • Constructor Details

    • Patch

      public Patch()
    • Patch

      public Patch(float volume)
  • Method Details

    • patchs

      public ArrayList<Patch> patchs()
    • patch

      public Patch patch(int index)
      Parameters:
      index - index of patch as stored in patch(). note that this not to be confused with the final field .ID in Patch which refers to a unique ID for each patch ever created.
      Returns:
      patch stored at index
    • output_signal

      public Signal output_signal()
      callback method that accumulates audio signals from child patchs and if applicable maps mono signals into stereo space. this method can be overridden to implement custom behavior, however, if doing so make sure to also call Signal output_signal_update() to collect signals from child patchs.
      Specified by:
      output_signal in interface DSPNodeOutputSignal
      Returns:
      signal of this patch
    • output_signal_update

      public Signal output_signal_update()
      accumulates signals from child patchs and if applicable maps mono signals into stereo space.
      Returns:
      accumulated signal of child patches
    • pan

      public Pan pan()
    • get_volume

      public float get_volume()
      Returns:
      patch volume with 0.0 being no output and 1.0 being 100%
    • set_volume

      public void set_volume(float volume)
      volume of patch with 0.0 being no output and 1.0 being 100% of the signal output. note, that this value is interpreted by parent Patchs.
      Parameters:
      volume - patch volume with 0.0 being no output and 1.0 being 100%