search
Start typing to search...

Math / Text, Bytes Modules

Author: Aximmetry

Introduction

This document describes the built-in Flow Graph modules of the following categories for compounds:

  • Math / Text - Modules that format, parse, join, and transform text values and paths.
  • Math / Bytes - Modules that encode, decode, and convert byte sequences to and from numeric and text representations.

Math / Text

This section describes the built-in Flow Graph modules that format, parse, join, and transform text values and paths.

Angle To Text

  • Category: Math / Text
  • Access: All editions.
  • Function: Formats a decimal-degree angle as degrees, minutes, and seconds, with optional fractional seconds and a leading minus for negative angles.
  • Input pins:
    •   Value (double precision scalar) - Angle in decimal degrees.
    •   Sec Decimals (integer) - Number of digits after the decimal point in the seconds field (use zero for whole seconds only).
  • Output pins:
    •   Out (text) - Text with degree, minute, and second units in the formatter layout.

Array Text Concat

  • Category: Math / Text
  • Access: All editions.
  • Function: Walks array-compound mate instances over a selectable index span and joins their text, inserting a separator between kept segments.
  • Input pins:
    •   In (text) - The source value
    •   Separator (text) - Separator inserted between segments; escape sequences in this text are decoded.
    •   Skip Empty (logical) - When on, skips instances whose text is empty; when off, keeps every instance (including empty) and applies the usual separator rules.
    •   Start Index (integer) - First array-instance index (1-based) in the chain.
    •   Count (integer) - How many consecutive instances from StartIndex are included.
  • Output pins:
    •   Out (text) - Joined text for the visited instances.

Format Scalars

  • Category: Math / Text
  • Access: All editions.
  • Function: Fills one printf-style pattern from up to sixteen wired values in Value1 through Value16 order; validates the pattern, then outputs the text or clears output when validation or formatting fails.
  • Input pins:
    •   Format (text) - Printf-style pattern; placeholders bind to Value1 through Value16 in order.
    •   Value 1 (double precision scalar) - First argument bound to the format placeholders in sequence.
    •   Value 2 (double precision scalar) - Second argument bound to the format placeholders in sequence.
    •   Value 3 (double precision scalar) - Third argument bound to the format placeholders in sequence.
    •   Value 4 (double precision scalar) - Fourth argument bound to the format placeholders in sequence.
    •   Value 5 (double precision scalar) - Fifth argument bound to the format placeholders in sequence.
    •   Value 6 (double precision scalar) - Sixth argument bound to the format placeholders in sequence.
    •   Value 7 (double precision scalar) - Seventh argument bound to the format placeholders in sequence.
    •   Value 8 (double precision scalar) - Eighth argument bound to the format placeholders in sequence.
    •   Value 9 (double precision scalar) - Ninth argument bound to the format placeholders in sequence.
    •   Value 10 (double precision scalar) - Tenth argument bound to the format placeholders in sequence.
    •   Value 11 (double precision scalar) - Eleventh argument bound to the format placeholders in sequence.
    •   Value 12 (double precision scalar) - Twelfth argument bound to the format placeholders in sequence.
    •   Value 13 (double precision scalar) - Thirteenth argument bound to the format placeholders in sequence.
    •   Value 14 (double precision scalar) - Fourteenth argument bound to the format placeholders in sequence.
    •   Value 15 (double precision scalar) - Fifteenth argument bound to the format placeholders in sequence.
    •   Value 16 (double precision scalar) - Sixteenth argument bound to the format placeholders in sequence.
  • Output pins:
    •   Out (text) - Formatted and unescaped text, or empty when validation or printing fails.

Format Vector

  • Category: Math / Text
  • Access: All editions.
  • Function: Fills a printf-style pattern from vector components in order, using zero for missing components; outputs the formatted text or clears output when validation or formatting fails.
  • Input pins:
    •   Vector (vector) - Components bound to format placeholders by index.
    •   Format (text) - Printf-style pattern; each conversion maps to the component at the same placeholder index.
  • Output pins:
    •   Out (text) - Formatted and unescaped text on success, or empty when the pattern is invalid or printing fails.

