Examples of OSCMessage


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

Examples of com.illposed.osc.OSCMessage

        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

Examples of com.illposed.osc.OSCMessage

      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

Examples of com.illposed.osc.OSCMessage

      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

Examples of com.illposed.osc.OSCMessage

    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

Examples of com.illposed.osc.OSCMessage

      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

Examples of com.neophob.sematrix.osc.model.OscMessage

   *
   * @param eol the eol
   * @return the payload
   */
  public OscMessage getPayload() {
    return new OscMessage("/"+command, parameter);
  }
View Full Code Here

Examples of de.sciss.net.OSCMessage

      for( int i = 0, j = 2; j < args.length; i++, j++ ) {
        args[ j ] = extraArgs[ i ];
      }
   
      try {
        server.send( new OSCMessage( "/gui/menu", args ), n.getAddress() );
      }
      catch( IOException e1 ) {
        BasicWindowHandler.showErrorDialog( null, e1, n.getText() );
      }
    }
View Full Code Here

Examples of de.sciss.net.OSCMessage

 
  public void close()
  throws IOException
  {
    if( pending.getPacketCount() == 0 ) {
      pending.addPacket( new OSCMessage( "/status" ))// properly mark ending of rendering
    }
    flush();
//    fch.close();
    raf.close();
  }
View Full Code Here

Examples of de.sciss.net.OSCMessage

          return;
        }
      }
     
      final OSCBundle    bndl  = new OSCBundle();
      final OSCMessage  msgWrite;
     
      try {
//        server.dumpOutgoingOSC( kDumpBoth );
        bndl.addPacket( ct.bufDisk.closeMsg() );
//        msgWrite = ct.bufDisk.writeMsg( ct.recFile.getAbsolutePath(), "aiff",
//                affp.getEncodingString(), 0, 0, true );
        msgWrite = ct.bufDisk.writeMsg( ct.recFile.getAbsolutePath(), "aiff",
                encodingString, 0, 0, true );
        bndl.addPacket( msgWrite );
        if( server.sendBundleSync( bndl, msgWrite.getName(), 4 )) {
          nw.register( ct.synthDiskOut );
         
//System.out.println( "HERE" );
//try { Thread.sleep( 3000 ); } catch( InterruptedException e1 ) { /* ... */ }
//System.out.println( "---2" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.