1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
The learn process comes after *recognised* NRPNs and vectors, but before all other
controllers.
To learn, hold CTRL while right-clicking on any GUI control then operate a physical
control.
Along with parameters, a text string is provided with precise details of this
complete action.
Control capabilities:
Incoming CC and channel tracked (in that order).
Multiple actions on the same CC/channel pair.
Range limiting, compression or threshold setting.
Blocking of all later actions on the same CC / channel pair.
Muting of this action.
Status bits:
0 block
1 limit (otherwise compress)
2 mute
3 mark as an NRPN
4 mark as 7 bit NRPN
When sending internal control messages to the GUI (instead of passing on MIDI
actions) the part number will be 216 (0xd8) - a value that is never used in the rest
of the system.
This is used for updating the list and filling in/altering line entries. The gui
never does these directly, but requests them using the same part number.
Name strings are passed across using the simple message system. These are not
editable in the GUI.
These transfers are done outside the RT threads.
Normally the data will be sent as a complete instruction for one line.
data structure:
value line number (used as an integer)
type status - this is unique to MIDI learn
control normal use
part 216
kit CC
engine channel
insert min_in
parameter max_in
misMsg text message number
For NRPNs, CC has bit 16 set. This is so that even one with a current value less
than 127 won't be mistaken for a normal CC when being matched.
Currently there is a limit of 400 independent learned lines due to the use of
miscMsg to update the GUI when loading complete learned lists. In the future, the
GUI may be restricted to 'viewing groups' of 128 lines. This would allow a much
greater number.
Control numbers:
These redraw a line in place.
0 block switch
1 limit switch
2 mute switch
5 set min_in
6 set max-in
7 returned message to GUI
9 set NRPN - overwrites a normal CC and makes it unchangeable
These move a line, so a complete redraw is inititalsed.
8 delete line
16 write line
17 set CC
18 set channel
20 send list size
21 send ID of learn type message
22 open MIDI-learn editing window
24 incoming activity
96 clear all
The gui always does a redraw (except 20 & 21), but 0 to 7, 24 and 96 don't do a
list re-order first.
0x80 load list
0x81 load numbered item from recent history
0x82 save list
0x83 learned
*** UPDATE ***
How Max MIDI-learn lines has been increased.
This has been achieved by inserting a 10mS sleep every 32 lines while updating the
GUI. This ensures the message buffer doesn't get overloaded. There was no other
reason for the earlier limit. This still comes in at less that 1S for a full list
load.
Time to scan is very difficult to measure. Finding a bunch of 5 controls at the
end of a list of 20 usually returned less than 3uS, and very occasionally one at
around 8uS. The search is fairly straightforward so presumably ones right at the
end of a full list would be worst case around 160uS
|