JACK-STDIN(1)

πŸ“¦
version 1.6 Β· 2 versions
, in arch rolling, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– JACK-STDIN β€” the jack-stdin(1) glow-up πŸ’–

okay bestie, pull up a chair, we're reading a General Commands Manual page together and it's honestly iconic. this is jack-stdin, section 1, and she's here to pipe your raw audio straight into JACK. let's get into it πŸŽ€


✨ NAME ✨

jack-stdin β€” write JACK audio data to stdin πŸ’…


✨ SYNOPSIS ✨

jack-stdin [OPTIONS] port1 [ port2 ...]

✨ DESCRIPTION ✨

so the whole vibe is: jack-stdin reads raw audio data from standard-input and writes it out to a JACK audio port. that's it, that's the girl. πŸ¦‹

how many channels you get? that's decided by how many ports you hand her. one port = one channel. and if you're giving her more than one channel, the incoming audio-sample data has to be interleaved β€” no cap, that's just the rule. 🌸


✨ OPTIONS ✨

  • -b, --bitdepth BITS β€” sets the bit-depth of each sample. for integer-encoding this can be 16 or 24. default is 16. heads up tho: this setting only matters for integer encoding, because floating-point samples are always 32 bit wide, periodt. πŸ’œ
  • -d, --duration SEC β€” how long should jack-stdin run, in seconds? any value less than 1 means run indefinitely. default is 0, which reads until end-of-file. 🫢
  • -e, --encoding FORMAT β€” sets the input format of the data: signed-integer, unsigned-integer, floating-point (default: signed). 🌈
  • -n, --name CLIENTNAME β€” sets the JACK client name (default: jstdin). name her something cute πŸ’–
  • -f, --file FILENAME β€” read data from the given file instead of standard-input. yes, she can do files too πŸ”₯
  • -h, --help β€” prints a brief usage information. classic, love her for that ⭐
  • -p, --prebuffer PERCENT β€” pre-fill the buffer before starting audio output to JACK (default 50.0%). > NOTE: disable pre-buffering (-p 0) or use a small buffer size to play back very short samples. this one matters, don't skip it πŸ™ˆ
  • -L, --little-endian β€” the input-data is in little-endian byte-order, or native-byte-order float. this is the default, she's the main character 🧚
  • -B, --big-endian β€” interpret input audio data in big-endian byte-order, or swap the byte-order of floating-point. ✨
  • -q, --quiet β€” inhibit usual output. this affects information and buffer-overflow warnings, but not setup-errors. she still yells about the important stuff πŸ’€
  • -S, --bufsize SAMPLES β€” choose the internal buffer-size in samples. default size is 65536. the value you give gets multiplied by the number of channels and bit-depth to get the size of the ring-buffer. > Note: the buffersize must be larger than JACK's period size. don't fight me on this one πŸ“

✨ EXAMPLES ✨

here's the part where we actually do stuff. first one: pipe jack-stdout through sox (tremolo moment 😌) and into jack-stdin:

  jack-stdout vlc_31994:out_1 vlc_31994:out_2 \
     | sox -t raw -r 48k -e signed -b 16 -c 2 - \
           -t raw -r 48k -e signed -b 16 -c 2 - \
        tremolo 5 100 \
     | ./jack-stdin system:playback_1 system:playback_2

and second one, the simple girlie version β€” straight from /dev/dsp:

  cat /dev/dsp \
     | jack-stdin system:playback_1 system:playback_2

✨ KNOWN ISSUES ✨

jack-stdin is not suitable to play-back files shorter than twice the jack-period size. she said what she said 😭

✨ AUTHOR ✨

Robin Gareus <robin@gareus.org>. thank you for your service, king πŸ‘‘


✨ SEE ALSO ✨


and that's the whole page, bestie!! no gatekeeping, we read every single line together 🫢

this lil' manual is from the General Commands Manual, dated 21 February 2019 β€” so yeah, she's been slaying since 2019 and she still eats πŸ’…βœ¨