Integer To Text

  • Category: Math / Text
  • Access: All editions.
  • Function: Converts an integer to digit text in a chosen base, with optional left zero padding and optional upper-case letters for bases above ten.
  • Input pins:
    •   Value (integer) - Integer to convert.
    •   Base (integer) - Radix from 2 through 36.
    •   Digits (integer) - Minimum number of digits; pads on the left with zeros when larger than the natural length (zero or unset uses the natural length only).
    •   Upper Case (logical) - When on, uses upper-case letters for digit values ten and above; when off, uses lower-case.
  • Output pins:
    •   Out (text) - Digit characters for the value in the chosen base.

Path Convert

  • Category: Math / Text
  • Access: All editions.
  • Function: Normalizes path text through the file manager as either a project-root-relative path or a full absolute path.
  • Input pins:
    •   Path (text) - Path text to convert.
    •   As Project (logical) - When on, converts to a path rooted at the project; when off, converts to a full absolute path.
  • Output pins:
    •   Out (text) - Converted path.

Path Split

  • Category: Math / Text
  • Access: All editions.
  • Function: Repairs slashes, then splits the path into drive, directory, file name, and extension using the host path rules.
  • Input pins:
    •   Path (text) - Path to split.
  • Output pins:
    •   Drive (text) - Drive or volume prefix.
    •   Directory (text) - Directory part, including any trailing separator the parser emits.
    •   Filename (text) - File name without extension.
    •   Extension (text) - Extension including a leading dot when present.

Scalar To Text

  • Category: Math / Text
  • Access: All editions.
  • Function: Formats one wired numeric value with a validated printf-style pattern containing exactly one placeholder (floating-point or integer-style conversion per specifier), then outputs the text or clears output when validation or formatting fails.
  • Input pins:
    •   Value (double precision scalar) - Numeric value passed to the single format conversion.
    •   Format (text) - Printf-style pattern with exactly one conversion specifier.
  • Output pins:
    •   Out (text) - Formatted and unescaped text, or empty when the pattern is invalid or formatting fails.

Text Case

  • Category: Math / Text
  • Access: All editions.
  • Function: Converts the whole text to upper or lower case.
  • Input pins:
    •   Text (text) - Input text.
    •   Upper (logical) - When on, converts to upper case; when off, converts to lower case.
  • Output pins:
    •   Out (text) - Text after the case change.

Text Concat

  • Category: Math / Text
  • Access: All editions.
  • Function: Joins two text inputs with a separator between them.
  • Input pins:
    •   A (text) - First part.
    •   B (text) - Second part.
    •   Separator (text) - Text placed between A and B; escape sequences are decoded.
  • Output pins:
    •   Out (text) - A, then the separator, then B.

Text Concat Multi

  • Category: Math / Text
  • Access: All editions.
  • Function: Joins sixteen text inputs in fixed pin order using one separator and optional omission of empty inputs.
  • Input pins:
    •   Separator (text) - Separator inserted between segments; escape sequences are decoded.
    •   Skip Empty (logical) - When on, skips empty inputs; when off, keeps empty inputs and uses the usual separator placement.
    •   Text 1 (text) - First text segment in fixed pin order.
    •   Text 2 (text) - Second text segment in fixed pin order.
    •   Text 3 (text) - Third text segment in fixed pin order.
    •   Text 4 (text) - Fourth text segment in fixed pin order.
    •   Text 5 (text) - Fifth text segment in fixed pin order.
    •   Text 6 (text) - Sixth text segment in fixed pin order.
    •   Text 7 (text) - Seventh text segment in fixed pin order.
    •   Text 8 (text) - Eighth text segment in fixed pin order.
    •   Text 9 (text) - Ninth text segment in fixed pin order.
    •   Text 10 (text) - Tenth text segment in fixed pin order.
    •   Text 11 (text) - Eleventh text segment in fixed pin order.
    •   Text 12 (text) - Twelfth text segment in fixed pin order.
    •   Text 13 (text) - Thirteenth text segment in fixed pin order.
    •   Text 14 (text) - Fourteenth text segment in fixed pin order.
    •   Text 15 (text) - Fifteenth text segment in fixed pin order.
    •   Text 16 (text) - Sixteenth text segment in fixed pin order.
  • Output pins:
    •   Out (text) - Joined text from Text1 through Text16 in pin order.

