1 /* packet-sysex-digitech.c
3 * MIDI SysEx dissector for Digitech devices (DOD Electronics Corp.)
6 * SPDX-License-Identifier: GPL-2.0-or-later
11 #include <epan/packet.h>
12 #include <epan/conversation.h>
13 #include <epan/expert.h>
15 #include <wsutil/array.h>
17 void proto_register_sysex_digitech(void);
19 /* protocols and header fields */
20 static int proto_sysex_digitech
;
21 static int hf_digitech_device_id
;
22 static int hf_digitech_family_id
;
23 static int hf_digitech_rp_product_id
;
24 static int hf_digitech_unknown_product_id
;
25 static int hf_digitech_procedure_id
;
27 static int hf_digitech_desired_device_id
;
28 static int hf_digitech_desired_family_id
;
29 static int hf_digitech_desired_product_id
;
30 static int hf_digitech_received_device_id
;
31 static int hf_digitech_os_mode
;
33 static int hf_digitech_preset_bank
;
34 static int hf_digitech_preset_index
;
35 static int hf_digitech_preset_count
;
36 static int hf_digitech_preset_name
;
37 static int hf_digitech_preset_modified
;
39 static int hf_digitech_message_count
;
41 static int hf_digitech_parameter_count
;
42 static int hf_digitech_parameter_id
;
43 static int hf_digitech_parameter_id_global
;
44 static int hf_digitech_parameter_id_pickup
;
45 static int hf_digitech_parameter_id_wah
;
46 static int hf_digitech_parameter_id_compressor
;
47 static int hf_digitech_parameter_id_gnx3k_whammy
;
48 static int hf_digitech_parameter_id_distortion
;
49 static int hf_digitech_parameter_id_amp_channel
;
50 static int hf_digitech_parameter_id_amp
;
51 static int hf_digitech_parameter_id_amp_cabinet
;
52 static int hf_digitech_parameter_id_amp_b
;
53 static int hf_digitech_parameter_id_amp_cabinet_b
;
54 static int hf_digitech_parameter_id_noisegate
;
55 static int hf_digitech_parameter_id_volume_pre_fx
;
56 static int hf_digitech_parameter_id_chorusfx
;
57 static int hf_digitech_parameter_id_delay
;
58 static int hf_digitech_parameter_id_reverb
;
59 static int hf_digitech_parameter_id_volume_post_fx
;
60 static int hf_digitech_parameter_id_preset
;
61 static int hf_digitech_parameter_id_wah_min_max
;
62 static int hf_digitech_parameter_id_equalizer
;
63 static int hf_digitech_parameter_id_equalizer_b
;
64 static int hf_digitech_parameter_id_amp_loop
;
66 static int hf_digitech_parameter_position
;
67 static int hf_digitech_parameter_data
;
68 static int hf_digitech_parameter_data_count
;
69 static int hf_digitech_parameter_data_two_byte_count
;
70 static int hf_digitech_parameter_multibyte_data
;
72 static int hf_digitech_ack_request_proc_id
;
73 static int hf_digitech_nack_request_proc_id
;
75 static int hf_digitech_checksum
;
76 static int hf_digitech_checksum_status
;
78 static int ett_sysex_digitech
;
80 static expert_field ei_digitech_checksum_bad
;
81 static expert_field ei_digitech_undecoded
;
83 typedef struct _digitech_conv_data_t
{
85 } digitech_conv_data_t
;
87 #define DIGITECH_FAMILY_X_FLOOR 0x5C
88 #define DIGITECH_FAMILY_JAMMAN 0x5D
89 #define DIGITECH_FAMILY_RP 0x5E
90 #define DIGITECH_FAMILY_RACK 0x5F
91 #define DIGITECH_FAMILY_VOCALIST 0x60
93 static const value_string digitech_family_id
[] = {
94 {DIGITECH_FAMILY_X_FLOOR
, "\"X\" Floor Guitar Processor"},
95 {DIGITECH_FAMILY_JAMMAN
, "JamMan"},
96 {DIGITECH_FAMILY_RP
, "RP series"},
97 {DIGITECH_FAMILY_RACK
, "Rack"},
98 {DIGITECH_FAMILY_VOCALIST
, "Vocalist"},
103 static const value_string digitech_rp_product_id
[] = {
116 typedef enum _digitech_procedure_id
{
117 DIGITECH_PROCEDURE_REQUEST_WHO_AM_I
= 0x01,
118 DIGITECH_PROCEDURE_RECEIVE_WHO_AM_I
= 0x02,
120 DIGITECH_PROCEDURE_REQUEST_DEVICE_CONFIGURATION
= 0x08,
121 DIGITECH_PROCEDURE_RECEIVE_DEVICE_CONFIGURATION
= 0x09,
123 DIGITECH_PROCEDURE_REQUEST_GLOBAL_PARAMETERS
= 0x10,
124 DIGITECH_PROCEDURE_RECEIVE_GLOBAL_PARAMETERS
= 0x11,
126 DIGITECH_PROCEDURE_REQUEST_BULK_DUMP
= 0x18,
127 DIGITECH_PROCEDURE_RECEIVE_BULK_DUMP_START
= 0x19,
128 DIGITECH_PROCEDURE_RECEIVE_BULK_DUMP_END
= 0x1B,
130 DIGITECH_PROCEDURE_RECEIVE_USER_PRESET_INDEX_TABLE
= 0x20,
132 DIGITECH_PROCEDURE_REQUEST_PRESET_NAMES
= 0x21,
133 DIGITECH_PROCEDURE_RECEIVE_PRESET_NAMES
= 0x22,
135 DIGITECH_PROCEDURE_REQUEST_PRESET_NAME
= 0x28,
136 DIGITECH_PROCEDURE_RECEIVE_PRESET_NAME
= 0x29,
138 DIGITECH_PROCEDURE_REQUEST_PRESET
= 0x2A,
139 DIGITECH_PROCEDURE_RECEIVE_PRESET_START
= 0x2B,
140 DIGITECH_PROCEDURE_RECEIVE_PRESET_END
= 0x2C,
141 DIGITECH_PROCEDURE_RECEIVE_PRESET_PARAMETERS
= 0x2D,
143 DIGITECH_PROCEDURE_LOAD_EDIT_BUFFER_PRESET
= 0x38, /* version 0 only
144 use move preset in later versions */
146 DIGITECH_PROCEDURE_MOVE_PRESET
= 0x39,
148 DIGITECH_PROCEDURE_REQUEST_MODIFIER_LINKABLE_LIST
= 0x3A,
149 DIGITECH_PROCEDURE_RECEIVE_MODIFIER_LINKABLE_LIST
= 0x3B,
151 DIGITECH_PROCEDURE_REQUEST_PARAMETER_VALUE
= 0x40,
152 DIGITECH_PROCEDURE_RECEIVE_PARAMETER_VALUE
= 0x41,
154 /* version 1 and later */
155 DIGITECH_PROCEDURE_REQUEST_OBJECT_NAMES
= 0x50,
156 DIGITECH_PROCEDURE_RECEIVE_OBJECT_NAMES
= 0x51,
157 DIGITECH_PROCEDURE_REQUEST_OBJECT_NAME
= 0x52,
158 DIGITECH_PROCEDURE_RECEIVE_OBJECT_NAME
= 0x53,
159 DIGITECH_PROCEDURE_REQUEST_OBJECT
= 0x54,
160 DIGITECH_PROCEDURE_RECEIVE_OBJECT
= 0x55,
161 DIGITECH_PROCEDURE_MOVE_OBJECT
= 0x56,
162 DIGITECH_PROCEDURE_DELETE_OBJECT
= 0x57,
163 DIGITECH_PROCEDURE_REQUEST_TABLE
= 0x5A,
164 DIGITECH_PROCEDURE_RECEIVE_TABLE
= 0x5B,
166 DIGITECH_PROCEDURE_RECEIVE_DEVICE_NOTIFICATION
= 0x70,
168 DIGITECH_PROCEDURE_START_OS_DOWNLOAD
= 0x71,
169 DIGITECH_PROCEDURE_RESTART_DEVICE
= 0x72,
170 DIGITECH_PROCEDURE_REQUEST_DEBUG_DATA
= 0x73,
171 DIGITECH_PROCEDURE_RECEIVE_DEBUG_DATA
= 0x74,
173 DIGITECH_PROCEDURE_ACK
= 0x7E,
174 DIGITECH_PROCEDURE_NACK
= 0x7F
175 } digitech_procedure_id
;
177 static const value_string digitech_procedures
[] = {
178 {DIGITECH_PROCEDURE_REQUEST_WHO_AM_I
, "Request WhoAmI"},
179 {DIGITECH_PROCEDURE_RECEIVE_WHO_AM_I
, "Receive WhoAmI"},
180 {DIGITECH_PROCEDURE_REQUEST_DEVICE_CONFIGURATION
, "Request Device Configuration"},
181 {DIGITECH_PROCEDURE_RECEIVE_DEVICE_CONFIGURATION
, "Receive Device Configuration"},
182 {DIGITECH_PROCEDURE_REQUEST_GLOBAL_PARAMETERS
, "Request Global Parameters"},
183 {DIGITECH_PROCEDURE_RECEIVE_GLOBAL_PARAMETERS
, "Receive Global Parameters"},
184 {DIGITECH_PROCEDURE_REQUEST_BULK_DUMP
, "Request Bulk Dump"},
185 {DIGITECH_PROCEDURE_RECEIVE_BULK_DUMP_START
, "Receive Bulk Dump Start"},
186 {DIGITECH_PROCEDURE_RECEIVE_BULK_DUMP_END
, "Receive Bulk Dump End"},
187 {DIGITECH_PROCEDURE_RECEIVE_USER_PRESET_INDEX_TABLE
, "Receive User Preset Index Table"},
188 {DIGITECH_PROCEDURE_REQUEST_PRESET_NAMES
, "Request Preset Names"},
189 {DIGITECH_PROCEDURE_RECEIVE_PRESET_NAMES
, "Receive Preset Names"},
190 {DIGITECH_PROCEDURE_REQUEST_PRESET_NAME
, "Request Preset Name"},
191 {DIGITECH_PROCEDURE_RECEIVE_PRESET_NAME
, "Receive Preset Name"},
192 {DIGITECH_PROCEDURE_REQUEST_PRESET
, "Request Preset"},
193 {DIGITECH_PROCEDURE_RECEIVE_PRESET_START
, "Receive Preset Start"},
194 {DIGITECH_PROCEDURE_RECEIVE_PRESET_END
, "Receive Preset End"},
195 {DIGITECH_PROCEDURE_RECEIVE_PRESET_PARAMETERS
, "Receive Preset Parameters"},
196 {DIGITECH_PROCEDURE_LOAD_EDIT_BUFFER_PRESET
, "Load Edit Buffer Preset"},
197 {DIGITECH_PROCEDURE_MOVE_PRESET
, "Move Preset"},
198 {DIGITECH_PROCEDURE_REQUEST_MODIFIER_LINKABLE_LIST
, "Request Modifier-Linkable List"},
199 {DIGITECH_PROCEDURE_RECEIVE_MODIFIER_LINKABLE_LIST
, "Receive Modifier-Linkable List"},
200 {DIGITECH_PROCEDURE_REQUEST_PARAMETER_VALUE
, "Request Parameter Value"},
201 {DIGITECH_PROCEDURE_RECEIVE_PARAMETER_VALUE
, "Receive Parameter Value"},
202 {DIGITECH_PROCEDURE_REQUEST_OBJECT_NAMES
, "Request Object Names"},
203 {DIGITECH_PROCEDURE_RECEIVE_OBJECT_NAMES
, "Receive Object Names"},
204 {DIGITECH_PROCEDURE_REQUEST_OBJECT_NAME
, "Request Object Name"},
205 {DIGITECH_PROCEDURE_RECEIVE_OBJECT_NAME
, "Receive Object Name"},
206 {DIGITECH_PROCEDURE_REQUEST_OBJECT
, "Request Object"},
207 {DIGITECH_PROCEDURE_RECEIVE_OBJECT
, "Receive Object"},
208 {DIGITECH_PROCEDURE_MOVE_OBJECT
, "Move Object"},
209 {DIGITECH_PROCEDURE_DELETE_OBJECT
, "Delete Object"},
210 {DIGITECH_PROCEDURE_REQUEST_TABLE
, "Request Table"},
211 {DIGITECH_PROCEDURE_RECEIVE_TABLE
, "Receive Table"},
212 {DIGITECH_PROCEDURE_RECEIVE_DEVICE_NOTIFICATION
, "Receive Device Notification"},
213 {DIGITECH_PROCEDURE_START_OS_DOWNLOAD
, "Start OS Download"},
214 {DIGITECH_PROCEDURE_RESTART_DEVICE
, "Restart Device"},
215 {DIGITECH_PROCEDURE_REQUEST_DEBUG_DATA
, "Request Debug Data"},
216 {DIGITECH_PROCEDURE_RECEIVE_DEBUG_DATA
, "Receive Debug Data"},
217 {DIGITECH_PROCEDURE_ACK
, "ACK"},
218 {DIGITECH_PROCEDURE_NACK
, "NACK"},
221 static value_string_ext digitech_procedures_ext
=
222 VALUE_STRING_EXT_INIT(digitech_procedures
);
224 static const value_string digitech_os_modes
[] = {
230 static const value_string digitech_preset_banks
[] = {
231 {0, "Factory (fixed) bank"},
234 {3, "Media card (CF or other)"},
235 {4, "Current preset edit buffer"},
236 {5, "Second factory bank"},
237 {6, "External preset"},
241 static const value_string digitech_parameter_ids_global
[] = {
242 {12361, "Amp/Cab Bypass On/Off"},
243 {12298, "GUI Mode On/Off"},
247 static const value_string digitech_parameter_ids_pickup
[] = {
248 {65, "Pickup On/Off"},
252 static const value_string digitech_parameter_ids_wah
[] = {
258 static const value_string digitech_parameter_ids_compressor
[] = {
259 {193, "Compressor On/Off"},
260 {194, "Compressor Attack"},
261 {195, "Compressor Ratio"},
262 {200, "Compressor Threshold"},
263 {201, "Compressor Gain"},
264 {208, "Compressor Sustain"},
265 {209, "Compressor Tone"},
266 {210, "Compressor Level"},
267 {211, "Compressor Attack"},
268 {212, "Compressor Output"},
269 {213, "Compressor Sensitivity"},
273 static const value_string digitech_parameter_ids_gnx3k_whammy
[] = {
274 {769, "Whammy/IPS On/Off"},
275 {1667, "Whammy/IPS Detune Level"},
276 {1670, "Whammy/IPS Detune Shift Amount"},
277 {1731, "Whammy/IPS Pitch Shift Level"},
278 {1732, "Whammy/IPS Pitch Shift Shift Amount"},
279 {1795, "Whammy/IPS Whammy Pedal"},
280 {1796, "Whammy/IPS Whammy Mix"},
281 {1797, "Whammy/IPS Whammy Shift Amount"},
282 {2754, "Whammy/IPS IPS Shift Amount"},
283 {2755, "Whammy/IPS IPS Scale"},
284 {2756, "Whammy/IPS IPS Key"},
285 {2757, "Whammy/IPS IPS Level"},
286 {2818, "Whammy/IPS Talker Mic Level"},
289 static value_string_ext digitech_parameter_ids_gnx3k_whammy_ext
=
290 VALUE_STRING_EXT_INIT(digitech_parameter_ids_gnx3k_whammy
);
292 static const value_string digitech_parameter_ids_distortion
[] = {
293 {2433, "Distortion On/Off"},
294 {2434, "Distortion Screamer Drive"},
295 {2435, "Distortion Screamer Tone"},
296 {2436, "Distortion Screamer Level"},
297 {2437, "Distortion Rodent Dist"},
298 {2438, "Distortion Rodent Filter"},
299 {2439, "Distortion Rodent Level"},
300 {2440, "Distortion DS Gain"},
301 {2441, "Distortion DS Tone"},
302 {2442, "Distortion DS Level"},
303 {2443, "Distortion DOD250 Gain"},
304 {2444, "Distortion DOD250 Level"},
305 {2445, "Distortion Big MP Sustain"},
306 {2446, "Distortion Big MP Tone"},
307 {2447, "Distortion Big MP Volume"},
308 {2448, "Distortion GuyOD Drive"},
309 {2449, "Distortion GuyOD Level"},
310 {2450, "Distortion Sparkdrive Gain"},
311 {2451, "Distortion Sparkdrive Tone"},
312 {2452, "Distortion Sparkdrive Clean"},
313 {2453, "Distortion Sparkdrive Volume"},
314 {2454, "Distortion Grunge Grunge"},
315 {2455, "Distortion Grunge Butt"},
316 {2456, "Distortion Grunge Face"},
317 {2457, "Distortion Grunge Loud"},
318 {2458, "Distortion Fuzzy Fuzz"},
319 {2459, "Distortion Fuzzy Volume"},
320 {2460, "Distortion Zone Gain"},
321 {2461, "Distortion Zone Mid freq"},
322 {2462, "Distortion Zone Mid level"},
323 {2463, "Distortion Zone Low"},
324 {2464, "Distortion Zone High"},
325 {2465, "Distortion Zone Level"},
326 {2466, "Distortion 8tavia Drive"},
327 {2467, "Distortion 8tavia Volume"},
328 {2468, "Distortion MX Dist"},
329 {2469, "Distortion MX Output"},
330 {2470, "Distortion Gonk Suck"},
331 {2471, "Distortion Gonk Smear"},
332 {2472, "Distortion Gonk Heave"},
333 {2473, "Distortion 808 Overdrive"},
334 {2474, "Distortion 808 Tone"},
335 {2475, "Distortion 808 Level"},
336 {2476, "Distortion Death Mid"},
337 {2477, "Distortion Death Low"},
338 {2478, "Distortion Death Level"},
339 {2479, "Distortion Death High"},
340 {2480, "Distortion Gonk Gonk"},
341 {2481, "Distortion Fuzzlator Fuzz"},
342 {2482, "Distortion Fuzzlator Tone"},
343 {2483, "Distortion Fuzzlator LooseTight"},
344 {2484, "Distortion Fuzzlator Volume"},
345 {2485, "Distortion Classic Fuzz Fuzz"},
346 {2486, "Distortion Classic Fuzz Tone"},
347 {2487, "Distortion Classic Fuzz Volume"},
348 {2488, "Distortion Redline Gain"},
349 {2489, "Distortion Redline Low"},
350 {2490, "Distortion Redline High"},
351 {2491, "Distortion Redline Level"},
352 {2492, "Distortion OC Drive Drive"},
353 {2493, "Distortion OC Drive HP/LP"},
354 {2494, "Distortion OC Drive Tone"},
355 {2495, "Distortion OC Drive Level"},
356 {2562, "Distortion TS Mod Drive"},
357 {2563, "Distortion TS Mod Level"},
358 {2564, "Distortion TS Mod Tone"},
359 {2565, "Distortion SD Overdrive Drive"},
360 {2566, "Distortion SD Overdrive Tone"},
361 {2567, "Distortion SD Overdrive Level"},
362 {2568, "Distortion OD Overdrive Overdrive"},
363 {2569, "Distortion OD Overdrive Level"},
364 {2570, "Distortion Amp Driver Gain"},
365 {2571, "Distortion Amp Driver Mid Boost"},
366 {2572, "Distortion Amp Driver Level"},
369 static value_string_ext digitech_parameter_ids_distortion_ext
=
370 VALUE_STRING_EXT_INIT(digitech_parameter_ids_distortion
);
372 static const value_string digitech_parameter_ids_amp_channel
[] = {
373 {260, "Amp Channel Amp Channel"},
374 {261, "Amp Channel Warp"},
375 {262, "Amp Channel Amp Warp"},
376 {263, "Amp Channel Cabinet Warp"},
380 static const value_string digitech_parameter_ids_amp
[] = {
381 {265, "Amplifier On/Off"},
382 {2497, "Amplifier Gain"},
383 {2498, "Amplifier Level"},
384 {2499, "Channel 1 Bass Freq"},
385 {2500, "Channel 1 Bass Level"},
386 {2501, "Channel 1 Mid Freq"},
387 {2502, "Channel 1 Mid Level"},
388 {2503, "Channel 1 Treb Freq"},
389 {2504, "Channel 1 Treb Level"},
390 {2505, "EQ Enable On/Off"},
391 {2506, "Channel 1 Presence"},
392 {2507, "Amplifier Bass"},
393 {2508, "Amplifier Mid"},
394 {2509, "Amplifier Treble"},
397 static value_string_ext digitech_parameter_ids_amp_ext
=
398 VALUE_STRING_EXT_INIT(digitech_parameter_ids_amp
);
400 static const value_string digitech_parameter_ids_amp_cabinet
[] = {
401 {2561, "Channel 1 Tuning"},
405 static const value_string digitech_parameter_ids_amp_b
[] = {
406 {265, "Amplifier B On/Off"},
407 {2497, "Amplifier B Gain"},
408 {2498, "Amplifier B Level"},
409 {2499, "Channel 2 Bass Freq"},
410 {2500, "Channel 2 Bass Level"},
411 {2501, "Channel 2 Mid Freq"},
412 {2502, "Channel 2 Mid Level"},
413 {2503, "Channel 2 Treb Freq"},
414 {2504, "Channel 2 Treb Level"},
415 {2505, "EQ Enable On/Off"},
416 {2506, "Channel 2 Presence"},
420 static const value_string digitech_parameter_ids_amp_cabinet_b
[] = {
421 {2561, "Channel 2 Tuning"},
425 static const value_string digitech_parameter_ids_noisegate
[] = {
426 {705, "Noisegate On/Off"},
427 {706, "Noisegate Attack"},
428 {710, "Noisegate Threshold"},
429 {711, "Noisegate Sens"},
430 {712, "Noisegate Attack"},
431 {713, "Noisegate Release"},
432 {714, "Noisegate Attn"},
436 static const value_string digitech_parameter_ids_volume_pre_fx
[] = {
437 {2626, "Pickup Volume Pre FX"},
441 static const value_string digitech_parameter_ids_chorusfx
[] = {
442 {769, "Chorus/FX On/Off"},
443 {836, "Chorus/FX Chorus Level"},
444 {837, "Chorus/FX Chorus Speed"},
445 {838, "Chorus/FX CE/Dual/Multi Chorus Depth"},
446 {839, "Chorus/FX Chorus Predelay"},
447 {840, "Chorus/FX Dual/Multi Chorus Wave"},
448 {841, "Chorus/FX Chorus Balance"},
449 {848, "Chorus/FX Chorus Width"},
450 {849, "Chorus/FX Chorus Intensity"},
451 {850, "Chorus/FX Small Clone Rate"},
452 {901, "Chorus/FX Flanger Level/Mix"},
453 {902, "Chorus/FX Flanger Speed"},
454 {903, "Chorus/FX Flanger Depth"},
455 {904, "Chorus/FX Flanger Regen"},
456 {905, "Chorus/FX Flanger Waveform"},
457 {906, "Chorus/FX Flanger Balance"},
458 {914, "Chorus/FX Flanger Width"},
459 {916, "Chorus/FX Flanger Color"},
460 {917, "Chorus/FX Flanger Manual"},
461 {918, "Chorus/FX Flanger Rate"},
462 {919, "Chorus/FX Flanger Range"},
463 {920, "Chorus/FX Flanger Enhance"},
464 {921, "Chorus/FX Flanger Harmonics"},
465 {922, "Chorus/FX Filter Flanger Frequency"},
466 {962, "Chorus/FX Phaser Speed"},
467 {963, "Chorus/FX Phaser Depth"},
468 {965, "Chorus/FX Phaser Level"},
469 {966, "Chorus/FX Phaser Regen"},
470 {967, "Chorus/FX Phaser Waveform"},
471 {968, "Chorus/FX Phaser Balance"},
472 {976, "Chorus/FX MX Phaser Intensity"},
473 {977, "Chorus/FX EH Phaser Color"},
474 {979, "Chorus/FX EH Phaser Rate"},
475 {1028, "Chorus/FX Triggered Flanger Lfo Start"},
476 {1029, "Chorus/FX Triggered Flanger/Phaser Mix"},
477 {1030, "Chorus/FX Triggered Flanger Speed"},
478 {1031, "Chorus/FX Triggered Flanger Sens"},
479 {1032, "Chorus/FX Triggered Flanger Level"},
480 {1092, "Chorus/FX Triggered Phaser Lfo Start"},
481 {1094, "Chorus/FX Triggered Phaser Speed"},
482 {1095, "Chorus/FX Triggered Phaser Sens"},
483 {1096, "Chorus/FX Triggered Phaser Level"},
484 {1155, "Chorus/FX Tremolo Depth"},
485 {1156, "Chorus/FX Tremolo Speed"},
486 {1157, "Chorus/FX Tremolo Wave"},
487 {1219, "Chorus/FX Panner Depth"},
488 {1220, "Chorus/FX Panner Speed"},
489 {1221, "Chorus/FX Panner Wave"},
490 {1284, "Chorus/FX Vibrato Speed"},
491 {1285, "Chorus/FX Vibrato Depth"},
492 {1286, "Chorus/FX Vibrato Waveform"},
493 {1314, "Chorus/FX Vibropan Speed"},
494 {1315, "Chorus/FX Vibropan Depth"},
495 {1316, "Chorus/FX Vibropan Vibra"},
496 {1317, "Chorus/FX Vibropan Wave"},
497 {1346, "Chorus/FX Rotary Speed"},
498 {1348, "Chorus/FX Rotary Intensity"},
499 {1349, "Chorus/FX Rotary Mix"},
500 {1350, "Chorus/FX Rotary Doppler"},
501 {1351, "Chorus/FX Rotary Crossover"},
502 {1352, "Chorus/FX Rotary Balance"},
503 {1410, "Chorus/FX YaYa Pedal"},
504 {1412, "Chorus/FX YaYa Range"},
505 {1413, "Chorus/FX YaYa Mix"},
506 {1414, "Chorus/FX YaYa Depth"},
507 {1416, "Chorus/FX YaYa Balance"},
508 {1417, "Chorus/FX YaYa Intensity"},
509 {1418, "Chorus/FX YaYa Range"},
510 {1476, "Chorus/FX AutoYa Range"},
511 {1477, "Chorus/FX AutoYa Mix"},
512 {1478, "Chorus/FX AutoYa Speed"},
513 {1479, "Chorus/FX AutoYa Depth"},
514 {1481, "Chorus/FX AutoYa Balance"},
515 {1482, "Chorus/FX AutoYa Intensity"},
516 {1483, "Chorus/FX AutoYa Range"},
517 {1540, "Chorus/FX Synthtalk Vox"},
518 {1542, "Chorus/FX Synthtalk Attack"},
519 {1543, "Chorus/FX Synthtalk Release"},
520 {1544, "Chorus/FX Synthtalk Sens"},
521 {1545, "Chorus/FX Synthtalk Balance"},
522 {1604, "Chorus/FX Envelope Mix"},
523 {1605, "Chorus/FX Envelope/FX25 Range"},
524 {1606, "Chorus/FX Envelope/FX25 Sensitivity"},
525 {1607, "Chorus/FX Envelope Balance"},
526 {1608, "Chorus/FX FX25 Blend"},
527 {1667, "Chorus/FX Detune Level"},
528 {1668, "Chorus/FX Detune Amount"},
529 {1669, "Chorus/FX Detune Balance"},
530 {1730, "Chorus/FX Pitch Shift Amount"},
531 {1731, "Chorus/FX Pitch Level"},
532 {1733, "Chorus/FX Pitch Balance"},
533 {1745, "Chorus/FX Pitch Shift Mix"},
534 {1746, "Chorus/FX Octaver Octave 1"},
535 {1747, "Chorus/FX Octaver Octave 2"},
536 {1748, "Chorus/FX Octaver Dry Level"},
537 {1795, "Chorus/FX Whammy Pedal"},
538 {1796, "Chorus/FX Whammy Mix"},
539 {1797, "Chorus/FX Whammy Amount"},
540 {2754, "Chorus/FX IPS/Harmony Pitch Shift"},
541 {2755, "Chorus/FX IPS/Harmony Pitch Scale"},
542 {2756, "Chorus/FX IPS/Harmony Pitch Key"},
543 {2757, "Chorus/FX IPS/Harmony Pitch Level"},
544 {2882, "Chorus/FX Unovibe Chorus/Vibrato"},
545 {2883, "Chorus/FX Unovibe Intensity"},
546 {2884, "Chorus/FX Unovibe Pedal Speed"},
547 {2885, "Chorus/FX Unovibe Volume"},
548 {3010, "Chorus/FX Step Filter Speed"},
549 {3011, "Chorus/FX Step Filter Intensity"},
550 {3012, "Chorus/FX Sample/Hold Speed"},
551 {3013, "Chorus/FX Sample/Hold Intensity"},
554 static value_string_ext digitech_parameter_ids_chorusfx_ext
=
555 VALUE_STRING_EXT_INIT(digitech_parameter_ids_chorusfx
);
557 static const value_string digitech_parameter_ids_delay
[] = {
558 {1857, "Delay On/Off"},
559 {1860, "Delay Level"},
560 {1862, "Delay Time"},
561 {1863, "Delay Repeats"},
562 {1864, "Delay Thresh"},
563 {1865, "Delay Atten"},
564 {1866, "Delay Balance"},
565 {1867, "Delay Spread"},
566 {1868, "Delay Tap Time"},
567 {1873, "Delay Depth"},
568 {1874, "Delay Repeats"},
569 {1888, "Delay Time"},
570 {1889, "Delay Ducker thresh"},
571 {1890, "Delay Ducker level"},
572 {1891, "Delay Tape Wow"},
573 {1892, "Delay Tape Flutter"},
574 {1893, "Delay Echo Plex Volume"},
575 {1894, "Delay DM Repeat Rate"},
576 {1895, "Delay DM Echo"},
577 {1896, "Delay DM Intensity"},
578 {1897, "Delay Echo Plex Time"},
579 {1898, "Delay DM Delay Repeat Rate"},
580 {1899, "Delay Echo Plex Time"},
581 {1900, "Delay Tap Time"},
582 {1901, "Delay Reverse Time"},
583 {1902, "Delay Reverse Mix"},
584 {1905, "Delay 2-tap Ratio"},
587 static value_string_ext digitech_parameter_ids_delay_ext
=
588 VALUE_STRING_EXT_INIT(digitech_parameter_ids_delay
);
590 static const value_string digitech_parameter_ids_reverb
[] = {
591 {1921, "Reverb On/Off"},
592 {1922, "Reverb Predelay"},
593 {1924, "Reverb Damping"},
594 {1925, "Reverb Level"},
595 {1927, "Reverb Decay"},
596 {1928, "Reverb Balance"},
597 {1933, "Reverb Liveliness"},
601 static const value_string digitech_parameter_ids_volume_post_fx
[] = {
602 {2626, "Pickup Volume Post FX"},
606 static const value_string digitech_parameter_ids_preset
[] = {
607 {2626, "Pickup Preset Level"},
611 static const value_string digitech_parameter_ids_wah_min_max
[] = {
617 static const value_string digitech_parameter_ids_equalizer
[] = {
618 {3203, "Equalizer Bass"},
619 {3204, "Equalizer Mid"},
620 {3205, "Equalizer Treble"},
621 {3206, "Equalizer Mid Hz"},
622 {3207, "Equalizer Presence"},
623 {3211, "Equalizer Treb Hz"},
624 {3212, "Equalizer On/Off"},
625 {3213, "Equalizer Low Freq"},
626 {3215, "Equalizer High Freq"},
627 {3216, "Equalizer Low Bandwidth"},
628 {3217, "Equalizer Mid Bandwidth"},
629 {3218, "Equalizer High Bandwidth"},
633 static const value_string digitech_parameter_ids_equalizer_b
[] = {
634 {3203, "Equalizer B Bass"},
635 {3204, "Equalizer B Mid"},
636 {3205, "Equalizer B Treble"},
637 {3206, "Equalizer B Mid Hz"},
638 {3207, "Equalizer B Presence"},
639 {3211, "Equalizer B Treb Hz"},
640 {3212, "Equalizer B On/Off"},
644 static const value_string digitech_parameter_ids_amp_loop
[] = {
645 {3649, "Amp Loop On/Off"},
649 #define DIGITECH_POSITION_GLOBAL 0
650 #define DIGITECH_POSITION_PICKUP 2
651 #define DIGITECH_POSITION_WAH 3
652 #define DIGITECH_POSITION_COMPRESSOR 4
653 #define DIGITECH_POSITION_GNX3K_WHAMMY 5
654 #define DIGITECH_POSITION_DISTORTION 6
655 #define DIGITECH_POSITION_AMP_CHANNEL 7
656 #define DIGITECH_POSITION_AMP 8
657 #define DIGITECH_POSITION_AMP_CABINET 9
658 #define DIGITECH_POSITION_AMP_B 10
659 #define DIGITECH_POSITION_AMP_CABINET_B 11
660 #define DIGITECH_POSITION_NOISEGATE 12
661 #define DIGITECH_POSITION_VOLUME_PRE_FX 13
662 #define DIGITECH_POSITION_CHORUS_FX 14
663 #define DIGITECH_POSITION_DELAY 15
664 #define DIGITECH_POSITION_REVERB 16
665 #define DIGITECH_POSITION_VOLUME_POST_FX 17
666 #define DIGITECH_POSITION_PRESET 18
667 #define DIGITECH_POSITION_EXPRESSION 19
668 #define DIGITECH_POSITION_WAH_MIN_MAX 20
669 #define DIGITECH_POSITION_V_SWITCH_ASSIGN 21
670 #define DIGITECH_POSITION_LFO_1 22
671 #define DIGITECH_POSITION_LFO_2 23
672 #define DIGITECH_POSITION_EQUALIZER 24
673 #define DIGITECH_POSITION_EQUALIZER_B 25
674 #define DIGITECH_POSITION_LIBRARY 26
675 #define DIGITECH_POSITION_AMP_LOOP 33
676 #define DIGITECH_POSITION_WAH_PEDAL 132
678 static const value_string digitech_parameter_positions
[] = {
679 {DIGITECH_POSITION_GLOBAL
, "Global"},
680 {DIGITECH_POSITION_PICKUP
, "Pickup"},
681 {DIGITECH_POSITION_WAH
, "Wah"},
682 {DIGITECH_POSITION_COMPRESSOR
, "Compressor"},
683 {DIGITECH_POSITION_GNX3K_WHAMMY
, "GNX3K Whammy"},
684 {DIGITECH_POSITION_DISTORTION
, "Distortion"},
685 {DIGITECH_POSITION_AMP_CHANNEL
, "Amp Channel"},
686 {DIGITECH_POSITION_AMP
, "Amp"},
687 {DIGITECH_POSITION_AMP_CABINET
, "Amp Cabinet"},
688 {DIGITECH_POSITION_AMP_B
, "Amp B"},
689 {DIGITECH_POSITION_AMP_CABINET_B
, "Amp Cabinet B"},
690 {DIGITECH_POSITION_NOISEGATE
, "Noisegate"},
691 {DIGITECH_POSITION_VOLUME_PRE_FX
, "Volume Pre Fx"},
692 {DIGITECH_POSITION_CHORUS_FX
, "Chorus/FX"},
693 {DIGITECH_POSITION_DELAY
, "Delay"},
694 {DIGITECH_POSITION_REVERB
, "Reverb"},
695 {DIGITECH_POSITION_VOLUME_POST_FX
, "Volume Post Fx"},
696 {DIGITECH_POSITION_PRESET
, "Preset"},
697 {DIGITECH_POSITION_EXPRESSION
, "Expression"},
698 {DIGITECH_POSITION_WAH_MIN_MAX
, "Wah Min-Max"},
699 {DIGITECH_POSITION_V_SWITCH_ASSIGN
, "V-Switch Assign"},
700 {DIGITECH_POSITION_LFO_1
, "LFO 1"},
701 {DIGITECH_POSITION_LFO_2
, "LFO 2"},
702 {DIGITECH_POSITION_EQUALIZER
, "Equalizer"},
703 {DIGITECH_POSITION_EQUALIZER_B
, "Equalizer B"},
704 {DIGITECH_POSITION_LIBRARY
, "Library"},
705 {DIGITECH_POSITION_AMP_LOOP
, "Amp Loop"},
706 {DIGITECH_POSITION_WAH_PEDAL
, "Wah Pedal"},
709 static value_string_ext digitech_parameter_positions_ext
=
710 VALUE_STRING_EXT_INIT(digitech_parameter_positions
);
713 unpack_digitech_message(packet_info
*pinfo
, tvbuff_t
*tvb
, int offset
)
716 int length
= tvb_reported_length(tvb
);
717 int data_len
= length
- offset
- 1;
718 const uint8_t* data_ptr
;
719 int remaining
= data_len
;
720 unsigned char* unpacked
;
721 unsigned char* unpacked_ptr
;
726 unpacked_size
= data_len
- (data_len
/ 8);
732 data_ptr
= tvb_get_ptr(tvb
, offset
, data_len
);
733 unpacked
= (unsigned char*)wmem_alloc(pinfo
->pool
, unpacked_size
);
734 unpacked_ptr
= unpacked
;
736 while (remaining
> 0)
741 for (i
= 0; (i
< 7) && (remaining
> 0); ++i
, --remaining
)
743 *unpacked_ptr
= *data_ptr
| ((msb
<< (i
+ 1)) & 0x80);
749 /* Create new tvb with unpacked data */
750 next_tvb
= tvb_new_child_real_data(tvb
, unpacked
, unpacked_size
, unpacked_size
);
756 get_digitech_hf_parameter_id_by_position(uint8_t position
)
758 int hf_parameter
= hf_digitech_parameter_id
;
762 case DIGITECH_POSITION_GLOBAL
:
763 hf_parameter
= hf_digitech_parameter_id_global
;
765 case DIGITECH_POSITION_PICKUP
:
766 hf_parameter
= hf_digitech_parameter_id_pickup
;
768 case DIGITECH_POSITION_WAH
:
769 hf_parameter
= hf_digitech_parameter_id_wah
;
771 case DIGITECH_POSITION_COMPRESSOR
:
772 hf_parameter
= hf_digitech_parameter_id_compressor
;
774 case DIGITECH_POSITION_GNX3K_WHAMMY
:
775 hf_parameter
= hf_digitech_parameter_id_gnx3k_whammy
;
777 case DIGITECH_POSITION_DISTORTION
:
778 hf_parameter
= hf_digitech_parameter_id_distortion
;
780 case DIGITECH_POSITION_AMP_CHANNEL
:
781 hf_parameter
= hf_digitech_parameter_id_amp_channel
;
783 case DIGITECH_POSITION_AMP
:
784 hf_parameter
= hf_digitech_parameter_id_amp
;
786 case DIGITECH_POSITION_AMP_CABINET
:
787 hf_parameter
= hf_digitech_parameter_id_amp_cabinet
;
789 case DIGITECH_POSITION_AMP_B
:
790 hf_parameter
= hf_digitech_parameter_id_amp_b
;
792 case DIGITECH_POSITION_AMP_CABINET_B
:
793 hf_parameter
= hf_digitech_parameter_id_amp_cabinet_b
;
795 case DIGITECH_POSITION_NOISEGATE
:
796 hf_parameter
= hf_digitech_parameter_id_noisegate
;
798 case DIGITECH_POSITION_VOLUME_PRE_FX
:
799 hf_parameter
= hf_digitech_parameter_id_volume_pre_fx
;
801 case DIGITECH_POSITION_CHORUS_FX
:
802 hf_parameter
= hf_digitech_parameter_id_chorusfx
;
804 case DIGITECH_POSITION_DELAY
:
805 hf_parameter
= hf_digitech_parameter_id_delay
;
807 case DIGITECH_POSITION_REVERB
:
808 hf_parameter
= hf_digitech_parameter_id_reverb
;
810 case DIGITECH_POSITION_VOLUME_POST_FX
:
811 hf_parameter
= hf_digitech_parameter_id_volume_post_fx
;
813 case DIGITECH_POSITION_PRESET
:
814 hf_parameter
= hf_digitech_parameter_id_preset
;
816 case DIGITECH_POSITION_WAH_MIN_MAX
:
817 hf_parameter
= hf_digitech_parameter_id_wah_min_max
;
819 case DIGITECH_POSITION_EQUALIZER
:
820 hf_parameter
= hf_digitech_parameter_id_equalizer
;
822 case DIGITECH_POSITION_EQUALIZER_B
:
823 hf_parameter
= hf_digitech_parameter_id_equalizer_b
;
825 case DIGITECH_POSITION_AMP_LOOP
:
826 hf_parameter
= hf_digitech_parameter_id_amp_loop
;
829 case DIGITECH_POSITION_EXPRESSION
:
830 case DIGITECH_POSITION_V_SWITCH_ASSIGN
:
831 case DIGITECH_POSITION_LFO_1
:
832 case DIGITECH_POSITION_LFO_2
:
833 case DIGITECH_POSITION_LIBRARY
:
834 case DIGITECH_POSITION_WAH_PEDAL
:
843 /* Dissects DigiTech parameter starting at data_offset.
844 * Returns new data_offset.
847 dissect_digitech_parameter(tvbuff_t
*data_tvb
, proto_tree
*tree
,
848 digitech_conv_data_t
*conv_data
, int data_offset
)
850 uint8_t digitech_helper
;
851 int hf_parameter
= hf_digitech_parameter_id
;
853 /* Version 1 and later specify parameter position */
854 if (conv_data
->protocol_version
>= 1)
856 digitech_helper
= tvb_get_uint8(data_tvb
, data_offset
+2);
857 hf_parameter
= get_digitech_hf_parameter_id_by_position(digitech_helper
);
860 proto_tree_add_item(tree
, hf_parameter
, data_tvb
, data_offset
, 2, ENC_BIG_ENDIAN
);
863 /* Add (optional) position to tree */
864 if (conv_data
->protocol_version
>= 1)
866 proto_tree_add_item(tree
, hf_digitech_parameter_position
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
870 digitech_helper
= tvb_get_uint8(data_tvb
, data_offset
);
871 /* Values 0-127 fit in one byte */
872 if (digitech_helper
< 0x80)
874 proto_tree_add_item(tree
, hf_digitech_parameter_data
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
877 else /* digitech_helper >= 0x80 */
881 /* Single byte data count */
882 if (digitech_helper
> 0x80)
884 data_count
= (uint16_t)(digitech_helper
& ~0x80);
885 proto_tree_add_uint(tree
, hf_digitech_parameter_data_count
, data_tvb
,
886 data_offset
, 1, (uint32_t)data_count
);
889 /* Two-byte data count */
890 else /* digitech_helper == 0x80 */
892 data_count
= (uint16_t)tvb_get_ntohs(data_tvb
, data_offset
+1);
893 proto_tree_add_uint(tree
, hf_digitech_parameter_data_two_byte_count
, data_tvb
,
894 data_offset
, 3, (uint32_t)data_count
);
898 proto_tree_add_item(tree
, hf_digitech_parameter_multibyte_data
, data_tvb
,
899 data_offset
, (int)data_count
, ENC_NA
);
900 data_offset
+= data_count
;
907 get_digitech_hf_product_by_family(uint8_t family
)
909 int hf_product
= hf_digitech_unknown_product_id
;
913 case DIGITECH_FAMILY_RP
:
914 hf_product
= hf_digitech_rp_product_id
;
924 dissect_digitech_procedure(uint8_t procedure
, const int offset
,
925 tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
933 uint8_t digitech_helper
;
934 conversation_t
*conversation
;
935 digitech_conv_data_t
*conv_data
;
937 conversation
= find_or_create_conversation(pinfo
);
938 conv_data
= (digitech_conv_data_t
*)conversation_get_proto_data(conversation
, proto_sysex_digitech
);
940 if (conv_data
== NULL
)
942 conv_data
= wmem_new(wmem_file_scope(), digitech_conv_data_t
);
943 conv_data
->protocol_version
= 1; /* Default to version 1 */
946 /* Procedure data starts at offset and ends one byte before end
947 * of System Exclusive manufacturer payload (last byte is checksum)
949 if (tvb_reported_length(tvb
) - offset
< 1)
951 /* There is no DigiTech procedure data, do not attempt further
956 data_tvb
= unpack_digitech_message(pinfo
, tvb
, offset
);
957 add_new_data_source(pinfo
, data_tvb
, "Unpacked Procedure Data");
960 data_len
= tvb_reported_length(data_tvb
);
964 case DIGITECH_PROCEDURE_REQUEST_WHO_AM_I
:
965 proto_tree_add_item(tree
, hf_digitech_desired_device_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
967 proto_tree_add_item(tree
, hf_digitech_desired_family_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
969 proto_tree_add_item(tree
, hf_digitech_desired_product_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
972 case DIGITECH_PROCEDURE_RECEIVE_WHO_AM_I
:
973 proto_tree_add_item(tree
, hf_digitech_received_device_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
976 digitech_helper
= tvb_get_uint8(data_tvb
, data_offset
);
977 proto_tree_add_item(tree
, hf_digitech_family_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
980 proto_tree_add_item(tree
, get_digitech_hf_product_by_family(digitech_helper
),
981 data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
986 /* Version 0, everything already decoded */
987 conv_data
->protocol_version
= 0;
989 else if (data_len
== 4)
991 /* Version 1 and later */
992 conv_data
->protocol_version
= 1;
994 proto_tree_add_item(tree
, hf_digitech_os_mode
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
998 case DIGITECH_PROCEDURE_REQUEST_PRESET_NAMES
:
999 proto_tree_add_item(tree
, hf_digitech_preset_bank
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1003 case DIGITECH_PROCEDURE_RECEIVE_PRESET_NAMES
:
1004 proto_tree_add_item(tree
, hf_digitech_preset_bank
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1007 count
= (uint16_t)tvb_get_uint8(data_tvb
, data_offset
);
1008 proto_tree_add_item(tree
, hf_digitech_preset_count
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1011 while ((count
> 0) && (str_size
= tvb_strsize(data_tvb
, data_offset
)))
1013 tmp_string
= tvb_get_string_enc(pinfo
->pool
, data_tvb
, data_offset
, str_size
- 1, ENC_ASCII
);
1014 proto_tree_add_string(tree
, hf_digitech_preset_name
, data_tvb
, data_offset
, str_size
, tmp_string
);
1015 data_offset
+= (int)str_size
;
1019 case DIGITECH_PROCEDURE_REQUEST_PRESET
:
1020 proto_tree_add_item(tree
, hf_digitech_preset_bank
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1023 proto_tree_add_item(tree
, hf_digitech_preset_index
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1026 case DIGITECH_PROCEDURE_RECEIVE_PRESET_START
:
1028 proto_tree_add_item(tree
, hf_digitech_preset_bank
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1032 proto_tree_add_item(tree
, hf_digitech_preset_index
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1035 /* Preset name (NULL-terminated) */
1036 str_size
= tvb_strsize(data_tvb
, data_offset
);
1037 tmp_string
= tvb_get_string_enc(pinfo
->pool
, data_tvb
, data_offset
, str_size
- 1, ENC_ASCII
);
1038 proto_tree_add_string(tree
, hf_digitech_preset_name
, data_tvb
, data_offset
, str_size
, tmp_string
);
1039 data_offset
+= (int)str_size
;
1041 /* Preset modified (0 = unmodified, !0 = modified) */
1042 proto_tree_add_item(tree
, hf_digitech_preset_modified
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1046 proto_tree_add_item(tree
, hf_digitech_message_count
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1049 case DIGITECH_PROCEDURE_RECEIVE_PRESET_PARAMETERS
:
1050 count
= tvb_get_ntohs(data_tvb
, data_offset
);
1051 proto_tree_add_item(tree
, hf_digitech_parameter_count
, data_tvb
, data_offset
, 2, ENC_BIG_ENDIAN
);
1055 data_offset
= dissect_digitech_parameter(data_tvb
, tree
, conv_data
, data_offset
);
1059 case DIGITECH_PROCEDURE_RECEIVE_PARAMETER_VALUE
:
1060 data_offset
= dissect_digitech_parameter(data_tvb
, tree
, conv_data
, data_offset
);
1062 case DIGITECH_PROCEDURE_ACK
:
1063 proto_tree_add_item(tree
, hf_digitech_ack_request_proc_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1066 case DIGITECH_PROCEDURE_NACK
:
1067 proto_tree_add_item(tree
, hf_digitech_nack_request_proc_id
, data_tvb
, data_offset
, 1, ENC_BIG_ENDIAN
);
1074 if (data_offset
< data_len
)
1076 proto_tree_add_expert(tree
, pinfo
, &ei_digitech_undecoded
,
1077 data_tvb
, data_offset
, data_len
- data_offset
);
1082 dissect_sysex_digitech_command(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*parent_tree
, void* data _U_
)
1085 uint8_t procedure_id
;
1086 uint8_t digitech_helper
;
1087 proto_item
*ti
= NULL
;
1088 proto_tree
*tree
= NULL
;
1089 const uint8_t *data_ptr
;
1093 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "X MIDI");
1094 col_set_str(pinfo
->cinfo
, COL_INFO
, "DigiTech X MIDI SysEx");
1096 ti
= proto_tree_add_protocol_format(parent_tree
, proto_sysex_digitech
, tvb
, 0, -1, "DigiTech X MIDI SysEx");
1097 tree
= proto_item_add_subtree(ti
, ett_sysex_digitech
);
1099 proto_tree_add_item(tree
, hf_digitech_device_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1102 digitech_helper
= tvb_get_uint8(tvb
, offset
);
1103 proto_tree_add_item(tree
, hf_digitech_family_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1106 proto_tree_add_item(tree
, get_digitech_hf_product_by_family(digitech_helper
),
1107 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1110 procedure_id
= tvb_get_uint8(tvb
, offset
);
1111 proto_tree_add_item(tree
, hf_digitech_procedure_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
1114 dissect_digitech_procedure(procedure_id
, offset
, tvb
, pinfo
, tree
);
1116 len
= tvb_reported_length(tvb
) - 1;
1117 offset
= len
; /* Last byte is checksum */
1118 data_ptr
= tvb_get_ptr(tvb
, 0, len
);
1119 /* Calculate checksum. Start with 0x10 as that's the XOR of DOD Electronics Corp.
1120 * The Extended Manufacturer ID is part of checksum but is not part of payload tvb.
1122 for (i
= 0, digitech_helper
= 0x10; i
< len
; ++i
)
1124 digitech_helper
^= *data_ptr
++;
1127 proto_tree_add_checksum(tree
, tvb
, offset
, hf_digitech_checksum
, hf_digitech_checksum_status
, &ei_digitech_checksum_bad
, pinfo
, digitech_helper
,
1128 ENC_BIG_ENDIAN
, PROTO_CHECKSUM_VERIFY
);
1135 proto_register_sysex_digitech(void)
1137 static hf_register_info hf
[] = {
1138 /* DigiTech manufacturer-specific fields */
1139 { &hf_digitech_device_id
,
1140 { "Device ID", "sysex_digitech.device_id", FT_UINT8
, BASE_HEX
,
1141 NULL
, 0, NULL
, HFILL
}},
1142 { &hf_digitech_family_id
,
1143 { "Family ID", "sysex_digitech.family_id", FT_UINT8
, BASE_HEX
,
1144 VALS(digitech_family_id
), 0, NULL
, HFILL
}},
1145 { &hf_digitech_unknown_product_id
,
1146 { "Product ID", "sysex_digitech.product_id", FT_UINT8
, BASE_HEX
,
1147 NULL
, 0, NULL
, HFILL
}},
1148 { &hf_digitech_rp_product_id
,
1149 { "Product ID", "sysex_digitech.product_id", FT_UINT8
, BASE_HEX
,
1150 VALS(digitech_rp_product_id
), 0, NULL
, HFILL
}},
1151 { &hf_digitech_procedure_id
,
1152 { "Procedure ID", "sysex_digitech.procedure_id", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
1153 &digitech_procedures_ext
, 0, NULL
, HFILL
}},
1155 { &hf_digitech_desired_device_id
,
1156 { "Desired Device ID", "sysex_digitech.desired_device_id", FT_UINT8
, BASE_HEX
,
1157 NULL
, 0, NULL
, HFILL
}},
1158 { &hf_digitech_desired_family_id
,
1159 { "Desired Family ID", "sysex_digitech.desired_family_id", FT_UINT8
, BASE_HEX
,
1160 NULL
, 0, NULL
, HFILL
}},
1161 { &hf_digitech_desired_product_id
,
1162 { "Desired Product ID", "sysex_digitech.desired_product_id", FT_UINT8
, BASE_HEX
,
1163 NULL
, 0, NULL
, HFILL
}},
1164 { &hf_digitech_received_device_id
,
1165 { "Device ID", "sysex_digitech.received_device_id", FT_UINT8
, BASE_HEX
,
1166 NULL
, 0, NULL
, HFILL
}},
1167 { &hf_digitech_os_mode
,
1168 { "OS Mode", "sysex_digitech.os_mode", FT_UINT8
, BASE_HEX
,
1169 VALS(digitech_os_modes
), 0, "DigiTech OS Mode", HFILL
}},
1171 { &hf_digitech_preset_bank
,
1172 { "Preset Bank", "sysex_digitech.preset_bank", FT_UINT8
, BASE_HEX
,
1173 VALS(digitech_preset_banks
), 0, NULL
, HFILL
}},
1174 { &hf_digitech_preset_index
,
1175 { "Preset Index", "sysex_digitech.preset_index", FT_UINT8
, BASE_HEX
,
1176 NULL
, 0, NULL
, HFILL
}},
1177 { &hf_digitech_preset_count
,
1178 { "Preset Count", "sysex_digitech.preset_count", FT_UINT8
, BASE_DEC
,
1179 NULL
, 0, NULL
, HFILL
}},
1180 { &hf_digitech_preset_name
,
1181 { "Preset Name", "sysex_digitech.preset_name", FT_STRING
, BASE_NONE
,
1182 NULL
, 0, NULL
, HFILL
}},
1183 { &hf_digitech_preset_modified
,
1184 { "Preset Modified", "sysex_digitech.preset_modified", FT_BOOLEAN
, BASE_NONE
,
1185 TFS(&tfs_yes_no
), 0, "Modified flag (0 = unmodified)", HFILL
}},
1187 { &hf_digitech_message_count
,
1188 { "Messages to follow", "sysex_digitech.message_count", FT_UINT8
, BASE_DEC
,
1189 NULL
, 0, "Number of messages to follow", HFILL
}},
1191 { &hf_digitech_parameter_count
,
1192 { "Parameter Count", "sysex_digitech.parameter_count", FT_UINT16
, BASE_DEC
,
1193 NULL
, 0, NULL
, HFILL
}},
1195 { &hf_digitech_parameter_id
,
1196 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1197 NULL
, 0, NULL
, HFILL
}},
1198 { &hf_digitech_parameter_id_global
,
1199 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1200 VALS(digitech_parameter_ids_global
), 0, NULL
, HFILL
}},
1201 { &hf_digitech_parameter_id_pickup
,
1202 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1203 VALS(digitech_parameter_ids_pickup
), 0, NULL
, HFILL
}},
1204 { &hf_digitech_parameter_id_wah
,
1205 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1206 VALS(digitech_parameter_ids_wah
), 0, NULL
, HFILL
}},
1207 { &hf_digitech_parameter_id_compressor
,
1208 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1209 VALS(digitech_parameter_ids_compressor
), 0, NULL
, HFILL
}},
1210 { &hf_digitech_parameter_id_gnx3k_whammy
,
1211 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
,
1212 &digitech_parameter_ids_gnx3k_whammy_ext
, 0, NULL
, HFILL
}},
1213 { &hf_digitech_parameter_id_distortion
,
1214 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
,
1215 &digitech_parameter_ids_distortion_ext
, 0, NULL
, HFILL
}},
1216 { &hf_digitech_parameter_id_amp_channel
,
1217 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1218 VALS(digitech_parameter_ids_amp_channel
), 0, NULL
, HFILL
}},
1219 { &hf_digitech_parameter_id_amp
,
1220 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
,
1221 &digitech_parameter_ids_amp_ext
, 0, NULL
, HFILL
}},
1222 { &hf_digitech_parameter_id_amp_cabinet
,
1223 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1224 VALS(digitech_parameter_ids_amp_cabinet
), 0, NULL
, HFILL
}},
1225 { &hf_digitech_parameter_id_amp_b
,
1226 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1227 VALS(digitech_parameter_ids_amp_b
), 0, NULL
, HFILL
}},
1228 { &hf_digitech_parameter_id_amp_cabinet_b
,
1229 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1230 VALS(digitech_parameter_ids_amp_cabinet_b
), 0, NULL
, HFILL
}},
1231 { &hf_digitech_parameter_id_noisegate
,
1232 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1233 VALS(digitech_parameter_ids_noisegate
), 0, NULL
, HFILL
}},
1234 { &hf_digitech_parameter_id_volume_pre_fx
,
1235 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1236 VALS(digitech_parameter_ids_volume_pre_fx
), 0, NULL
, HFILL
}},
1237 { &hf_digitech_parameter_id_chorusfx
,
1238 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
,
1239 &digitech_parameter_ids_chorusfx_ext
, 0, NULL
, HFILL
}},
1240 { &hf_digitech_parameter_id_delay
,
1241 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
,
1242 &digitech_parameter_ids_delay_ext
, 0, NULL
, HFILL
}},
1243 { &hf_digitech_parameter_id_reverb
,
1244 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1245 VALS(digitech_parameter_ids_reverb
), 0, NULL
, HFILL
}},
1246 { &hf_digitech_parameter_id_volume_post_fx
,
1247 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1248 VALS(digitech_parameter_ids_volume_post_fx
), 0, NULL
, HFILL
}},
1249 { &hf_digitech_parameter_id_preset
,
1250 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1251 VALS(digitech_parameter_ids_preset
), 0, NULL
, HFILL
}},
1252 { &hf_digitech_parameter_id_wah_min_max
,
1253 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1254 VALS(digitech_parameter_ids_wah_min_max
), 0, NULL
, HFILL
}},
1255 { &hf_digitech_parameter_id_equalizer
,
1256 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1257 VALS(digitech_parameter_ids_equalizer
), 0, NULL
, HFILL
}},
1258 { &hf_digitech_parameter_id_equalizer_b
,
1259 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1260 VALS(digitech_parameter_ids_equalizer_b
), 0, NULL
, HFILL
}},
1261 { &hf_digitech_parameter_id_amp_loop
,
1262 { "Parameter ID", "sysex_digitech.parameter_id", FT_UINT16
, BASE_DEC
,
1263 VALS(digitech_parameter_ids_amp_loop
), 0, NULL
, HFILL
}},
1266 { &hf_digitech_parameter_position
,
1267 { "Parameter position", "sysex_digitech.parameter_position", FT_UINT8
, BASE_DEC
| BASE_EXT_STRING
,
1268 &digitech_parameter_positions_ext
, 0, NULL
, HFILL
}},
1269 { &hf_digitech_parameter_data
,
1270 { "Parameter data", "sysex_digitech.parameter_data", FT_UINT8
, BASE_DEC
,
1271 NULL
, 0, NULL
, HFILL
}},
1272 { &hf_digitech_parameter_data_count
,
1273 { "Parameter value count", "sysex_digitech.parameter_value_count", FT_UINT8
, BASE_DEC
,
1274 NULL
, 0, NULL
, HFILL
}},
1275 { &hf_digitech_parameter_data_two_byte_count
,
1276 { "Parameter data count", "sysex_digitech.parameter_data_count", FT_UINT24
, BASE_DEC
,
1277 NULL
, 0, NULL
, HFILL
}},
1278 { &hf_digitech_parameter_multibyte_data
,
1279 { "Parameter data", "sysex_digitech.parameter_multibyte_data", FT_BYTES
, BASE_NONE
,
1280 NULL
, 0, NULL
, HFILL
}},
1282 { &hf_digitech_ack_request_proc_id
,
1283 { "Requesting Procedure ID", "sysex_digitech.ack.procedure_id", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
1284 &digitech_procedures_ext
, 0, "Procedure ID of the request being ACKed", HFILL
}},
1285 { &hf_digitech_nack_request_proc_id
,
1286 { "Requesting Procedure ID", "sysex_digitech.ack.procedure_id", FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
,
1287 &digitech_procedures_ext
, 0, "Procedure ID of the request being NACKed", HFILL
}},
1289 { &hf_digitech_checksum
,
1290 { "Checksum", "sysex_digitech.checksum", FT_UINT8
, BASE_HEX
,
1291 NULL
, 0, NULL
, HFILL
}},
1292 { &hf_digitech_checksum_status
,
1293 { "Checksum Status", "sysex_digitech.checksum.status", FT_UINT8
, BASE_NONE
,
1294 VALS(proto_checksum_vals
), 0, NULL
, HFILL
}},
1297 static int *sysex_digitech_subtrees
[] = {
1301 static ei_register_info ei
[] = {
1302 { &ei_digitech_checksum_bad
, { "sysex_digitech.checksum_bad", PI_CHECKSUM
, PI_WARN
, "Bad checksum", EXPFILL
}},
1303 { &ei_digitech_undecoded
, { "sysex_digitech.undecoded", PI_UNDECODED
, PI_WARN
, "Not dissected yet (report to wireshark.org)", EXPFILL
}},
1306 expert_module_t
* expert_sysex_digitech
;
1308 proto_sysex_digitech
= proto_register_protocol("MIDI System Exclusive DigiTech", "SYSEX DigiTech", "sysex_digitech");
1309 proto_register_field_array(proto_sysex_digitech
, hf
, array_length(hf
));
1310 proto_register_subtree_array(sysex_digitech_subtrees
, array_length(sysex_digitech_subtrees
));
1311 expert_sysex_digitech
= expert_register_protocol(proto_sysex_digitech
);
1312 expert_register_field_array(expert_sysex_digitech
, ei
, array_length(ei
));
1314 register_dissector("sysex_digitech", dissect_sysex_digitech_command
, proto_sysex_digitech
);
1323 * indent-tabs-mode: nil
1326 * ex: set shiftwidth=4 tabstop=8 expandtab:
1327 * :indentSize=4:tabSize=8:noTabs=true: