xref: /freebsd/contrib/file/magic/Magdir/sysex (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1
2#------------------------------------------------------------------------
3# $File: sysex,v 1.11 2022/01/17 17:16:51 christos Exp $
4# sysex: file(1) magic for MIDI sysex files
5#
6# GRR: original 1 byte test at offset was too general as it catches also many FATs of DOS filesystems
7# where real SYStem EXclusive messages at offset 1 are limited to seven bits
8# https://en.wikipedia.org/wiki/MIDI
9# test for StartSysEx byte and upper unsed bit of vendor ID
100	ubeshort&0xFF80		0xF000
11# MIDI System Exclusive (SysEx) messages (strength=50) after Microsoft Visual C library (strength=70)
12#!:strength +0
13# skip Microsoft Visual C library with page size 16 misidentifed as ADA and
14# page size 32 misidentifed as Inventronics by looking for terminating End Of eXclusive byte (EOX)
15>2		search/12	\xF7
16>>0	use	midi-sysex
17#	display information about MIDI System Exclusive (SysEx) messages
180	name		midi-sysex
19# https://fileinfo.com/extension/syx
20>1	ubyte			x		MIDI audio System Exclusive (SysEx) message -
21# Note: file (version 5.41) labeled the above entry as "SysEx File"
22#!:mime	application/octet-stream
23!:mime	audio/x-syx
24# https://onsongapp.com/docs/features/formats/sysex
25!:ext	syx/sysex
26# https://www.midi.org/specifications-old/item/manufacturer-id-numbers
27# https://raw.githubusercontent.com/insolace/MIDI-Sysex-MFG-IDs/master/Sysex%20ID%20Tables/MIDI%20Sysex%20MFG%20IDs.csv
28# SysEx manufacturer ID; originally one byte, but now 0 is used as an escapement to reach the next two
29# North American Group
30#>1	byte			0x01		Sequential
31>1	byte			0x01		Sequential Circuits
32>1	byte			0x02		IDP
33#>1	byte			0x03		OctavePlateau
34>1	byte			0x03		Voyetra Turtle Beach
35>1	byte			0x04		Moog
36#>1	byte			0x05		Passport
37>1	byte			0x05		Passport Designs
38#>1	byte			0x06		Lexicon
39>1	byte			0x06		Lexicon Inc.
40>1	byte			0x07		Kurzweil/Future Retro
41>>3	byte			0x77		777
42>>4	byte			0x00		Bank
43>>4	byte			0x01		Song
44>>5	byte			0x0f		16
45>>5	byte			0x0e		15
46>>5	byte			0x0d		14
47>>5	byte			0x0c		13
48>>5	byte			0x0b		12
49>>5	byte			0x0a		11
50>>5	byte			0x09		10
51>>5	byte			0x08		9
52>>5	byte			0x07		8
53>>5	byte			0x06		7
54>>5	byte			0x05		6
55>>5	byte			0x04		5
56>>5	byte			0x03		4
57>>5	byte			0x02		3
58>>5	byte			0x01		2
59>>5	byte			0x00		1
60>>5	byte			0x10		(ALL)
61>>2	byte			x			\b, Channel %d
62>1	byte			0x08		Fender
63#>1	byte			0x09		Gulbransen
64>1	byte			0x09		MIDI9
65#>1	byte			0x0a		AKG
66>1	byte			0x0a		AKG Acoustics
67>1	byte			0x0b		Voyce
68>1	byte			0x0c		Waveframe
69# not ADA programming language
70#>1	byte			0x0d		ADA
71>1	byte			0x0d		ADA Signal Processors Inc.
72#>1	byte			0x0e		Garfield
73>1	byte			0x0e		Garfield Electronics
74>1	byte			0x0f		Ensoniq
75>1	byte			0x10		Oberheim
76>>2	byte			0x06		Matrix 6 series
77>>3	byte			0x0A		Dump (All)
78>>3	byte			0x01		Dump (Bank)
79>>4 belong			0x0002040E		Matrix 1000
80>>>11 byte			<2			User bank %d
81>>>11 byte			>1			Preset bank %d
82>1	byte			0x11		Apple
83>1	byte			0x12		GreyMatter
84>1	byte			0x14		PalmTree
85>1	byte			0x15		JLCooper
86>1	byte			0x16		Lowrey
87>1	byte			0x17		AdamsSmith
88>1	byte			0x18		E-mu
89#>1	byte			0x19		Harmony
90>1	byte			0x19		Harmony Systems
91>1	byte			0x1a		ART
92>1	byte			0x1b		Baldwin
93>1	byte			0x1c		Eventide
94>1	byte			0x1d		Inventronics
95>1	byte			0x1f		Clarity
96
97# European Group
98#>1	byte			0x21		SIEL
99>1	byte			0x21		Proel Labs (SIEL)
100>1	byte			0x22		Synthaxe
101>1	byte			0x24		Hohner
102>1	byte			0x25		Twister
103#>1	byte			0x26		Solton
104>1	byte			0x26		Ketron s.r.l.
105>1	byte			0x27		Jellinghaus
106>1	byte			0x28		Southworth
107>1	byte			0x29		PPG
108>1	byte			0x2a		JEN
109#>1	byte			0x2b		SSL
110>1	byte			0x2b		Solid State Logic Organ Systems
111#>1	byte			0x2c		AudioVertrieb
112>1	byte			0x2c		Audio Veritrieb-P. Struven
113
114>1	byte			0x2f		ELKA
115>>3	byte			0x09		EK-44
116
117>1	byte			0x30		Dynacord
118#>1	byte			0x31		Jomox
119>1	byte			0x31		Viscount International Spa
120>1	byte			0x33		Clavia
121>1	byte			0x39		Soundcraft
122# Some Waldorf info from http://Stromeko.Synth.net/Downloads#WaldorfDocs
123>1	byte			0x3e		Waldorf
124>>2	byte			0x00		microWave
125>>2	byte			0x0E		microwave2 / XT
126>>2	byte			0x0F		Q / Q+
127>>3	byte			=0			(default id)
128>>3 byte			>0			(
129>>>3 byte			<0x7F		\bdevice %d)
130>>>3 byte			=0x7F		\bbroadcast id)
131>>3	byte			0x7f		Microwave I
132>>>4	byte			0x00		SNDR (Sound Request)
133>>>4	byte			0x10		SNDD (Sound Dump)
134>>>4	byte			0x20		SNDP (Sound Parameter Change)
135>>>4	byte			0x30		SNDQ (Sound Parameter Inquiry)
136>>>4	byte			0x70		BOOT (Sound Reserved)
137>>>4	byte			0x01		MULR (Multi Request)
138>>>4	byte			0x11		MULD (Multi Dump)
139>>>4	byte			0x21		MULP (Multi Parameter Change)
140>>>4	byte			0x31		MULQ (Multi Parameter Inquiry)
141>>>4	byte			0x71		OS (Multi Reserved)
142>>>4	byte			0x02		DRMR (Drum Map Request)
143>>>4	byte			0x12		DRMD (Drum Map Dump)
144>>>4	byte			0x22		DRMP (Drum Map Parameter Change)
145>>>4	byte			0x32		DRMQ (Drum Map Parameter Inquiry)
146>>>4	byte			0x72		BIN (Drum Map Reserved)
147>>>4	byte			0x03		PATR (Sequencer Pattern Request)
148>>>4	byte			0x13		PATD (Sequencer Pattern Dump)
149>>>4	byte			0x23		PATP (Sequencer Pattern Parameter Change)
150>>>4	byte			0x33		PATQ (Sequencer Pattern Parameter Inquiry)
151>>>4	byte			0x73		AFM (Sequencer Pattern Reserved)
152>>>4	byte			0x04		GLBR (Global Parameter Request)
153>>>4	byte			0x14		GLBD (Global Parameter Dump)
154>>>4	byte			0x24		GLBP (Global Parameter Parameter Change)
155>>>4	byte			0x34		GLBQ (Global Parameter Parameter Inquiry)
156>>>4	byte			0x07		MODR (Mode Parameter Request)
157>>>4	byte			0x17		MODD (Mode Parameter Dump)
158>>>4	byte			0x27		MODP (Mode Parameter Parameter Change)
159>>>4	byte			0x37		MODQ (Mode Parameter Parameter Inquiry)
160>>2	byte			0x10		microQ
161>>>4	byte			0x00		SNDR (Sound Request)
162>>>4	byte			0x10		SNDD (Sound Dump)
163>>>4	byte			0x20		SNDP (Sound Parameter Change)
164>>>4	byte			0x30		SNDQ (Sound Parameter Inquiry)
165>>>4	byte			0x70		(Sound Reserved)
166>>>4	byte			0x01		MULR (Multi Request)
167>>>4	byte			0x11		MULD (Multi Dump)
168>>>4	byte			0x21		MULP (Multi Parameter Change)
169>>>4	byte			0x31		MULQ (Multi Parameter Inquiry)
170>>>4	byte			0x71		OS (Multi Reserved)
171>>>4	byte			0x02		DRMR (Drum Map Request)
172>>>4	byte			0x12		DRMD (Drum Map Dump)
173>>>4	byte			0x22		DRMP (Drum Map Parameter Change)
174>>>4	byte			0x32		DRMQ (Drum Map Parameter Inquiry)
175>>>4	byte			0x72		BIN (Drum Map Reserved)
176>>>4	byte			0x04		GLBR (Global Parameter Request)
177>>>4	byte			0x14		GLBD (Global Parameter Dump)
178>>>4	byte			0x24		GLBP (Global Parameter Parameter Change)
179>>>4	byte			0x34		GLBQ (Global Parameter Parameter Inquiry)
180>>2	byte			0x11		rackAttack
181>>>4	byte			0x00		SNDR (Sound Parameter Request)
182>>>4	byte			0x10		SNDD (Sound Parameter Dump)
183>>>4	byte			0x20		SNDP (Sound Parameter Parameter Change)
184>>>4	byte			0x30		SNDQ (Sound Parameter Parameter Inquiry)
185>>>4	byte			0x01		PRGR (Program Parameter Request)
186>>>4	byte			0x11		PRGD (Program Parameter Dump)
187>>>4	byte			0x21		PRGP (Program Parameter Parameter Change)
188>>>4	byte			0x31		PRGQ (Program Parameter Parameter Inquiry)
189>>>4	byte			0x71		OS (Program Parameter Reserved)
190>>>4	byte			0x03		PATR (Pattern Parameter Request)
191>>>4	byte			0x13		PATD (Pattern Parameter Dump)
192>>>4	byte			0x23		PATP (Pattern Parameter Parameter Change)
193>>>4	byte			0x33		PATQ (Pattern Parameter Parameter Inquiry)
194>>>4	byte			0x04		GLBR (Global Parameter Request)
195>>>4	byte			0x14		GLBD (Global Parameter Dump)
196>>>4	byte			0x24		GLBP (Global Parameter Parameter Change)
197>>>4	byte			0x34		GLBQ (Global Parameter Parameter Inquiry)
198>>>4	byte			0x05		EFXR (FX Parameter Request)
199>>>4	byte			0x15		EFXD (FX Parameter Dump)
200>>>4	byte			0x25		EFXP (FX Parameter Parameter Change)
201>>>4	byte			0x35		EFXQ (FX Parameter Parameter Inquiry)
202>>>4	byte			0x07		MODR (Mode Command Request)
203>>>4	byte			0x17		MODD (Mode Command Dump)
204>>>4	byte			0x27		MODP (Mode Command Parameter Change)
205>>>4	byte			0x37		MODQ (Mode Command Parameter Inquiry)
206>>2	byte			0x03		Wave
207>>>4	byte			0x00		SBPR (Soundprogram)
208>>>4	byte			0x01		SAPR (Performance)
209>>>4	byte			0x02		SWAVE (Wave)
210>>>4	byte			0x03		SWTBL (Wave control table)
211>>>4	byte			0x04		SVT (Velocity Curve)
212>>>4	byte			0x05		STT (Tuning Table)
213>>>4	byte			0x06		SGLB (Global Parameters)
214>>>4	byte			0x07		SARRMAP (Performance Program Change Map)
215>>>4	byte			0x08		SBPRMAP (Sound Program Change Map)
216>>>4	byte			0x09		SBPRPAR (Sound Parameter)
217>>>4	byte			0x0A		SARRPAR (Performance Parameter)
218>>>4	byte			0x0B		SINSPAR (Instrument/External Parameter)
219>>>4	byte			0x0F		SBULK (Bulk Switch on/off)
220
221# Japanese Group
222>1	byte			0x40		Kawai
223>>3	byte			0x20		K1
224>>3	byte			0x22		K4
225
226>1	byte			0x41		Roland
227>>3	byte			0x14		D-50
228>>3	byte			0x2b		U-220
229>>3	byte			0x02		TR-707
230
231>1	byte			0x42		Korg
232>>3	byte			0x19		M1
233
234>1	byte			0x43		Yamaha
235>1	byte			0x44		Casio
236>1	byte			0x46		Kamiya
237>1	byte			0x47		Akai
238#>1	byte			0x48		Victor
239>1	byte			0x48		Victor Company of Japan. Ltd.
240>1	byte			0x49		Mesosha
241>1	byte			0x4b		Fujitsu
242>1	byte			0x4c		Sony
243>1	byte			0x4e		Teac
244>1	byte			0x50		Matsushita
245>1	byte			0x51		Fostex
246#>1	byte			0x52		Zoom
247>1	byte			0x52		Zoom Corporation
248>1	byte			0x54		Matsushita
249>1	byte			0x57		Acoustic tech. lab.
250# https://www.midi.org/techspecs/manid.php
251>1	belong&0xffffff00	0x00007400	Ta Horng
252>1	belong&0xffffff00	0x00007500	e-Tek
253>1	belong&0xffffff00	0x00007600	E-Voice
254>1	belong&0xffffff00	0x00007700	Midisoft
255>1	belong&0xffffff00	0x00007800	Q-Sound
256>1	belong&0xffffff00	0x00007900	Westrex
257>1	belong&0xffffff00	0x00007a00	Nvidia*
258>1	belong&0xffffff00	0x00007b00	ESS
259>1	belong&0xffffff00	0x00007c00	Mediatrix
260>1	belong&0xffffff00	0x00007d00	Brooktree
261>1	belong&0xffffff00	0x00007e00	Otari
262>1	belong&0xffffff00	0x00007f00	Key Electronics
263>1	belong&0xffffff00	0x00010000	Shure
264>1	belong&0xffffff00	0x00010100	AuraSound
265>1	belong&0xffffff00	0x00010200	Crystal
266>1	belong&0xffffff00	0x00010300	Rockwell
267>1	belong&0xffffff00	0x00010400	Silicon Graphics
268>1	belong&0xffffff00	0x00010500	Midiman
269>1	belong&0xffffff00	0x00010600	PreSonus
270>1	belong&0xffffff00	0x00010800	Topaz
271>1	belong&0xffffff00	0x00010900	Cast Lightning
272>1	belong&0xffffff00	0x00010a00	Microsoft
273>1	belong&0xffffff00	0x00010b00	Sonic Foundry
274>1	belong&0xffffff00	0x00010c00	Line 6
275>1	belong&0xffffff00	0x00010d00	Beatnik Inc.
276>1	belong&0xffffff00	0x00010e00	Van Koerving
277>1	belong&0xffffff00	0x00010f00	Altech Systems
278>1	belong&0xffffff00	0x00011000	S & S Research
279>1	belong&0xffffff00	0x00011100	VLSI Technology
280>1	belong&0xffffff00	0x00011200	Chromatic
281>1	belong&0xffffff00	0x00011300	Sapphire
282>1	belong&0xffffff00	0x00011400	IDRC
283>1	belong&0xffffff00	0x00011500	Justonic Tuning
284>1	belong&0xffffff00	0x00011600	TorComp
285>1	belong&0xffffff00	0x00011700	Newtek Inc.
286>1	belong&0xffffff00	0x00011800	Sound Sculpture
287>1	belong&0xffffff00	0x00011900	Walker Technical
288>1	belong&0xffffff00	0x00011a00	Digital Harmony
289>1	belong&0xffffff00	0x00011b00	InVision
290>1	belong&0xffffff00	0x00011c00	T-Square
291>1	belong&0xffffff00	0x00011d00	Nemesys
292>1	belong&0xffffff00	0x00011e00	DBX
293>1	belong&0xffffff00	0x00011f00	Syndyne
294>1	belong&0xffffff00	0x00012000	Bitheadz
295>1	belong&0xffffff00	0x00012100	Cakewalk
296>1	belong&0xffffff00	0x00012200	Staccato
297>1	belong&0xffffff00	0x00012300	National Semicon.
298>1	belong&0xffffff00	0x00012400	Boom Theory
299>1	belong&0xffffff00	0x00012500	Virtual DSP Corp
300>1	belong&0xffffff00	0x00012600	Antares
301>1	belong&0xffffff00	0x00012700	Angel Software
302>1	belong&0xffffff00	0x00012800	St Louis Music
303>1	belong&0xffffff00	0x00012900	Lyrrus dba G-VOX
304>1	belong&0xffffff00	0x00012a00	Ashley Audio
305>1	belong&0xffffff00	0x00012b00	Vari-Lite
306>1	belong&0xffffff00	0x00012c00	Summit Audio
307>1	belong&0xffffff00	0x00012d00	Aureal Semicon.
308>1	belong&0xffffff00	0x00012e00	SeaSound
309>1	belong&0xffffff00	0x00012f00	U.S. Robotics
310>1	belong&0xffffff00	0x00013000	Aurisis
311>1	belong&0xffffff00	0x00013100	Nearfield Multimedia
312>1	belong&0xffffff00	0x00013200	FM7 Inc.
313>1	belong&0xffffff00	0x00013300	Swivel Systems
314>1	belong&0xffffff00	0x00013400	Hyperactive
315>1	belong&0xffffff00	0x00013500	MidiLite
316>1	belong&0xffffff00	0x00013600	Radical
317>1	belong&0xffffff00	0x00013700	Roger Linn
318>1	belong&0xffffff00	0x00013800	Helicon
319>1	belong&0xffffff00	0x00013900	Event
320>1	belong&0xffffff00	0x00013a00	Sonic Network
321>1	belong&0xffffff00	0x00013b00	Realtime Music
322>1	belong&0xffffff00	0x00013c00	Apogee Digital
323
324>1	belong&0xffffff00	0x00202b00	Medeli Electronics
325>1	belong&0xffffff00	0x00202c00	Charlie Lab
326>1	belong&0xffffff00	0x00202d00	Blue Chip Music
327>1	belong&0xffffff00	0x00202e00	BEE OH Corp
328>1	belong&0xffffff00	0x00202f00	LG Semicon America
329>1	belong&0xffffff00	0x00203000	TESI
330>1	belong&0xffffff00	0x00203100	EMAGIC
331>1	belong&0xffffff00	0x00203200	Behringer
332>1	belong&0xffffff00	0x00203300	Access Music
333>1	belong&0xffffff00	0x00203400	Synoptic
334>1	belong&0xffffff00	0x00203500	Hanmesoft Corp
335>1	belong&0xffffff00	0x00203600	Terratec
336>1	belong&0xffffff00	0x00203700	Proel SpA
337>1	belong&0xffffff00	0x00203800	IBK MIDI
338>1	belong&0xffffff00	0x00203900	IRCAM
339>1	belong&0xffffff00	0x00203a00	Propellerhead Software
340>1	belong&0xffffff00	0x00203b00	Red Sound Systems
341>1	belong&0xffffff00	0x00203c00	Electron ESI AB
342>1	belong&0xffffff00	0x00203d00	Sintefex Audio
343>1	belong&0xffffff00	0x00203e00	Music and More
344>1	belong&0xffffff00	0x00203f00	Amsaro
345>1	belong&0xffffff00	0x00204000	CDS Advanced Technology
346>1	belong&0xffffff00	0x00204100	Touched by Sound
347>1	belong&0xffffff00	0x00204200	DSP Arts
348>1	belong&0xffffff00	0x00204300	Phil Rees Music
349>1	belong&0xffffff00	0x00204400	Stamer Musikanlagen GmbH
350>1	belong&0xffffff00	0x00204500	Soundart
351>1	belong&0xffffff00	0x00204600	C-Mexx Software
352>1	belong&0xffffff00	0x00204700	Klavis Tech.
353>1	belong&0xffffff00	0x00204800	Noteheads AB
354
355# Update:	Joerg Jenderek; January 2022
356>1	byte			0x00		ID EXTENSIONS
357>1	byte			0x13		Digidesign Inc.
358>1	byte			0x1e		Key Concepts
359>1	byte			0x20		Passac
360>1	byte			0x23		Stepp
361>1	byte			0x2d		Neve
362>1	byte			0x2e		Soundtracs Ltd.
363>1	byte			0x32		Drawmer
364>1	byte			0x34		Audio Architecture
365>1	byte			0x35		Generalmusic Corp SpA
366>1	byte			0x36		Cheetah Marketing
367>1	byte			0x37		C.T.M.
368>1	byte			0x38		Simmons UK
369>1	byte			0x3a		Steinberg
370>1	byte			0x3b		Wersi GmbH
371>1	byte			0x3c		AVAB Niethammer AB
372>1	byte			0x3d		Digigram
373>1	byte			0x3f		Quasimidi
374#
375>1	byte			0x40		Kawai Musical Instruments MFG. CO. Ltd
376#>1	byte			0x45		foo
377#>1	byte			0x4a		foo
378#>1	byte			0x4d		foo
379#>1	byte			0x4f		foo
380#>1	byte			0x53		foo
381>1	byte			0x55		Suzuki Musical Instruments MFG. Co. Ltd.
382>1	byte			0x56		Fuji Sound Corporation Ltd.
383#>1	byte			0x58		foo
384>1	byte			0x59		Faith. Inc.
385>1	byte			0x5a		Internet Corporation
386#>1	byte			0x5b		foo
387>1	byte			0x5c		Seekers Co. Ltd.
388#>1	byte			0x5d		foo
389#>1	byte			0x5e		foo
390>1	byte			0x5f		SD Card Association
391# Reserved for other uses for 60H to 7FH
392# URL:		https://www.philscomputerlab.com/roland-midi-emulator-project-20.html
393# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/syx--midiemu.trid.xml
394# Note:         called by TrID "MIDI Emulator Project SysEx preset command"
395>1	byte			0x66		MIDI Emulator
396# https://electronicmusic.fandom.com/wiki/List_of_MIDI_Manufacturer_IDs
397# Educational, prototyping, test, private use and experimentation
398>1	byte			0x7D		PROTOTYPING
399# universal non-real-time (sample dump, tuning table, etc.)
400>1	byte			0x7E		UNIVERSAL
401# universal real time (MIDI time code, MIDI Machine control, etc.)
402>1	byte			0x7F		universal real time
403# display information about End Of eXclusive byte (EOX=F7)
404#>2	ubyte			0xF7		\b, at 2 EOX
405#>3	ubyte			0xF7		\b, at 3 EOX
406# https://tttapa.github.io/Control-Surface-doc/new-input/Doxygen/d2/d93/SysEx-Send-Receive_8ino-example.html
407>4	ubyte			0xF7		\b, at 4 EOX
408# http://www.1manband.nl/tutorials2/sysex.htm
409>5	ubyte			0xF7		\b, at 5 EOX
410# http://www.somascape.org/midi/tech/mfile.html#sysex
411>6	ubyte			0xF7		\b, at 6 EOX
412#
413>7	ubyte			0xF7		\b, at 7 EOX
414# https://webmidijs.org/forum/discussion/34/how-to-send-or-receive-system-exclusive-messages
415>8	ubyte			0xF7		\b, at 8 EOX
416#
417>9	ubyte			0xF7		\b, at 9 EOX
418# https://www.chd-el.cz/wp-content/uploads/845010_syxcom.pdf
419>10	ubyte			0xF7		\b, at 10 EOX
420# https://stackoverflow.com/questions/52906076/handling-midi-the-input-of-multiple-system-exclusive-messages-in-vb
421>11	ubyte			0xF7		\b, at 11 EOX
422# https://www.2writers.com/eddie/TutSysEx.htm
423>12	ubyte			0xF7		\b, at 12 EOX
424>13	ubyte			0xF7		\b, at 13 EOX
425# http://www.chromakinetics.com/handsonic/rolSysEx.htm
426>14	ubyte			0xF7		\b, at 14 EOX
427#>15	ubyte			0xF7		\b, at 15 EOX
428
4290	string			T707		Roland TR-707 Data
430