Read and write SYX (System Exclusive) file format.
Handles both binary and plain text (hex) formats.
Summary
Types
@type message() :: {:midi, {:sys_ex, maybe_improper_list() | binary()}}
Functions
@spec read_file(Path.t()) :: [message()] | {:error, File.posix()}
Read sysex messages from a SYX file.
Detects the binary format by the leading 0xF0 byte, otherwise treats the
file as whitespace-separated hex. Returns the list of {:midi, {:sys_ex, data}} messages found in the file, or {:error, reason}.
@spec write_file(Path.t(), [message()], keyword()) :: :ok | {:error, File.posix()}
Write sysex messages to a SYX file.