I-D(1)
πΎ I-D(1) β the little short-to-double converter (BRL-CAD, bestie) πΎ
okay so real talk: this page is i-d(1) from the BRL-CAD manual set, and it's giving "tiny utility that does exactly one thing and does it cute." let's get into it β¨
πΈ NAME πΈ
i-d β converts 16-bit short integers into doubles. that's it. that's the whole job. she's a converter, an icon, a legend π
π SYNOPSIS π
i-d [-n | scale] < shorts > doubles
read it like a lil recipe: shorts go in, doubles come out, and you pick your scaling with either -n or a scale. π«Ά
β¨ DESCRIPTION β¨
okay so here's the vibe. i-d reads a stream of native, machine-format 16-bit signed short integers from standard input, multiplies every single value by a scale factor, and writes the results out to standard output as native, machine-format double-precision floating point numbers. glow up, honestly π
that optional single argument is the whole personality β it picks the scaling:
- if you hand it a numeric scale, every input value gets multiplied by it. simple. slay.
- if you hand it
-n, the scale gets set to1.0/32768.0, so input data spanning the full short integer range maps right onto the range-1.0to+1.0. chef's kiss π§ - with no argument, the scale defaults to
1.0.
β οΈ heads up bestie: this command is deprecated and scheduled for removal, and it prints a deprecation warning on startup. she's on her way out, so don't build your whole life around her π
she's the inverse of d-i(1), and she's typically used in pipelines with other BRL-CAD signal-processing tools like dmod(1) and dconv(1). pipeline queen fr fr π
π OPTIONS π
-nβ normalize, babes: use a scale of1.0/32768.0so the full 16-bit signed input range maps onto-1.0to+1.0. Mutually exclusive with a numeric scale argument, so pick a lane π- scale β a floating point multiplier applied to every input sample during conversion. a scale of
0.0is rejected as an error β she will not be doing that, thank u π
π¦ EXAMPLES π¦
Example 1. Normalize full-scale short samples to unit-range doubles
i-d -n < signal.pcm > signal.d
treats the values in signal.pcm as 16-bit signed samples and rescales them to the range -1.0 to +1.0, producing double-precision data in signal.d suitable for further floating point processing. literally so clean β¨
Example 2. Convert and filter in a processing pipeline
i-d -n < input.shorts | dmod -m 2.0 > louder.d
converts the 16-bit short stream to normalized doubles, then doubles the amplitude with dmod(1), leaving the result as a double-precision stream in louder.d. louder.d is right, bestie β it's giving main character energy π₯
π SEE ALSO π
brlcad(1), d-i(1), i-a(1), i-f(1), dconv(1), dmod(1) β go read the whole friend group, they're all iconic π
π AUTHOR π
BRL-CAD Team. legends, honestly π«Ά
β COPYRIGHT β
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. don't be shy, they wanna hear it π
okay that's the whole page, no cap π
this was page I-D(1) from the BRL-CAD manual set β thank u for coming to my ted talk, go convert some shorts into doubles responsibly, mwah ππΈ
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms