Package de.sciss.net

Examples of de.sciss.net.OSCMessage


    final InputStream  is    = getClass().getResourceAsStream( "eisk-all.scsyndef" );
    final int      size  = is.available();
    final byte[]    data  = new byte[ size ];
    is.read( data );
    is.close();
    return new OSCMessage( "/d_recv", new Object[] { data });
  }
View Full Code Here


    public void actionPerformed( ActionEvent e )
    {
      if( server != null ) {
        try {
          server.sendMsg( new OSCMessage( "/d_loadDir", new Object[] {
            new File( "synthdefs" ).getAbsolutePath() }));
        }
        catch( IOException e1 ) {
          printError( getValue( NAME ).toString(), e1 );
        }
View Full Code Here

// -------- EventManager.Processor --------
 
  public void processEvent( BasicEvent e )
  {
    final OSCMessage msg = ((OSCEvent) e).msg;
    if( VERBOSEOSC ) System.err.println( "got OSC: " + msg.getName() );
        if( !(msg.getName().equals( "/tr" ) && (msg.getArgCount() >= 3)) ) return;
    if( rt_info == null ) return;

    final int    myTrigger  = ((Number) msg.getArg( 2 )).intValue();
    final long    remoteFrame = rt_info.startFrame + myTrigger * rt_info.senseBufSizeH;
    final boolean  even    = (myTrigger & 1) == 0;
   
    rt_info.trigToServe  = myTrigger;
    if( VERBOSEOSC ) {
View Full Code Here

      do {
        replyArgs[ 2 ] = new Integer( off );
        chunkLen = Math.min( 8152, len );
        replyArgs[ 3 ] = new Integer( chunkLen );
        replyArgs[ 4 ] = e.getDocument().getText( off, chunkLen );
        client.reply( new OSCMessage( getOSCCommand(), replyArgs ));
        off += chunkLen;
        len -= chunkLen;
      }
      while( len > 0 );
    }
View Full Code Here

    try {
      // [ "/doc", <componentID>, <state>, <offset>, <length> ]
      shortReplyArgs[ 1 ] = stateName;
      shortReplyArgs[ 2 ] = new Integer( e.getOffset() );
      shortReplyArgs[ 3 ] = new Integer( e.getLength() );
      client.reply( new OSCMessage( getOSCCommand(), shortReplyArgs ));
    }
    catch( IOException ex ) {
      SwingOSC.printException( ex, getOSCCommand() );
    }
  }
View Full Code Here

    try {
      // [ "/doc", <componentID>, <state>, <dot>, <mark> ]
      shortReplyArgs[ 1 ] = stateName;
      shortReplyArgs[ 2 ] = new Integer( e.getDot() );
      shortReplyArgs[ 3 ] = new Integer( e.getMark() );
      client.reply( new OSCMessage( getOSCCommand(), shortReplyArgs ));
    }
    catch( IOException ex ) {
      SwingOSC.printException( ex, getOSCCommand() );
    }
  }
View Full Code Here

    for( int i = offset, j = 3; j < replyArgs.length; i++, j++ ) {
      replyArgs[ j ]        = new Float( values[ i ]);
    }
   
    try {
      client.reply( new OSCMessage( "/values", replyArgs ));
    }
    catch( IOException ex ) {
      SwingOSC.printException( ex, "sendValues" );
    }
  }
View Full Code Here

  {
    try {
      // [ "/soundfile", <componentID>, <state>, <x>, <y>, <w>, <h> ]
      shortReplyArgs[ 1 ] = "cursor";
      shortReplyArgs[ 2 ] = new Long( newPosition );
      client.reply( new OSCMessage( getOSCCommand(), shortReplyArgs ));
    }
    catch( IOException ex ) {
      SwingOSC.printException( ex, getOSCCommand() );
    }
  }
View Full Code Here

      // [ "/soundfile", <componentID>, <state>, <x>, <y>, <w>, <h> ]
      replyArgs[ 1 ] = "selection";
      replyArgs[ 2 ] = new Integer( index );
      replyArgs[ 3 ] = new Long( newSpan.start );
      replyArgs[ 4 ] = new Long( newSpan.stop );
      client.reply( new OSCMessage( getOSCCommand(), replyArgs ));
    }
    catch( IOException ex ) {
      SwingOSC.printException( ex, getOSCCommand() );
    }
  }
View Full Code Here

    replyArgs[ 1 ] = type;
    replyArgs[ 2 ] = (url != null) ? url.toString() : "";
    replyArgs[ 3 ] = (descr != null) ? descr : "";
//    reply( type );
    try {
      client.reply( new OSCMessage( getOSCCommand(), replyArgs ));
    }
    catch( IOException ex ) {
      SwingOSC.printException( ex, getOSCCommand() );
    }
  }
View Full Code Here

TOP

Related Classes of de.sciss.net.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.