I-D(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸ’Ύ 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 to 1.0/32768.0, so input data spanning the full short integer range maps right onto the range -1.0 to +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 of 1.0/32768.0 so the full 16-bit signed input range maps onto -1.0 to +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.0 is 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 🫢


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