Text Contains

  • Category: Math / Text
  • Access: All editions.
  • Function: Outputs on when Text contains the Slice substring; comparison follows the case-sensitivity option.
  • Input pins:
    •   Text (text) - Text searched.
    •   Slice (text) - Substring to look for.
    •   Case Sensitive (logical) - When on, containment is case-sensitive; when off, case differences are ignored.
  • Output pins:
    •   Out (logical) - On when Slice occurs inside Text; off otherwise.

Text Equal

  • Category: Math / Text
  • Access: All editions.
  • Function: Outputs on when two texts match under the chosen case rules.
  • Input pins:
    •   A (text) - First text.
    •   B (text) - Second text.
    •   Case Sensitive (logical) - When on, compares with case sensitivity; when off, ignores case differences.
  • Output pins:
    •   Out (logical) - On when A and B compare equal.

Text Escape

  • Category: Math / Text
  • Access: All editions.
  • Function: Escapes text for C-style or JSON literals, HTML or XML, or URL encoding; optional broader non-ASCII escaping applies in C and HTML modes only.
  • Input pins:
    •   Text (text) - Source text.
    •   Mode (integer, Text Escape Mode) - Which escaping rules to use.
    •   All Non ASCII (logical) - When on, applies extended escaping to non-ASCII characters in C and HTML modes; has no effect in URL mode.
  • Output pins:
    •   Out (text) - Escaped text.

Text Length

  • Category: Math / Text
  • Access: All editions.
  • Function: Outputs the character count of the text.
  • Input pins:
    •   Text (text) - Text to measure.
  • Output pins:
    •   Out (integer) - Number of characters.

Text Not Equal

  • Category: Math / Text
  • Access: All editions.
  • Function: Outputs on when two texts differ under the chosen case rules.
  • Input pins:
    •   A (text) - First text.
    •   B (text) - Second text.
    •   Case Sensitive (logical) - When on, compares with case sensitivity; when off, ignores case differences.
  • Output pins:
    •   Out (logical) - On when A and B are not equal.

Text Replace

  • Category: Math / Text
  • Access: All editions.
  • Function: Finds a substring and substitutes replacement text from a chosen occurrence onward, optionally replacing every match, and outputs how many substitutions occurred.
  • Input pins:
    •   Text (text) - Text to search.
    •   What (text) - Substring to find.
    •   To (text) - Replacement text.
    •   All (logical) - When on, replaces every match from the start index onward; when off, replaces at most one match.
    •   Start Index (integer) - One-based occurrence index where searching begins.
    •   Case Sensitive (logical) - When on, matching is case-sensitive; when off, case differences are ignored.
  • Output pins:
    •   Out (text) - Text after substitution.
    •   Count (integer) - Number of replacements performed.

Text Slice

  • Category: Math / Text
  • Access: All editions.
  • Function: Treats the text as lines, delimiter-separated items, or fixed-width runs, extracts a contiguous range of items, and reports how many items exist before clamping the range.
  • Input pins:
    •   Text (text) - Full text to take a slice from.
    •   Separators (text) - Delimiter text for token mode when LineSepar is off; escape sequences are decoded. Leave empty for fixed-width runs using ItemSize.
    •   Multi Separ (logical) - When on, any character from Separators starts a split; when off, the whole Separators string must match.
    •   Line Separ (logical) - When on, items are whole lines (Separators are ignored for splitting); when off, separators or fixed-width slicing apply.
    •   Item Size (integer) - Character width per item in fixed-width mode (at least one).
    •   Start Index (integer) - One-based index of the first item to include.
    •   Count (integer) - How many consecutive items to include.
  • Output pins:
    •   Out (text) - Text spanning the selected items.
    •   Total Count (integer) - Total item count for the active mode before StartIndex and Count are clamped.

