Represents a single value in an Open Sound Control (OSC) message.

Hierarchy

  • OscValue

Methods

  • Gets the value as an ASCII string. If the value cannot be interpreted as an ASCII string, null is returned.

    Returns null | string

  • Gets the BLOB data as a Uint8Array. If the BLOB data does not exist, null is returned.

    Returns null | Uint8Array

  • Gets the BLOB data as a UTF-8 string. If the BLOB data does not exist or cannot be interpreted as UTF-8, null is returned.

    Returns null | string

  • Gets the value as a boolean. If the value cannot be interpreted as a boolean, null is returned.

    Returns null | boolean

  • Gets the value as a floating-point number. If the value cannot be interpreted as a floating-point number, null is returned.

    Returns null | number

  • Gets the value as an integer. If the value cannot be interpreted as an integer, null is returned.

    Returns null | number

  • Creates an OscValue the represents an ASCII string value based on the passed argument.
    If the argument is not an ASCII string value, an error is thrown.

    Parameters

    • value: string

    Returns OscValue

  • Creates an OscValue the represents an BLOB data value based on the passed argument.
    If the argument is a string, the OscValue will contain the UTF-8 encoded string value.
    If the argument is a Uint8Array, the OscValue will contain the binary data as the value.
    If the argument cannot be interpreted as a BLOB value, an error is thrown.

    Parameters

    • value: string | Uint8Array

    Returns OscValue

  • Creates an OscValue the represents a boolean value based on the passed argument.\

    Parameters

    • value: boolean

    Returns OscValue

  • Creates an OscValue the represents a float value based on the passed argument.\

    Parameters

    • value: number

    Returns OscValue

  • Creates an OscValue the represents an interger value based on the passed argument.\

    Parameters

    • value: number

    Returns OscValue

Generated using TypeDoc