Module: network

Network input/output.

Includes nodes that can read packets from external network destinations or write packets to external network destinations. Nodes for different protocols (e.g., TCP, LSL, OSC) are included.

LSLInput

Receive data from the Lab Streaming Layer.

This node allows you to read a multi-channel stream from LSL (e.g., from an EEG device) in real time. In addition, this node can also read from a second stream that has event markers (for instance, from another application). Important: As of version 1.2, this node now synchronizes LSL stream clocks by default. If the output of this node will be streamed to disk using the Record To XDF node and you wish to retain the ground-truth timestamps then you should disable clock offset correction in this node. Important: Note that the this node does not dejitter the time stamps by default. If you do plotting or event-based processing then you must enable dejittering using the proc_dejitter parameter, or follow this node by a Dejitter Timestamps node to remove the jitter. The Lab Streaming Layer supports many different devices, such as EEG headsets, eye trackers, motion capture devices, audio, video, human-interface devices, and so on. With this node, you can read from any of these in a unified manner. On each tick of the NeuroPype scheduler, this node will output a packet that has all data from the given input stream(s) that came in since the last tick (which may be empty if there is no new data, and which may have a different length on each tick). Correspondingly, this node outputs either one or two streams depending on whether you include a marker stream. Check the below link for more information on LSL. The data stream channel labels will be parsed from the stream metadata. Additional metadata are typically stored in a LSL stream metadata field called desc. That information is parsed and retained in the stream properties' 'desc' field.

More Info...

