Class TutorialOne_04_Network.NetworkDelegate

java.lang.Object
net.paulhertz.pixelaudio.example.TutorialOne_04_Network.NetworkDelegate
Enclosing class:
TutorialOne_04_Network

public class TutorialOne_04_Network.NetworkDelegate extends Object
A class to handle network connections over UDP, for example, with a Max or Pd patch. Used by applications that implement the PANetworkClientINF.
See Also:
  • Field Details

    • parent

      private processing.core.PApplet parent
    • app

      private PANetworkClientINF app
    • osc

      private oscP5.OscP5 osc
    • inPort

      private int inPort
    • outPort

      private int outPort
    • remoteFromAddress

      private String remoteFromAddress
    • remoteToAddress

      private String remoteToAddress
    • remoteFrom

      private netP5.NetAddress remoteFrom
    • remoteTo

      private netP5.NetAddress remoteTo
    • drawCount

      private int drawCount
  • Constructor Details

  • Method Details

    • init

      public void init()
    • getInPort

      public int getInPort()
    • setInPort

      public void setInPort(int inPort)
    • getOutPort

      public int getOutPort()
    • setOutPort

      public void setOutPort(int outPort)
    • getRemoteFrom

      public netP5.NetAddress getRemoteFrom()
    • setRemoteFrom

      public void setRemoteFrom(netP5.NetAddress remoteFrom)
    • getRemoteTo

      public netP5.NetAddress getRemoteTo()
    • setRemoteTo

      public void setRemoteTo(netP5.NetAddress remoteTo)
    • getDrawCount

      public int getDrawCount()
    • setDrawCount

      public void setDrawCount(int drawCount)
    • initOscPlugs

      public void initOscPlugs()
      SET UP RESPONSE TO INCOMING MESSAGES Call the osc.plug(Object theObject, String the MethodName, String theAddrPattern) or osc.plug(Object theObject, String the MethodName, String theAddrPattern, String the TypeTag) to setup callbacks to methods in the current object ("this") or other object instance.
    • oscEvent

      void oscEvent(oscP5.OscMessage theOscMessage)
      Post address pattern and typetag from incoming osc message to the console.
      Parameters:
      theOscMessage - forwarded OscMessage
    • oscSendMouseClicked

      public void oscSendMouseClicked(int sampleX, int sampleY, int sample)
      Sends display coordinates and audio buffer index associated with a mouse click.
      Parameters:
      sampleX -
      sampleY -
      sample -
    • oscSendMultiSlider

      public void oscSendMultiSlider(ArrayList<processing.core.PVector> drawPoints)
      Sends a list of points as possible Max MultiSlider settings.
      Parameters:
      drawPoints -
    • oscSendDrawPoints

      public void oscSendDrawPoints(ArrayList<processing.core.PVector> drawPoints)
      Sends a list of points.
      Parameters:
      drawPoints -
    • oscSendTimeStamp

      public void oscSendTimeStamp(int timeStamp, int timeOffset)
      Sends a "/time" message with a time stamp and offset.
      Parameters:
      timeStamp - milliseconds time stamp
      timeOffset - milliseconds time offset
    • oscSendTrig

      public void oscSendTrig(int index)
      Sends a trigger message, "/trig", with a numerical value.
      Parameters:
      index - number to send
    • oscSendOnOff

      public void oscSendOnOff(int index, boolean state)
      Sends an "/onoff" message with an index and state value.
      Parameters:
      index -
      state -
    • oscSendSetnum

      public void oscSendSetnum(int index, float value)
      Sends a "/setnum" message with an index and value.
      Parameters:
      index -
      value -
    • oscSendDelete

      public void oscSendDelete(int index)
      Sends a "/del" message with an index.
      Parameters:
      index -
    • oscSendClear

      public void oscSendClear()
      Sends a "/clear" message.
    • oscSendFileInfo

      public void oscSendFileInfo(String path, String name, String tag)
      Sends a "/file" message with file path, file name, and file tag.
      Parameters:
      path -
      name -
      tag -
    • sampleHit

      public void sampleHit(int sam)
      Play an audio event at a position in the audio buffer.
      Parameters:
      sam - buffer index
    • drawHit

      public void drawHit(int... args)
      Play audio/animation events using a supplied list of event points.
      Parameters:
      args -
    • multislider

      public void multislider(int... args)
      Receive Max MultiSlider data.
      Parameters:
      args - MultiSlider values
    • parseKey

      public void parseKey(int arg)
      Interprets a received value as a char and uses it as an argument to parseKey().
      Parameters:
      arg -
    • controlMsg

      public void controlMsg(String ctrl, float val)