Text To Integer

  • Category: Math / Text
  • Access: All editions.
  • Function: Parses text as an integer in the chosen base; on failure outputs the fallback and sets the error output.
  • Input pins:
    •   Text (text) - Text to parse.
    •   Base (integer) - Radix from 2 through 36.
    •   Strict Err Chk (logical) - When on, requires a clean parse with no stray characters after the number; when off, allows looser parsing.
    •   Error Value (integer) - Integer output when parsing fails.
  • Output pins:
    •   Out (integer) - Parsed integer, or ErrorValue when parsing fails.
    •   Error (logical) - On when parsing fails; off when parsing succeeds.

Text To Scalar

  • Category: Math / Text
  • Access: All editions.
  • Function: Parses text as a floating-point value; on failure outputs the fallback and sets the error output.
  • Input pins:
    •   Text (text) - Text to parse.
    •   Strict Err Chk (logical) - When on, uses strict parsing rules; when off, allows looser parsing.
    •   Error Value (double precision scalar) - Numeric output when parsing fails.
  • Output pins:
    •   Out (double precision scalar) - Parsed value, or ErrorValue when parsing fails.
    •   Error (logical) - On when parsing fails; off when parsing succeeds.

Text To Time

  • Category: Math / Text
  • Access: All editions.
  • Function: Parses text into seconds using the configured media-time layout; outputs zero with error on failure and refreshes when the global base date changes.
  • Input pins:
    •   Text (text) - Time expression to parse.
    •   Format (integer, Media Time Format Type) - Media-time layout selector for the parser.
    •   Frames Per Second (integer) - Frame rate used when the format involves frames.
    •   Beats Per Minute (integer) - Tempo used when the format is musical.
    •   Beats Per Measure (integer) - Meter numerator used when the format is musical.
    •   Ticks Per Beat (integer) - Tick resolution used when the format is musical.
    •   Date Time Format (text) - strftime-style pattern when the format type uses date-and-time parsing.
  • Output pins:
    •   Out (double precision scalar) - Parsed time in seconds on success; zero on failure.
    •   Error (logical) - On when parsing fails; off when parsing succeeds.

Text To Timecode

  • Category: Math / Text
  • Access: All editions.
  • Function: Parses timecode text into an integer timecode, and reports parse errors.
  • Input pins:
    •   Text (text) - Timecode text to parse.
    •   Base (integer) - Frame base (frames per second) used when acting as master; zero selects the arrangement timecode base.
    •   Timecode Master (logical) - When on, overwrites system Master Timecode with the resulting timecode.
  • Output pins:
    •   Out (integer) - Parsed timecode value.
    •   Error (logical) - On when parsing fails; off when parsing succeeds.

Text To Vector

  • Category: Math / Text
  • Access: All editions.
  • Function: Splits text into fields separated by Separators and builds a vector of single-precision components; supports strict parsing, skipping failed fields or substituting them, and handling empty fields (empty Separators yields an empty vector).
  • Input pins:
    •   Text (text) - Text to split into fields.
    •   Separators (text) - Separator characters or string; must be non-empty or the output vector stays empty.
    •   Multi Separ (logical) - When on, any character in Separators starts a new field; when off, the whole Separators string must match.
    •   Strict Err Chk (logical) - When on, parsing uses strict rules; when off, parsing is more permissive.
    •   Skip Error (logical) - When on, drops fields that fail to parse; when off, inserts ErrorValue for failed fields.
    •   Error Value (scalar) - Component written when a field fails to parse and SkipError is off.
    •   Skip Empty (logical) - When on, skips empty fields after trimming; when off, writes EmptyValue for empty fields.
    •   Empty Value (scalar) - Component used for an empty field when SkipEmpty is off.
  • Output pins:
    •   Out (vector) - One component per retained field in order.
    •   Error (logical) - On when any field fails numeric parsing (including fields dropped when SkipError is on).

Text Trim

  • Category: Math / Text
  • Access: All editions.
  • Function: Removes leading whitespace, trailing whitespace, or both.
  • Input pins:
    •   Text (text) - Input text.
    •   Left (logical) - When on, trims leading whitespace.
    •   Right (logical) - When on, trims trailing whitespace.
  • Output pins:
    •   Out (text) - Text after trimming.

