mhamilt / max-byte-cast

MaxMSP Object for casting lists of bytes to other data formats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

byte-cast

byte-cast is a MaxMSP utility object for casting a list of bytes to other data formats. Useful when interacting with Arduino using the serial object.

Install

Unzip the package folder into you ~/Documents/Max 8/Packages directory.

Usage

This release covers all the standard data types:

Format Data Type
i 32-bit int
h 16-bit int
f 32-bit float
s ASCII string (greedy)

Modifiers:

  • u: unsigned (i and h only)
  • >: Big endian (append)
  • <: Little endian (append)

Endianness Toggle:

0 or 1 in the right inlet will flip the endianness.

Behaviour

The string format will greedily use up the entire byte list and attempt to translate to ASCII characters until the end. Bytes outside of the symbol range 32 - 126 will be replaced with a ' ' character.

The number formats will send out a list for as many complete numbers that are available. Any incomplete numbers will be ignored.

e.g. if you send 7-bytes when in float format, a single number will be output. If you send 9-bytes, 2 numbers will be output.

About

MaxMSP Object for casting lists of bytes to other data formats

License:GNU General Public License v3.0


Languages

Language:Max 71.4%Language:C 28.6%