{"success":true,"data":{"ext":"rmi","name":"Resource Interchange File Format --Windows MusicalInstrument Digital Interface file","description":"Resource Interchange File Format MIDI (RMI) is a RIFF-based audio file format developed by Microsoft and IBM for storing Standard MIDI data in a structured container. It is used to exchange and play MIDI sequences in software instruments, sequencers, and multimedia applications. The format is largely historical and generally safe, although playback depends on the host synthesizer rather than embedded audio content.","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"}]},{"hex":"52 49 46 46 52 4D 49 44 64 61 74 61","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["mid","midi","kar","wav"],"usage":{"python":"def is_rmi(file_path: str) -> bool:\n    \"\"\"Check if file is a valid RMI 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 isRMI(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x4D, 0x54, 0x68, 0x64]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsRMI(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"}}