Package com.illposed.osc

Examples of com.illposed.osc.OSCMessage


   * Converts the byte array to a simple message.
   * Assumes that the byte array is a message.
   * @return a message containing the data specified in the byte stream
   */
  private OSCMessage convertMessage() {
    OSCMessage message = new OSCMessage();
    message.setAddress(readString());
    List<Character> types = readTypes();
    if (null == types) {
      // we are done
      return message;
    }
    moveToFourByteBoundry();
    for (int i = 0; i < types.size(); ++i) {
      if ('[' == types.get(i).charValue()) {
        // we're looking at an array -- read it in
        message.addArgument(readArray(types, ++i).toArray());
        // then increment i to the end of the array
        while (types.get(i).charValue() != ']') {
          i++;
        }
      } else {
        message.addArgument(readArgument(types.get(i)));
      }
    }
    return message;
  }
View Full Code Here


        new Integer(1),
        new Integer(0),
        "freq",
        new Float(freq)};
    // a comma is placed after /s_new in the code
    OSCMessage msg = new OSCMessage("/s_new", args);

    // Object[] args2 = {new Symbol("amp"), new Float(0.5)};
    // OscMessage msg2 = new OscMessage("/n_set", args2);
    //oscPort.send(msg);
View Full Code Here

      showError("Please set an address first");
    }

    // send an OSC message to free the node 1000
    Object[] args = {new Integer(node)};
    OSCMessage msg = new OSCMessage("/n_free", args);

    // try to use the send method of oscPort using the msg in nodeWidget
    // send an error message if this doesn't happen
    try {
      oscPort.send(msg);
View Full Code Here

      showError("Please set an address first");
    }

    // send an OSC message to set the node 1000
    Object[] args = {new Integer(node), "freq", new Float(freq)};
    OSCMessage msg = new OSCMessage("/n_set", args);

    // try to use the send method of oscPort using the msg in nodeWidget
    // send an error message if this doesn't happen
    try {
      oscPort.send(msg);
View Full Code Here

    if (null == oscPort) {
      showError("Please set an address first");
    }

    Object[] args1 = {new Integer(node1)};
    OSCMessage msg1 = new OSCMessage("/n_free", args1);

    Object[] args2 = {new Integer(node2)};
    OSCMessage msg2 = new OSCMessage("/n_free", args2);

    Object[] args3 = {new Integer(node3)};
    OSCMessage msg3 = new OSCMessage("/n_free", args3);

    // create a timeStamped bundle of the messages
    OSCPacket[] packets = {msg1, msg2, msg3 };
    Date newDate = new Date();
    long time = newDate.getTime();
View Full Code Here

      showError("Please set an address first");
    }

    Object[] args1 = {"javaosc-example", new Integer(node1),
        new Integer(1), new Integer(0)};
    OSCMessage msg1 = new OSCMessage("/s_new", args1);

    Object[] args2 = {"javaosc-example", new Integer(node2),
        new Integer(1), new Integer(0)};
    OSCMessage msg2 = new OSCMessage("/s_new", args2);

    Object[] args3 = {"javaosc-example", new Integer(node3),
        new Integer(1), new Integer(0)};
    OSCMessage msg3 = new OSCMessage("/s_new", args3);

    try {
      oscPort.send(msg1);
    } catch (Exception e) {
      showError("Couldn't send");
View Full Code Here

TOP

Related Classes of com.illposed.osc.OSCMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.