Csound music file (.csd)
.csd file signature | application/octet-stream
Huskygram, Poem, or Singer embroidery design file
Magic Bytes
Offset 0
3C 43 73 6F 75 6E 64 53 79 6E 74 68 65 73 69 7A
Sources: Gary Kessler
All Known Signatures
2 signature variants are documented for .csd files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 3C 43 73 6F 75 6E 64 53 79 6E 74 68 65 73 69 7A | 0 | Gary Kessler |
| 7C 4B C3 74 E1 C8 53 A4 79 B9 01 1D FC 4F DD 13 | 0 | Gary Kessler |
Extension
.csd
MIME Type
application/octet-stream
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .csd files in Python
def is_csd(file_path: str) -> bool:
"""Check if file is a valid CSD by magic bytes."""
signature = bytes([0x3C, 0x43, 0x73, 0x6F, 0x75, 0x6E, 0x64, 0x53, 0x79, 0x6E, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7A])
with open(file_path, "rb") as f:
return f.read(16) == signature
How to validate .csd files in Node.js
function isCSD(buffer: Buffer): boolean {
const signature = Buffer.from([0x3C, 0x43, 0x73, 0x6F, 0x75, 0x6E, 0x64, 0x53, 0x79, 0x6E, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7A]);
return buffer.subarray(0, 16).equals(signature);
}
How to validate .csd files in Go
func IsCSD(data []byte) bool {
signature := []byte{0x3C, 0x43, 0x73, 0x6F, 0x75, 0x6E, 0x64, 0x53, 0x79, 0x6E, 0x74, 0x68, 0x65, 0x73, 0x69, 0x7A}
if len(data) < 16 {
return false
}
return bytes.Equal(data[:16], signature)
}
API Endpoint
/api/v1/csd
curl https://filesignature.org/api/v1/csd
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .csd file?
A .csd file is a Csound music file file. Huskygram, Poem, or Singer embroidery design file
What are the magic bytes for .csd files?
The magic bytes for Csound music file files are 3C 43 73 6F 75 6E 64 53 79 6E 74 68 65 73 69 7A at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .csd file?
To validate a .csd file, read the first bytes of the file and compare them against the known magic bytes (3C 43 73 6F 75 6E 64 53 79 6E 74 68 65 73 69 7A) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .csd files?
There is no officially registered MIME type for .csd files. Systems typically use application/octet-stream as a generic fallback when handling this format.
Is it safe to open .csd files?
Csound music file (.csd) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.