Text Unescape

  • Category: Math / Text
  • Access: All editions.
  • Function: Decodes C-style escapes, HTML or XML entities, or URL escapes according to the selected mode.
  • Input pins:
    •   Text (text) - Escaped input text.
    •   Mode (integer, Text Escape Mode) - Which decoding rules to apply.
  • Output pins:
    •   Out (text) - Decoded literal text.

Time To Text

  • Category: Math / Text
  • Access: All editions.
  • Function: Formats a time in seconds as text for the selected media-time layout; invalid date-and-time patterns log once and yield empty output until the pattern changes.
  • Input pins:
    •   Time (double precision scalar) - Time in seconds.
    •   Format (integer, Media Time Format Type) - Media-time layout (timecode-style, musical, date-and-time, etc.).
    •   Frames Per Second (integer) - Frame rate used by frame-based layouts.
    •   Beats Per Minute (integer) - Tempo used by musical layouts.
    •   Beats Per Measure (integer) - Meter numerator used by musical layouts.
    •   Ticks Per Beat (integer) - Tick resolution used by musical layouts.
    •   Date Time Format (text) - strftime-style pattern when the format type is date-and-time.
  • Output pins:
    •   Out (text) - Formatted text; for date-and-time layouts, stays empty while the pattern remains invalid after the first failed format attempt.

Timecode To Text

  • Category: Math / Text
  • Access: All editions.
  • Function: Formats an integer timecode as display text, with optional drop-frame notation where supported.
  • Input pins:
    •   Timecode (integer) - Timecode value to format.
    •   Drop Frame (logical) - When on, uses drop-frame notation when applicable.
  • Output pins:
    •   Out (text) - Formatted timecode text.

Vector To Text

  • Category: Math / Text
  • Access: All editions.
  • Function: Formats each vector component with one validated printf-style pattern, joins the segments with a separator, outputs EmptyText for an empty vector, or clears output when an item fails to format.
  • Input pins:
    •   Vector (vector) - Components formatted in index order.
    •   Item Format (text) - Printf-style pattern with exactly one placeholder, reused for every component.
    •   Separator (text) - Text between formatted items; escape sequences are decoded.
    •   Empty Text (text) - Output used when the vector has no components.
  • Output pins:
    •   Out (text) - Joined formatted items, EmptyText when the vector is empty, or empty when validation or per-item formatting fails.

Math / Bytes

This section describes the built-in Flow Graph modules that encode, decode, and convert byte sequences to and from numeric and text representations.

Bytes To Integer

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Reads one packed integer from the byte sequence at StartIndex, using the selected width and byte order.
  • Input pins:
    •   Bytes (vector) - Binary payload as a vector whose components each store one byte (0–255).
    •   Start Index (integer) - First byte position of the integer word to decode.
    •   Format (integer, Integer To Bytes Format) - Integer word size: 8-, 16-, 24-, or 32-bit.
    •   Big Endian (logical) - When on, uses big-endian byte order for the word; when off, little-endian.
  • Output pins:
    •   Out (integer) - The decoded integer.

Bytes To Scalar

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Decodes one packed numeric value from the bytes—half-, single-, or double-precision floats, or 8–64-bit integer storage—and outputs the result as a numeric value.
  • Input pins:
    •   Bytes (vector) - Binary payload as a vector whose components each store one byte (0–255).
    •   Start Index (integer) - First byte position of the value to decode.
    •   Format (integer, Scalar To Bytes Format) - Binary layout: 16-/32-/64-bit IEEE floats, or 8-/16-/24-/32-/64-bit integer words.
    •   Big Endian (logical) - When on, uses big-endian byte order for multi-byte words; when off, little-endian.
  • Output pins:
    •   Out (double precision scalar) - Decoded number: floats are read in their native width; integer words are converted to the output value.

