AudioIn lets you grab the audio input from your sound card.

  • Constructor Summary

    Constructors

  • Method Summary

    void

    play()

    void

    play(float amp)

    void

    play(float amp, float add)

    void

    play(float amp, float add, float pos)

    Start capturing the input stream and route it to the audio output

    void

    set(float amp, float pos)

    Set amplitude and pan position with one method.

    void

    set(float amp, float add, float pos)

    void

    start()

    void

    start(float amp)

    void

    start(float amp, float add)

    void

    start(float amp, float add, float pos)

    Start the input stream without routing it to the audio output.

    void

    stop()

    Stop capturing sound from this audio input.

  • Constructor Details

    • AudioIn

      public AudioIn(PApplet parent)

    • AudioIn

      public AudioIn(PApplet parent, int in)

      Parameters:
      parent - typically use "this"
      in - input channel number (optional, default 0)
  • Method Details

    • play

      public void play()

      Starts the generator

      Overrides:
      play in class SoundObject
    • play

      public void play(float amp)

    • play

      public void play(float amp, float add)

    • play

      public void play(float amp, float add, float pos)

      Start capturing the input stream and route it to the audio output

      Parameters:
      amp - the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)
      pos - pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
    • start

      public void start()

    • start

      public void start(float amp)

    • start

      public void start(float amp, float add)

    • start

      public void start(float amp, float add, float pos)

      Start the input stream without routing it to the audio output. This is useful if you only want to perform audio analysis based on the microphone input.

      Parameters:
      amp - the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)
      add - offset the audio input by the given value
      pos - pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
    • set

      public void set(float amp, float pos)

      Set amplitude and pan position with one method.

      Parameters:
      amp - the volume to grab the input at as a value from 0.0 (complete silence) to 1.0 (full volume)
      pos - pan the audio input in a stereo panorama. Allowed values are between -1.0 (left) and 1.0 (right)
    • set

      public void set(float amp, float add, float pos)

    • stop

      public void stop()

      Stop capturing sound from this audio input.

      Overrides:
      stop in class SoundObject