Roland Checksum - solution with lookup table or can something within sxformat be used to do the math?
Hi, I'm trying to solve a Roland checksum issue.
I've tried reading some of the other threads about this, but it seems that the data is slightly different for my Roland SoundCanvas synth.
Since I have a functioning Logic Pro X template with sysex faders, I've been recording what a single parameter does there, regards how the checksum changes while the value changes.
Here's what I came up with.
Value = Checksum
0 = 11
1 = 10
2 = 9
3 = 8
4 = 7
5 = 6
6 = 5
7 = 4
8 = 3
9 = 2
10 = 1
11 = 0
12 = 127
13 = 126
14 = 125
15 = 124
16 = 123
17 = 122
18 = 121
19 = 120
20 = 119
21 = 118
22 = 117
23 = 116
24 = 115
25 = 114
26 = 113
27 = 112
28 = 111
29 = 110
30 = 109
31 = 108
32 = 107
33 = 106
34 = 105
35 = 104
36 = 103
37 = 102
38 = 101
39 = 100
40 = 99
41 = 98
42 = 97
43 = 96
44 = 95
45 = 94
46 = 93
47 = 92
48 = 91
49 = 90
50 = 89
51 = 88
52 = 87
53 = 86
54 = 85
55 = 84
56 = 83
57 = 82
58 = 81
59 = 80
60 = 79
61 = 78
62 = 77
63 = 76
64 = 75
65 = 74
66 = 73
67 = 72
68 = 71
69 = 70
70 = 69
71 = 68
72 = 67
73 = 66
74 = 65
75 = 64
76 = 63
77 = 62
78 = 61
79 = 60
80 = 59
81 = 58
82 = 57
83 = 56
84 = 55
85 = 54
86 = 53
87 = 52
88 = 51
89 = 50
90 = 49
91 = 48
92 = 47
93 = 46
94 = 45
95 = 44
96 = 43
97 = 42
98 = 41
99 = 40
100 = 39
101 = 38
102 = 37
103 = 36
104 = 35
105 = 34
106 = 33
107 = 32
108 = 31
109 = 30
110 = 29
111 = 28
112 = 27
113 = 26
114 = 25
115 = 24
116 = 23
117 = 22
118 = 21
119 = 20
120 = 19
121 = 18
122 = 17
123 = 16
124 = 15
126 = 13
127 = 12
What I don't know, is how to take this list, and apply it inside the [sxformat] object.
[sxformat 240 65 16 66 18 64 1 52 / is $i1 / [here is where the calculation for the roland checksum should be made] / 247]
Any tips would be appreciated. I really banged my head against the wall until realized that the checksum was the issue here. is there a Max4Live method of just providing the roland checksum without having to build some sort of "if slider is 1, then $2 should be 9" type thing for all the 0...127 values?
it would be helpfull if you post links to that "other threads about this"
which you tried and also roland checksum calculation from midi specs part of user manual.
Maybe this will help, I found it in my repository.
I don't remember which device it was for.

checksum is a sum of values set by manufacturer.
In case of Roland, it should be address + data.
means cut F0 & header, sum address and data.
that forces one to use single sxformat for each
data type, if sysex string length changes.
sxformat for your example

65 66 18 is header
64 1 52 address
5,8,1 means sum items 5 - 8 (zero based index) in "normal" checksum mode
expr takes care to have it within 7bit range 0 - 127.
but for different length of sysex you need different checksum
for example if address has length of 4 instead of shown 3
you could also use a message like this.
here address is allready summed 64 + 1 + 52 = 117