Bytes To Text

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Formats the byte sequence as text: raw characters under a chosen encoding, a hexadecimal dump, or Base64.
  • Input pins:
    •   Bytes (vector) - Binary payload as a vector whose components each store one byte (0–255).
    •   Dest Format (integer, Text To Bytes Format) - Selects plain text, hexadecimal, or Base64 output.
    •   Text Encoding (integer, Text Exporter Encoding) - Character encoding used when DestFormat is plain text (including wide UTF-16 where two bytes form one character).
    •   Hex Separator (text) - Separator inserted between byte pairs when DestFormat is hexadecimal.
    •   Hex Columns (integer) - How many bytes appear per row in hexadecimal mode (layout width).
    •   Hex Grouping (integer) - Spacing or grouping stride between bytes in hexadecimal mode.
  • Output pins:
    •   Out (text) - The resulting text for the chosen format.

Bytes To Vector

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Decodes a run of consecutive values from the bytes—each as 16-bit float, 32-bit float, or 8–32-bit integer—and outputs them as one vector.
  • Input pins:
    •   Bytes (vector) - Binary payload as a vector whose components each store one byte (0–255).
    •   Start Index (integer) - First byte position of the first decoded value.
    •   Count (integer) - How many values to decode, which sets the output vector length.
    •   Format (integer, Vector To Bytes Format) - Word format applied to every value in the run.
    •   Big Endian (logical) - When on, uses big-endian byte order for each multi-byte word; when off, little-endian.
  • Output pins:
    •   Out (vector) - Decoded components stored as floats (integer words are promoted).

Integer To Bytes

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Encodes one integer into a contiguous byte sequence using the selected width and byte order.
  • Input pins:
    •   Value (integer) - Integer value to pack.
    •   Format (integer, Integer To Bytes Format) - Word size for the packed integer: 8-, 16-, 24-, or 32-bit.
    •   Big Endian (logical) - When on, writes big-endian byte order; when off, little-endian.
  • Output pins:
    •   Out (vector) - Packed bytes as a vector whose components each hold one byte (0–255).

Scalar To Bytes

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Encodes one numeric input into raw bytes using the chosen floating-point or integer binary layout and byte order.
  • Input pins:
    •   Value (double precision scalar) - Number to encode (converted per the selected format).
    •   Format (integer, Scalar To Bytes Format) - Binary layout: 16-/32-/64-bit floats, or 8-/16-/24-/32-/64-bit integer words.
    •   Big Endian (logical) - When on, writes big-endian byte order for multi-byte words; when off, little-endian.
  • Output pins:
    •   Out (vector) - Packed bytes as a vector whose components each hold one byte (0–255).

Text To Bytes

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Parses text as encoded characters, hexadecimal, or Base64 and outputs the recovered bytes, with an error indicator when decoding does not succeed.
  • Input pins:
    •   Text (text) - Input text to interpret according to SourceFormat.
    •   Source Format (integer, Text To Bytes Format) - Selects plain text, hexadecimal, or Base64 interpretation.
    •   Text Encoding (integer, Text Exporter Encoding) - Character encoding used when SourceFormat is plain text.
    •   Hex Allow Whitespace (logical) - When on, skips whitespace between hex digits; when off, whitespace is not ignored and decoding fails unless that character is listed in HexSeparators.
    •   Hex Separators (text) - Extra characters allowed as separators between hex digits.
  • Output pins:
    •   Out (vector) - Recovered binary as a vector whose components each hold one byte (0–255).
    •   Error (logical) - When on, decoding failed or produced no output; when off, Out holds the decoded bytes.

Vector To Bytes

  • Category: Math / Bytes
  • Access: All editions.
  • Function: Encodes each vector component with the same word format and concatenates the results into one continuous byte sequence.
  • Input pins:
    •   Value (vector) - Vector whose components are encoded in order.
    •   Format (integer, Vector To Bytes Format) - Word format applied to every component before concatenation.
    •   Big Endian (logical) - When on, writes big-endian byte order for each multi-byte word; when off, little-endian.
  • Output pins:
    •   Out (vector) - Concatenated packed bytes as a vector whose components each hold one byte (0–255).
Article Content

Loading
Close
Loading spinner icon
1/10