Version 1.5.1

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data received.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • query
    LSL query string that identifies the data stream to search for. The simplest form is type='Modality' where modality can be EEG, Audio, VideoRaw, Gaze, MoCap, Control, or any other type string. The inlet will connect to an LSL stream that has its type field set to this value (and if there are multiple matches, the most recently created one of them will be connected to). If you have multiple devices with the same type on the network (e.g., possibly including playback or other users), it is recommended to make the query less broad by using the stream name, as in name='BioSemi', or starts-with(name,'BioSemi') for any stream starting with a given string (in which case you might also need to specify type='EEG' if there is a marker stream that starts with the same string. (Use Tools/LSL Streams in the Pipeline Designer to show current streams.) It is also possible to include the hostname using the 'and' keyword, as in: type='EEG' and hostname='MyLaptop1'. Other rarely-used fields include channel_count, nominal_srate, and source_id. The syntax is that of an XPath predicate, and supports many other features. If query is empty, no data streams will be found (only a marker stream if specified).

    • verbose name: Query
    • default value: type='EEG'
    • port type: StringPort
    • value type: str (can be None)
  • marker_query
    LSL query string to find a marker stream. If non-empty, this node will try to connect to a marker stream in addition to the data stream, and once connected, the packets returned by this node will have both streams in them. The basic marker query is: type='Markers'. If there are multiple matching streams, the most recently created one of them will be connected to, but you can make it less broad by including the name of your marker stream in the query, as in: type='Markers' and name='SNAP-Markers'. You can also include the hostname if there are other machines with streams with the same name on the network (see help for the 'query' parameter for additional information on advanced syntax).

    • verbose name: Marker Query
    • default value:
    • port type: StringPort
    • value type: str (can be None)
  • max_buflen
    Maximum amount of data to buffer. In seconds. If more data than this remains in flight between the sender and receiver (e.g., because the network cable was unplugged, or your app was paused and stopped picking up data), then you will lose some data samples. In all other cases, the data sent will be delivered in order without omissions.

    • verbose name: Maximum Buffer Length
    • default value: 30
    • port type: IntPort
    • value type: int (can be None)
  • max_chunklen
    Desired chunk length for transmission. In samples. This allows to override the preferred chunk size that the sender should send over the wire (if 0, the sender's preferred chunk size is used). Setting this does not guarantee that the returned packets will have this size, but it can be used as a hint to optimize transmission size, e.g., to tune network latency and overhead.

    • verbose name: Desired Chunk Length
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • max_blocklen
    Maximum packet size emitted by node. This setting allows to return the data buffered in the LSL node in packets no larger than this size (in samples). This is mostly for internal performance optimization, but can also be used to keep subsequent nodes from stalling when a long packet would be received after a pause (instead, the graph will progressively process the accumulated buffer and remain responsive).

    • verbose name: Maximum Output Packet Size
    • default value: 1024
    • port type: IntPort
    • value type: int (can be None)
  • recover
    Recover lost streams. Whether to attempt silent recovery of a lost LSL stream. There is usually no need to disable this feature.

    • verbose name: Recover Lost Streams
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • channel_names
    Override channel labels. If a list is provided, the channel labels of the data stream will be overridden accordingly.

    • verbose name: Override Channel Labels
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • data_dtype
    Optionally override the returned data type.

    • verbose name: Data Dtype
    • default value: float64
    • port type: EnumPort
    • value type: object (can be None)
  • nominal_rate
    Override sampling rate. If set, the nominal sampling rate of the packets emitted by this node will be set to this value.

    • verbose name: Override Sampling Rate
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • diagnostics
    Enable diagnostics. Can be used to monitor what kinds of data is being received from LSL, for debugging purposes.

    • verbose name: Enable Diagnostics
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • resolve_minimum_time
    Network scanning time to discover duplicate streams. If more than one stream is on the LSL network that matches the given query, this node will connect to the most recently created one of them. In order to ensure that all streams on the network have been discovered and none has been missed, the node will wait for at least this amount of time (in seconds).

    • verbose name: Network Scanning Time
    • default value: 0.5
    • port type: FloatPort
    • value type: float (can be None)
  • proc_clocksync
    Perform automatic clock synchronization; equivalent to manually adding the time_correction() value to the received time stamps.

    • verbose name: Proc Clocksync
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • proc_dejitter
    Remove jitter from time stamps. This will apply a smoothing algorithm to the received time stamps; the smoothing needs to see a minimum number of samples (30-120 seconds worst-case) until the remaining jitter is consistently below 1ms.

    • verbose name: Proc Dejitter
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • proc_monotonize
    Force the time-stamps to be monotonically ascending (only makes sense if timestamps are dejittered).

    • verbose name: Proc Monotonize
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • proc_threadsafe
    Post-processing is thread-safe (same inlet can be read from by multiple threads); uses somewhat more CPU.

    • verbose name: Proc Threadsafe
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • prealloc_buffer
    Preallocate buffer to fetch data and reuse across fetches. This can provide a slight performance improvement.

    • verbose name: Prealloc Buffer
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • omit_desc
    Omit the stream description field from the output data. Even if the desc is omitted, it may still be used to build the block axes.

    • verbose name: Omit Desc
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • exclude_desc_fields
    List of field names to drop from the desc metadata. Only used when omit_desc is False. 'channels' is a good field to drop because much of its information will already be preserved in the space axis.

    • verbose name: Exclude Desc Fields
    • default value: []
    • port type: ListPort
    • value type: list (can be None)

LSLOutput

Stream data out via the Lab Streaming Layer.

This node will stream the incoming data out over the LSL network, so that other programs or computers can pick up the data stream. LSL is an easy-to-use way to make time-series data available on the network, and is usable from a wide range of prgramming languages and operating systems. Important: keep in mind that the streams that you are sending to LSL will remain visible until you reset the graph, so when you are using LSL Inlets to acquire data, remember that you may still have streams on the network that are easily confused with real device streams (e.g., when you use broad queries such as type='EEG'). When using this node it is worth noting that, in LSL, all data is a multi-channel time series; if your packets have additional axes, like frequency, feature, and so on, these will be automatically vectorized into a flat list of channels. Also, if you send data with multiple instances into this node, subsequent instances will be concatenated along time, so the data seen by receivers will appear continuous and non-segmented (channels by samples). Check out the below link for more information on LSL. Note that this node outputs a single LSL stream and therefore if the incoming data packet has multiple streams (aka chunks), it will generate an LSL stream for the first stream only. If your data has multiple streams, use ExtractStreams before this node to ensure an LSL stream is created for a specific stream in the data.

More Info...

Version 1.4.2

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to send.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • stream_name
    Name of output data stream on LSL. Data will be published on LSL under this stream name.

    • verbose name: Stream Name
    • default value: OutStream
    • port type: StringPort
    • value type: str (can be None)
  • stream_type
    Type of output data stream. The LSL data stream will have this content-type. For control signals, the content type is usually Control. For raw data, content-types such as EEG, Gaze, Audio, VideoRaw, MoCap, etc. are commonly used. See also LSL documentation on content types for more info.

    • verbose name: Stream Type
    • default value: Control
    • port type: StringPort
    • value type: str (can be None)
  • source_id
    Unique data source identifier. If you assign this, then data receivers will be able to auto-recover your stream if you stop and restart your sender pipeline under the same ID. It is highly recommended to set this.

    • verbose name: Source Id
    • default value:
    • port type: StringPort
    • value type: str (can be None)
  • send_markers
    Send markers. This will open a second output stream on LSL that transmits marker contents (if a marker chunk is present in your data), with content-type Markers.

    • verbose name: Send Markers
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • marker_name
    Name of the marker stream on LSL. Marker data will be published in LSL under this stream name.

    • verbose name: Marker Stream Name
    • default value: OutStream-markers
    • port type: StringPort
    • value type: str (can be None)
  • marker_source_id
    Unique data source identifier. If you assign this, then data receivers will be able to auto-recover your stream if you stop and restart your sender pipeline under the same ID. It is highly recommended to set this.

    • verbose name: Marker Source Id
    • default value:
    • port type: StringPort
    • value type: str (can be None)
  • marker_field
    The name of the field in the instance axis of the markers chunk to use to populate the marker data.

    • verbose name: Marker Field
    • default value: Marker
    • port type: StringPort
    • value type: str (can be None)
  • numeric_marker_precision
    If the marker in marker_field is numeric then its conversion to string will use this many digits after the decimal place. See np.around decimals kwarg.

    • verbose name: Numeric Marker Precision
    • default value: 3
    • port type: IntPort
    • value type: int (can be None)
  • srate
    Override sampling rate. Allows you to override the nominal sampling rate of your stream. Usually the sampling rate will be correct, but e..g, if you collapse the data down to only one sample per tick (e.g., machine learning predictions), your sampling rate will equal NeuroPype's tick rate (25Hz by default).

    • verbose name: Override Sampling Rate
    • default value: None
    • port type: FloatPort
    • value type: float (can be None)
  • chunk_len
    Preferred output chunk length. This is the preferred length of chunks sent over the network, in samples. If set to 0, the same chunk length that goes into the node will be used.

    • verbose name: Preferred Chunk Length
    • default value: 0
    • port type: IntPort
    • value type: int (can be None)
  • max_buffered
    Maximum output buffer length. The maximum amount of data that is buffered for network transmission, in seconds. If your connection is interrupted for longer than this, your receiver will lose some data. However, excessively long buffers provide little value for real-time processing, where it is of no use to receive outdated data (and can hurt if the recipient has to process all these data).

    • verbose name: Max Output Buffer
    • default value: 60
    • port type: IntPort
    • value type: int (can be None)
  • use_numpy_optimization
    Use Numpy optimization in pylsl. You need a version of pylsl that supports this.

    • verbose name: Use Numpy Optimization
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • use_data_timestamps
    Use timestamps in data. This requires that the timestamps originally stem from some LSL clock (e.g., LSLInput node).

    • verbose name: Use Data Timestamps
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • reset_if_labels_changed
    Reset the outlet if the channel labels changed. If labels change in rapid succession, this can stall downstream inlets until the changes are complete.

    • verbose name: Reset If Labels Changed
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • ignore_signal_changed
    Do not reset outlet in case of a signal-changed notification. Since resetting the outlet causes a hitch in downstream processing, this option allows not resetting the outlet when details of the preceding graph are changed. Note that this can cause crashes (e.g., if the channel count changes), but it will work in case of only changes to the signal content.

    • verbose name: Ignore Signal Changed
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • numeric_label_precision
    The number of digits after the decimal to preserve when converting numeric axes (e.g . Frequency) to channel labels.

    • verbose name: Numeric Label Precision
    • default value: 1
    • port type: IntPort
    • value type: int (can be None)
  • keep_singleton_axes
    Keep singleton axes in the block when constructing LSL stream metadata including channel names. This parameter does not apply to TimeAxis and InstanceAxis.

    • verbose name: Keep Singleton Axes
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • separator
    Separator character to use when folding together multiple non-time and non-instance axes. For example, setting this to : with 2 space axes will create new channels of the form Fp1:C4, and so on.

    • verbose name: Separator
    • default value: -
    • port type: StringPort
    • value type: str (can be None)

MIDIOutput

Send data stream to a MIDI Output Port.

This node can send MIDI data streams to a device that's specified by name, which typically corresponds to a sound card, or an OS-provided MIDI port, but which can also include ports presented by various software applications (e.g., Loopmidi on Windows). On Linux/MacOS this can also include "virtual" MIDI ports, and the node can create such a named virtual port on demand if one does not yet exist. The node can currently send two kinds of MIDI messages, "note on" messages (equivalent to key presses on a MIDI keyboard), as well as "control change" (cc) messages, which correspond to actions of various other widgets on such keyboard (levers, sliders, buttons, etc.) or other MIDI-compatible devices. It's also possible to have the node automatically send "note off" messages when a note is no longer playing via the note_messages parameter. The node can send data simultaneously over any combination of MIDI channels (1-16), and it can accept data from multiple streams. Marker streams are ignored, but all other numeric data is generally emitted. There are two possible schemes for determining the MIDI channel that some value will go to: either based on the names of the incoming data channels (if a space axis is present), using a mapping dictionary that can be provided, and where multiple channels can go to the same MIDI channel OR based on the name of the stream (if multiple streams are incoming), where a simlar name-to-channel table can be specified. Generally, if a mapping match is found based on channel names, it takes precedence over a stream name match, and if nothing matches (or no rules are given), the data are sent over channel 1 (thus one can group data easily by stream, but have selective per-channel overrides on top of that). If time and/or instance axes are in the data, they are sent ordered by increasing time, but otherwise immediately upon arrival in the node. The type of MIDI message can be controlled as follows: if a feature axis is present, a Control Change message is sent for every data value, using a message type that depends on the respective feature name, where names can be either number strings (corresponding to 0-based MIDI control #'s, e.g., '10' meaning "Pan"), or the name of predefined MIDI control parameter (e.g., "Effect Control 2"), or a substring of a MIDI parameter (e.g., "Legato" for "Legato Footswitch"; note that if there are multiple matches, the one with the lower number will be taken). For convenience, a table of short-hand feature names can also be defined, which allows one to e.g., define that a feature named "feat1" maps to "Portamento"). Otherwise if a frequency axis is present, then a Note On message is sent where the frequency value determines the node after rounding (e.g., 7.1 maps to note 7). Other axis types are not supported by this node at this time. Not all streams need to have the same axes -- e.g., a stream may have a frequency axis (thus sending note on messages) while another stream may have a feature axis (thus sending note off messages). The node has some limited support for alternative backends and drivers (which require the respective Python and OS packages to be installed in the Python/OS environment). For debugging it is useful to enable the log_messages parameter. Note that values are sent at 7-bit resolution unless the support_lsb option is enabled (this applies only to parameters that support 14 bits).

More Info...

Version 0.9.6

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to send.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • port_name
    The name of the MIDI output device, physical or virtual, to stream MIDI events to. If not provided, the first available device is used.

    • verbose name: Midi Output Port
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • default_channel
    Default MIDI channel. If there is neither a per-stream override nor a per-channel override, the node will send data to this MIDI channel.

    • verbose name: Default Channel
    • default value: 1
    • port type: IntPort
    • value type: int (can be None)
  • streams_to_channels
    Associate stream names with channels. If provided, each input stream can be mapped onto a given MIDI channel. Wilcard characters are supported, and multiple streams can be mapped onto the same channel. For example, {'eeg*': 3, 'ecg',4} will remap data from any stream starting with 'eeg' to channel 3, and the ECG stream to channel 4. Note that MIDI channel numbering is 1-based (1-16).

    • verbose name: Streams To Channels
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • names_to_channels
    Associate input signal channel names (in a space axis) with MIDI channels. For example, {'mychan': 13'} will map data from each channel named 'mychan' (across any streams) to MIDI channel 13. Wilcard characters are supported (e.g., {'ch*': 16} would map all channels starting with ch to MIDI channel 16. Multiple data channels can be mapped onto the same MIDI channel.

    • verbose name: Names To Channels
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • features_to_controls
    Convenience substitution table from feature names to control code names. See MIDI 1.0 Spec, Control Change Message Types for the options and their official names. Note that you can also directly name your features to match certain control codes, e.g., "Volume". If your name is a substring of one of the control codes (e.g., "Volume" instead of "Channel Volume"), the first matching control code will be used. Lengthy substrings can also be abbreviated with wildchard characters, e.g., "General * 5" will match "General Purpose Controller 5"). This table is mostly useful to define short-hand feature names and/or as a way to swap the control mapping in once place.

    • verbose name: Features To Controls
    • default value: {'gp1': 'General Purpose Controller 1', 'gp2': 'General Purpose Controller 2', 'gp3': 'General Purpose Controller 3', 'gp4': 'General Purpose Controller 4', 'gp5': 'General Purpose Controller 5', 'gp6': 'General Purpose Controller 6', 'gp7': 'General Purpose Controller 7', 'gp8': 'General Purpose Controller 8', 'cc0': 'Bank Select', 'cc1': 'Modulation Wheel or Lever', 'cc2': 'Breath Controller', 'cc3': 'CC03', 'cc4': 'Foot Controller', 'cc5': 'Portamento Time', 'cc6': 'Data Entry', 'cc7': 'Channel Volume', 'sc1': 'Sound Controller 1', 'sc2': 'Sound Controller 2', 'sc3': 'Sound Controller 3', 'sc4': 'Sound Controller 4', 'sc5': 'Sound Controller 5', 'sc6': 'Sound Controller 6', 'sc7': 'Sound Controller 7', 'sc8': 'Sound Controller 8'}
    • port type: DictPort
    • value type: dict (can be None)
  • midi_backend
    MIDI Backend to use. RtMidi is the recommended and more flexible backend, particularly on Windows. PortMidi requires PortMidi to be installed.

    • verbose name: Midi Backend
    • default value: RtMidi
    • port type: EnumPort
    • value type: object (can be None)
  • os_driver
    OS-level driver to use. Currently, the JACK option is only available on Linux and MacOS, and only if rtmidi was installed with JACK support compiled in.

    • verbose name: Os Driver
    • default value: OS Native
    • port type: EnumPort
    • value type: object (can be None)
  • note_messages
    How note messages should be emitted. This is only used if incomding data has a frequency axis that encodes the notes to play. In repeated mode, note_on messages are sent repeatedly for each active note, and in retained mode, a single note_on message is sent whenever the data value changes, and once no more data is incoming, a note_off message is sent. Note that empty packages are currently ignored by this node, so you will not receive note_off messages when you stop sending data into the MIDI ndoe altogether.

    • verbose name: Note Messages
    • default value: repeated
    • port type: EnumPort
    • value type: object (can be None)
  • autoreset_on_close
    Autoreset on close. This emits reset commands over the port before closing to restore a clean slate in the devices that receive data from NeuroPype.

    • verbose name: Autoreset On Close
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • use_virtual_ports
    If a port name is provided and does not match one of the existing available output ports, an attempt is made to create a virtual MIDI port (not supported on Windows).

    • verbose name: Use Virtual Ports
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)
  • support_lsb
    Support sending LSB values. If enabled, then those parameters that support LSB values (14-bit resolution data) will have them sent.

    • verbose name: Support Sending Lsb Values
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • log_messages
    Enable debug logging of messages sent. Note that this will print the channels as 0-based, i.e., in the range 0-15 since this is a low-level printout.

    • verbose name: Log Messages
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • ignore_signal_changes
    Do not reset the state when a signal changed message is received from upstream nodes.

    • verbose name: Ignore Signal Changes
    • default value: True
    • port type: BoolPort
    • value type: bool (can be None)

OSCInput

Receive data stream from an inbound OSC connection.

This node receives numeric data as a OSC stream. This node acts as a OSC server and will listen for connections from a remote OSC client.

More Info...

Version 1.0.0

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data received.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • headset
    Headset type to read data from.

    • verbose name: Headset
    • default value: Muse 2
    • port type: EnumPort
    • value type: object (can be None)
  • host
    Hostname or IP on which this receiver is listening for OSC connections.

    • verbose name: Osc Hostname (Udp://:)
    • default value: 0.0.0.0
    • port type: StringPort
    • value type: str (can be None)
  • host_override
    If set, this will override the value stored in host.

    • verbose name: Host Override
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • listen_port
    UDP Port on which this receiver is listening to OSC connections.

    • verbose name: Osc Port (Udp://:)
    • default value: 5005
    • port type: IntPort
    • value type: int (can be None)
  • listen_port_override
    If set, this will override the value stored in port.

    • verbose name: Listen Port Override
    • default value: None
    • port type: IntPort
    • value type: int (can be None)
  • message_address
    OSC address to use for inbound OSC messages.

    • verbose name: Message Address
    • default value: None
    • port type: StringPort
    • value type: str (can be None)
  • channel_names
    Override channel labels. If a list is provided, the channel labels of the data stream will be overridden accordingly. This takes precedence over the use_standard_channel_names property.

    • verbose name: Override Channel Labels
    • default value: []
    • port type: ListPort
    • value type: list (can be None)
  • sampling_rate
    Nominal sampling rate of the OSC data stream.

    • verbose name: Sampling Rate
    • default value: None
    • port type: IntPort
    • value type: int (can be None)

OSCOutput

Send data stream to a remote OSC receiver.

This node sends numeric data out as a multi-channel stream, using OSC over a UDP transport. Note that due to the nature of UDP, it is possible to lose data packets. If your packets have additional axes, like frequency, feature, and so on, these will be automatically vectorized into a flat list of channels. Also, if you send data with multiple instances into this node, subsequent instances will be concatenated along time, so the data seen by receivers will appear continuous and non-segmented (channels by samples).

More Info...

Version 1.0.0

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to send.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • destination_host
    Hostname or IP address of the data receiver. Using 127.0.0.1 here will be the local machine.

    • verbose name: Receiver Hostname Or Ip
    • default value: 127.0.0.1
    • port type: StringPort
    • value type: str (can be None)
  • destination_port
    UDP port at which the data receiver is listening for connections.

    • verbose name: Receiver Port
    • default value: 9001
    • port type: IntPort
    • value type: int (can be None)
  • message_address
    Address to use for the messages. This is the OSC address under which messages will be sent.

    • verbose name: Message Address
    • default value: /data
    • port type: StringPort
    • value type: str (can be None)

TCPInput

Receive data stream from inbound TCP connection.

This node receives numeric data as a multi-channel stream in an easy-to-parse text format, with customizable value and sample separators. This node acts as a TCP server and will listen for connections from a remote TCP client.

More Info...

Version 1.0.0

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data received.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: OUT
  • listen_port
    TCP port number on which this receiver is listening for connections.

    • verbose name: Listen Port
    • default value: 57318
    • port type: IntPort
    • value type: int (can be None)
  • channel_separator
    Separating character or string that delimits individual channel values. The output will be a character stream where channel values are separated by this character.

    • verbose name: Channel Separator
    • default value: ,
    • port type: StringPort
    • value type: str (can be None)
  • sample_separator
    Separating character or string that delimits multi-channel samples. The output will be a character stream where channel values are separated by this character.

    • verbose name: Sample Separator
    • default value:

    • port type: StringPort

    • value type: str (can be None)
  • sampling_rate
    Nominal sampling rate of the data stream.

    • verbose name: Sampling Rate
    • default value: 125
    • port type: IntPort
    • value type: int (can be None)

TCPOutput

Output data via TCP.

This node can act either as a TCP client or a TCP server. Supports various kinds of message encodings and encoded content.

More Info...

Version 2.0.0

Ports/Properties

  • set_breakpoint
    Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

    • verbose name: Set Breakpoint (Debug Only)
    • default value: False
    • port type: BoolPort
    • value type: bool (can be None)
  • metadata
    User-definable meta-data associated with the node.

    • verbose name: Metadata
    • default value: {}
    • port type: DictPort
    • value type: dict (can be None)
  • data
    Data to send.

    • verbose name: Data
    • default value: None
    • port type: DataPort
    • value type: Packet (can be None)
    • data direction: IN
  • role
    Connection role. If set to client, then this node will actively connect to the given host/port where the other process is expected to be listening. If set to server, then this node will bind on the given port and IP address and listen for incoming connections.

    • verbose name: Client/server Role
    • default value: client
    • port type: EnumPort
    • value type: object (can be None)
  • host
    Hostname or IP address to use. In client mode, this identifies host to which to connect (e.g., 127.0.0.1 for local machine). In server mode, this node will bind on this IP address, which restricts from where incoming connections are accepted (127.0.0.1 restricts to connections from the same machine, and 0.0.0.0 allows incoming connections from anywhere).

    • verbose name: Tcp Hostname/ip
    • default value: 127.0.0.1
    • port type: StringPort
    • value type: str (can be None)
  • port
    TCP port to use. In client mode, this will connect to a (possibly remote) service listening on this port. In server mode, this node will itself listen on this port for connections.

    • verbose name: Tcp Port
    • default value: 57318
    • port type: IntPort
    • value type: int (can be None)
  • encoding
    Encoding format to use. CSV is the simplest one but only supports a flat 1d array per message. The other formats are fully general. JSON is human-readable, universally supported, and easy to parse, msgpack is binary and quite efficient (also commonly supported), yaml is human-readable and quite commonly supported, and pickle is binary and quite python-specific

    • verbose name: Message Encoding
    • default value: csv
    • port type: EnumPort
    • value type: object (can be None)
  • content
    Data content to transmit per message. The sample is the simplest one and contains just an array of channel values. Sample+ts includes the time-stamp as the last value. Ndarray is the n-way array for a given block. This only supports a single applicable stream in the data. Block is that plus axis descriptions. Chunk is a block plus meta-data. Packet is a dictionary/mapping of multiple named chunks.

    • verbose name: Content To Send
    • default value: sample
    • port type: EnumPort
    • value type: object (can be None)
  • subset
    Subset of chunks to consider for transmission.

    • verbose name: Stream Subset To Send
    • default value: both
    • port type: EnumPort
    • value type: object (can be None)