Limits test can be accessed by directly calling synth->interchange.testLimits(&<data block>) with the standard CommandBlock struct.

This is filled with a normal data block as if a command was being sent, however it has several forms.

*
We may need to rethink all of this as some situations are now apparent where it isn't a good fit.
*

1st form: data.value = FLT_MAX
From the command line enter 'direct' 'lim' control part kit etc.

This will return limits.min limits.max and limits.def values.

limits.def returns the actual default * 10. This is so that fractional values can be resolved. 0.5 comes up quite often. However the printed CLI response will be the actual value. All of these values may be negative.

'data.type' is returned with the read/write bit (0x40) set if this control is MIDI-learnable, and the float/integer bit (0x80) is correctly identified. All the other bits are returned as sent.

The data block will be corrupted as these values are short integers in place of the normal bytes.

If the routine returns min > max, it is a text entry and def will be a miscMsg ID number.

If the routine returns min and max as -1 and def as - 10 the command has not been recognised at all.


2nd form: data.value >= FLT_MAX / 2 but < FLT_MAX
From the CLI enter 'direct' 'def' control part etc.

This will *set* data.value to the default for that command and (if called from the CLI) then passes on to the routine that performs the action.

Currently text can't be directly set to the default.


3rd form: data.value is a normal value entry
From the CLI this is now automatically called for all routines using the new access method.

This tests the offered value against the min and max values and adjusts it to those limits if necessary before passing it on (if called from the CLI).

There are no practical tests for text entries.

