Tabnine Logo
OSCMessage.getByteArray
Code IndexAdd Tabnine to your IDE (free)

How to use
getByteArray
method
in
com.illposed.osc.OSCMessage

Best Java code snippets using com.illposed.osc.OSCMessage.getByteArray (Showing top 3 results out of 315)

origin: synchrony/smsn

  private void sendMessage(final int key, final boolean pressedVsReleased) {
    int note = 5 - key;
    String address = "/exo/tt/note/" + note + "/" + (pressedVsReleased ? "on" : "off");
    OSCMessage m = new OSCMessage(address);

    try {
      byte[] buffer = m.getByteArray();
      DatagramPacket packet
          = new DatagramPacket(buffer, buffer.length, musicControlAddress, musicControlPort);
      musicOscSocket.send(packet);

      // TODO: temporary
      SemanticSynchrony.getLogger().log(Level.INFO, "sent music control OSC datagram to " + musicControlAddress + ":" + musicControlPort);
    } catch (IOException e) {
      SemanticSynchrony.getLogger().log(Level.SEVERE, "error in sending OSC datagram to coordinator", e);
    } catch (Exception e) {
      SemanticSynchrony.getLogger().log(Level.SEVERE, "unexpected error in sending OSC datagram to coordinator", e);
    }
  }
}
origin: net.fortytwo.smsn/smsn-p2p

public void sendOSCMessageToCoordinator(final OSCMessage m) {
  if (getCoordinatorConnection().isActive()) {
    try {
      if (null == coordinatorOscSocket) {
        coordinatorOscPort = getCoordinatorService().description.getOscPort();
        coordinatorOscAddress = getCoordinatorService().address;
        coordinatorOscSocket = new DatagramSocket();
      }
      byte[] buffer = m.getByteArray();
      DatagramPacket packet
          = new DatagramPacket(buffer, buffer.length, coordinatorOscAddress, coordinatorOscPort);
      coordinatorOscSocket.send(packet);
      logger.log(Level.INFO, "sent OSC datagram to " + coordinatorOscAddress + ":" + coordinatorOscPort);
    } catch (IOException e) {
      logger.log(Level.SEVERE, "error in sending OSC datagram to coordinator", e);
    } catch (Throwable t) {
      logger.log(Level.SEVERE, "unexpected error in sending OSC datagram to coordinator", t);
    }
  }
}
origin: synchrony/smsn

public void sendOSCMessageToCoordinator(final OSCMessage m) {
  if (getCoordinatorConnection().isActive()) {
    try {
      if (null == coordinatorOscSocket) {
        coordinatorOscPort = getCoordinatorService().description.getOscPort();
        coordinatorOscAddress = getCoordinatorService().address;
        coordinatorOscSocket = new DatagramSocket();
      }
      byte[] buffer = m.getByteArray();
      DatagramPacket packet
          = new DatagramPacket(buffer, buffer.length, coordinatorOscAddress, coordinatorOscPort);
      coordinatorOscSocket.send(packet);
      logger.log(Level.INFO, "sent OSC datagram to " + coordinatorOscAddress + ":" + coordinatorOscPort);
    } catch (IOException e) {
      logger.log(Level.SEVERE, "error in sending OSC datagram to coordinator", e);
    } catch (Throwable t) {
      logger.log(Level.SEVERE, "unexpected error in sending OSC datagram to coordinator", t);
    }
  }
}
com.illposed.oscOSCMessagegetByteArray

Popular methods of OSCMessage

  • <init>
    Creates an OSCMessage with an address and arguments already initialized.
  • addArgument
    Add an argument to the list of arguments.
  • getArguments
    The arguments of this message.
  • getAddress
  • checkAddress
    Throws an exception if the given address is invalid. We explicitly allow null here, because we want
  • computeAddressByteArray
    Convert the address into a byte array. Used internally only.
  • computeArgumentsByteArray
    Convert the arguments into a byte array. Used internally only.
  • contentChanged
  • isValidAddress
    Checks whether a given string is a valid OSC Address Pattern.
  • setAddress
    Set the address of this message.

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • setScale (BigDecimal)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Table (org.hibernate.mapping)
    A relational table
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now