public class Line6Pod20Converter
Removes "Garbage Data" from Line6 response to dump request and extracts
desired patch. When responding to a sysex data dump request, the PODs
sometimes send a single sysex message and sometimes they send a block of
multiple messages along with garbage data (the behavior is unpredictable).
The last valid sysex message message sent is always the one we are interested
in but it can be preceded or succeeded with other garbage data. This
converter will attempt to parse out the last Pod patch in the block and
discard the rest of the data. It will work with any of the three patch types
(program, edit buffer, or bank). This converter will also convert an edit
buffer patch to a normal program patch.
public boolean supportsPatch(String patchString,
Extracts the last valid patch in a Line6 dump request and validates it.
Note that supportsPatch does not convert the patch. It only attempts to
parse out the last patch of a block of data and compare the header to the
Line6 header bytes. The job of actually converting the patch is handled
by extractPatch. If supportsPatch returns true, JSynthLib Core will call