{"success":true,"data":{"ext":"mid","name":"Musical Instrument Digital Interface","description":"Musical Instrument Digital Interface (MIDI) is a standardized music data format originally developed by industry collaborators and now maintained by The MIDI Association. It is used to store performance instructions for sequencing, playback, notation software, synthesizers, and digital audio workstations rather than recorded audio. MIDI files are generally safe, though some players may support embedded metadata or external references; the format remains widely used and is supported across many legacy and modern systems.","mime":["audio/midi"],"risk_level":"Safe","signatures":[{"hex":"4D 54 68 64","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"},{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Midi.cs"}]}],"related":["midi","rmi","aac","ac3","aif","aifc"],"usage":{"python":"def is_mid(file_path: str) -> bool:\n    \"\"\"Check if file is a valid MID by magic bytes.\"\"\"\n    signature = bytes([0x4D, 0x54, 0x68, 0x64])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isMID(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x54, 0x68, 0x64]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsMID(data []byte) bool {\n    signature := []byte{0x4D, 0x54, 0x68, 0x64}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Audio"}}