LinuxCommandLibrary

sam2p

Convert SAM/BAM alignment data to pileup format

TLDR

Concatenate all PDF files into one

$ sam2p *.pdf [path/to/output.pdf]
copy

SYNOPSIS

sam2p [options] input_file [output_file]

PARAMETERS

-a
    Set the anchor point (0-1).

-b
    Set the base value for log scaling.

-c
    Set the color scheme.

-d
    Set the output device (e.g., ps, eps, png, svg).

-e
    Set the end sample.

-f
    Force the input format.

-g
    Set the graph type (e.g., waveform, spectrogram).

-h
    Set the image height.

-l
    Set the level for the spectrogram.

-m
    Set the resample method.

-n
    Set the number of samples per pixel.

-o
    Set the offset for log scaling.

-p
    Set the output file prefix.

-q
    Set the JPEG quality (0-100).

-r
    Set the output rate.

-s
    Set the start sample.

-t
    Set the input data type (e.g., s8, u8, s16, u16, s32, f32).

-w
    Set the image width.

-x
    Invert the x-axis.

-y
    Invert the y-axis.

-z
    Zoom in on the y-axis.

-v
    Verbose output.

-V
    Show version.

DESCRIPTION

sam2p is a command-line tool primarily used for converting audio sample data into various graphical representations, including PostScript, EPS, PNG, SVG, and others. It's designed to visually represent audio waveforms, spectrograms, or other forms of audio data in a static image format. This allows for easy inclusion of audio information in documents, presentations, or web pages. The tool supports numerous input audio formats and provides a variety of options for customizing the output image, such as specifying the sample range, color scheme, graph type, and output resolution.

sam2p provides various ways to view the audio, allowing you to visualize things like its waveform or spectrogram.

Essentially, sam2p bridges the gap between raw audio data and visual representations, offering a flexible and powerful tool for audio analysis and presentation.

CAVEATS

The range of supported input audio formats and output image formats can vary depending on the specific version of sam2p and the libraries it was compiled with. Some options may have limited or no effect with certain input formats or output devices.

FILE EXTENSIONS

The output file extension is determined by the output device specified by the '-d' option. For example, using '-d ps' will result in a PostScript file, typically with a '.ps' extension. Similarly, '-d png' will produce a PNG file.

SPECTROGRAM CUSTOMIZATION

When generating spectrograms, the '-l' option is critical for adjusting the color mapping and highlighting frequency bands of interest. Experimenting with different values for '-l' can dramatically alter the visual representation of the spectrogram.

HISTORY

The history of sam2p isn't widely documented in readily available sources. It is believed to have emerged as a tool needed for audio visualization tasks, likely developed by individuals or small teams involved in audio processing and analysis. Over time, it has evolved to support more input and output formats.

SEE ALSO

sox(1), ffmpeg(1)

Copied to clipboard