pcmprint

CLI PCM visualiser
git clone git://nsmpr.xyz/pcmprint.git
Log | Files | Refs | README

pcmprint.1 (1172B)


      1 .Dd $Mdocdate: March 20 2019 $
      2 .Dt PCMPRINT 1
      3 .Os
      4 .Sh NAME
      5 .Nm pcmprint
      6 .Nd prints PCM data into stdout
      7 .Sh SYNOPSIS
      8 .Nm pcmprint
      9 .Op Fl b Ar blocksize
     10 .Op Fl w Ar width
     11 .Op Ar file
     12 .Sh DESCRIPTION
     13 .Nm
     14 reads input (either stdin or file, if specified) and prints to stdout lines visualising the signal.
     15 Input data is assumed to be RAW PCM, signed, 16-bit, stereo, with sampling rate of 44100 Hz.
     16 .Sh OPTIONS
     17 .Bl -tag -width Ds
     18 .It Fl b Ar blocksize
     19 specifies size of the sample block to operate on.
     20 Size of the block is assumed to be in sampling frames, 4 bytes per frame.
     21 Default value is 1024.
     22 .It Fl w Ar width
     23 specifies width of the printed channel on the output.
     24 Default value is 30 characters, which with 2 channels and hardcoded 10 characters of separation fits into standard 80-columns terminal with some room to play.
     25 .Sh EXIT STATUS
     26 .Ex -std pcmprint
     27 .Sh EXAMPLES
     28 Use
     29 .Nm
     30 together with 
     31 .Xr tee 1
     32 to look at audio shape while it's playing:
     33 
     34 for
     35 .Xr sndio 7 :
     36 .Bd -literal -offset indent
     37 $ tee /dev/audio0 < music.raw | pcmprint
     38 .Ed
     39 
     40 for alsa:
     41 .Bd -literal -offset indent
     42 $ mkfifo /tmp/fifo
     43 $ (tee /tmp/fifo < music.raw | pcmprint) &
     44 $ aplay -f cd < /tmp/fifo
     45 .Ed