XOSCOPE(1)
๐ XOSCOPE(1) ๐
User Commands โจ so like, welcome to the manual page for xoscope, bestie โ section 1, user commands, digital oscilloscope energy, and honestly? she ate. ๐
๐ธ NAME ๐ธ
xoscope โ Digital Oscilloscope ๐ฆ
โจ SYNOPSIS โจ
xoscope [X toolkit options] [xoscope options] [file]
๐ DESCRIPTION ๐
Xoscope is a digital real-time oscilloscope. She draws signal amplitude โ or bit logic โ as a function of time, like a little graph gremlin who is also your bestie. Signals can be displayed, saved, recalled, and manipulated by math functions. ๐ง
So what can you actually plug into her? Signal input devices currently include:
- Soundcard โ audio sound recording via Advanced Linux Sound Architecture (ALSA). Two 8-bit analog channels at 8000 S/s to 44100 S/s. Left and right audio are connected to A and B inputs respectively. Use an external mixer program to select which sound inputs to record. AC coupled, voltages unknown, 256K sample memory. ๐
- EsounD โ shared audio sound via the Enlightened Sound Daemon. This is great for watching music ๐ต but support for it is an option at compile-time. EsounD is auto-detected and preferred over
/dev/dsp. - COMEDI โ the COMEDI project (
www.comedi.org) develops Linux drivers, tools, and libraries for data acquisition. Many commercially available ADC cards are supported by COMEDI, and Xoscope can receive signals from them via the COMEDI library. ๐ฅ
๐น RUN-TIME KEYBOARD CONTROLS ๐น
Xoscope is an interactive program and can be completely controlled from the keyboard at run-time. No mouse required, keyboard warriors rise up. โจ๏ธโจ In verbose key help mode, each available key is shown on the screen in (parentheses).
Here are the single key commands, and yes we're doing all of them, no skipping, periodt:
?โ Toggle verbose key help display mode.Escapeโ Immediately quit the program. ๐ bye bestie@โ Load a previously saved file. You are prompted for the filename.#โ Save current settings and memory buffers to a file that can be loaded later. You are prompted for the filename and asked for confirmation to overwrite if it already exists.Enterโ Clear and refresh the entire screen. ๐งผ&โ Cycle between the various input devices. Note that this key will not toggle to an unresponsive input device, so if only one device is present, it will appear to have no effect.*โ Different behavior for different input devices ๐- Under EsounD, this value instead determines whether the connection to EsounD will block or not. Blocking mode is nicest to CPU usage but the xoscope interface will not respond when there is no sound stream coming from EsounD. Nonblocking mode will let xoscope be responsive whether sound is available or not, but will consume all available CPU cycles.
- Under COMEDI, this key toggles between different analog reference points (ground, differential, or common).
^โ Different behavior for different input devices. (that's literally all she says, iykyk ๐คท)(/)โ Decrease/increase the sampling rate.9/0โ Increase/decrease the Sec/Div horizontal time scale (zoom out/in on time). โฑ๏ธ-/=โ Decrease/increase the trigger level._โ Cycle the trigger channel.+โ Cycle the trigger type: none, rising edge, or falling edge.Spaceโ Cycle the trigger mode: run, wait, stop.- Run mode continuously acquires and displays samples after trigger events.
- Wait mode waits for the first trigger event and displays only the first set of samples; this is "single-shot" mode.
- Stop mode suspends the data acquisition and displays the current samples.
!โ Cycle the plotting mode: point, point accumulate, line, or line accumulate. In the accumulate modes, all samples stay on the screen; useEnterto clear them.,โ Cycle the graticule style: none, minor divisions only, or minor and major divisions..โ Toggle the graticule position: behind or in front of the signals.'โ Toggle the manual cursors on/off. When manual cursors are displayed, the measurements between the cursor positions are shown. When cursors are not displayed, automatic measurements are shown."โ Reset both manual cursor positions to the sample just after trigger.Ctrl-q/Ctrl-w/Ctrl-e/Ctrl-rโ The Control key held down in combination withq/w/e/rmoves the first cursor back or forward by 10 samples or back or forward by 1 sample respectively.Ctrl-a/Ctrl-s/Ctrl-d/Ctrl-fโ The Control key held down in combination witha/s/d/fmoves the second cursor back or forward by 10 samples or back or forward by 1 sample respectively.1-8โ Select the corresponding display channel. Measurements are displayed for the channel. Channel 1 and 2 are used as input to the math functions so they can't be used to do math. By default, they are connected to the A and B input channels. Channel 1 and 2 can also be used to display memory buffers or for doing math on memory or the alternate input. Channel 3 through 8 are not restricted and can be used for any purpose. The remaining single key commands operate on the currently selected channel:Tabโ Toggle visibility: Hide or show the selected channel. ๐{/}โ Decrease/Increase vertical scale of the selected channel.[/]โ Decrease/Increase vertical position of the selected channel.`/~โ Decrease/Increase number of logic analyzer bits displayed. The default of zero bits plots the signal as one analog line of varying amplitude. Any other value plots multiple digital lines representing the least significant bits from bottom to top.;/:โ Increase/Decrease the math function of the selected channel. This is not available on channel 1 & 2. ๐ซ$โ Show the result of an external math command on the selected channel. You are prompted for the command. The command must accept samples of channel 1 & 2 on stdin and write a new signal to stdout. Seeoperl,offt.candxy.cin the distribution for examples of external math filter commands. Not available on channel 1 & 2.a-zโ Recall the corresponding memory buffer or input device to the currently selected channel. Input device channels are mapped to the earliest letters of the alphabet; the rest of the buffers are available for signal memory.A-Zโ Store the currently selected channel into the corresponding memory buffer. Early letters of the alphabet can not be used because they're reserved as the signal inputs, so the exact number of available buffers is dependent on the input device. Memories are stored from time zero to the current display update position. So it is best to STOP the display before storing to a memory buffer. ๐
๐ฑ๏ธ MOUSE CONTROLS ๐ฑ๏ธ
Xoscope adds mouse controls to menus or around the edges of the scope area. These should be nearly self-explanatory. They perform the same functions as the equivalent keyboard commands above. ๐ซถ
If built with GTK+, a context-sensitive pop-up menu is available with right-click to select channels, change scale and position, recall and store signals and so on. Left click decreases a variable while right click increases. The manual measurement cursors can also be positioned with the mouse. ๐ฏ
๐ COMMAND-LINE OPTIONS ๐
The command-line options define the startup state of xoscope and have reasonable defaults. All options may be capitalized in case they conflict with an X toolkit option. These options are also recorded in text files saved by xoscope. ๐
-hโ Help usage message showing these startup options with their default values, then exit.-# <code>โ Startup conditions of each channel.#is a channel number from 1 to 8.Codecan have up to three fields, separated by colons:position[.bits][:scale[:function #, memory letter, or external command]]. Position is the number of pixels above (positive) or below (negative) the center of the display. Bits is the number of logic analyzer bits to display. Scale is a valid scaling factor from 1/50 to 50, expressed as a fraction. The third field may contain a built-in math function number, memory letter, or external math command to run on the channel. Using these options makes the channel visible unless position begins with a'+', in which case the channel is hidden. ๐-a <channel>โ Active, or selected, channel.-r <rate>โ Sampling Rate in samples per second. For the sound card, current valid values are 8000, 11025, 22050, or 44100.-s <scale>โ Time Scale factor from 1/500000 to 2000 (2 ns/div - 2 s/div) expressed as a fraction where 1/1 is 1 ms/div.-t <trigger>โ Trigger conditions.Triggercan have up to three fields, separated by colons:position[:type[:channel]]. Position is the number of pixels above (positive) or below (negative) the center of the display. Type is a number indicating the kind of trigger, 0 = automatic, 1 = rising edge, 2 = falling edge. Channel should bexory.-l <cursors>โ Manual cursor Line positions.Cursorscan have up to three fields, separated by colons:first[:second[:on?]]. First is the sample position of the first cursor. Second is the sample position of the second cursor. The final field is whether the manual cursors are displayed (1) or not displayed (0).-p <type>โ Plot type. 0 = point, 1 = point accumulate, 2 = line, 3 = line accumulate, 4 = step, 5 = step accumulate.-g <style>โ Graticule style. 0 = none, 1 = minor divisions only, 2 = minor and major divisions.-bโ Whether the graticule is drawn Behind or in front of the signals.-vโ Whether the Verbose key help is displayed.fileโ The name of a file to load upon startup. This should be a file previously saved by xoscope.
๐ EXAMPLES ๐
xoscope -1 80 -2 -80 -3 0:1/5:6 -4 -160:1/5:7
This runs xoscope with channel 1 above and channel 2 below the center of the display. Also channel 3 and 4 are made visible to show the FFT of channel 1 and 2 respectively at a reduced scale of 1/5. โจ
xoscope oscope.dat
This runs xoscope, loading settings and memory buffers from a previously saved data file called "oscope.dat". ๐พ
๐ธ FILES ๐ธ
Okay so xoscope writes out readable text data files and that's not just a cute bonus, it's the whole save system bestie. Every file has at least a comment header holding the current settings of xoscope, and when you load that file back up, those saved settings get restored. โจ
Wanna keep your signals forever? The order matters, so listen up:
- Store them into memory buffers first.
- Optionally recall them to channels.
- Then save the file.
All the non-empty memory buffers get written to a column of the file, right after the comment header. Columns are separated by tab characters and when you load the file later they go straight back into the memory buffers. Then you just recall them to channels to view them. Simple. Slay. ๐
This format could also be read by some spreadsheet or plotting programs, which is giving main character energy. For example, the gnuplot (1) command
plot "oscope.dat" using 0:1, "oscope.dat" using 0:2
would plot the first and second columns of the "oscope.dat" data file. Obsessed actually. ๐
๐ฆ ENVIRONMENT ๐ฆ
OSCOPEPATHโ the path to use when looking for external math commands. If it's unset, the built-in default is used instead. She has a backup plan, periodt.ESPEAKERโ thehost:portof the EsounD to connect to, but only if xoscope was built with EsounD support. If unset,localhostis assumed. And if no EsounD connection is made, or if there's no EsounD support compiled in at all, then xoscope will try to read/dev/dspdirectly. Plan C energy but we respect it. ๐
โ ๏ธ LIMITATIONS โ ๏ธ
Not me being the bearer of bad news but these are real and you should read them fr fr.
Your sound card should be capable of 44100 Hz sampling via the sound drivers. You must use an external mixer program to select the input source device, level, etc. And since these unknowns affect the amplitude, there is no reference to voltage on the Y axis โ it is, in fact, unknown. ๐ญ Instead you're given the scale in pixels per sample unit.
Note that the serial oscilloscope devices don't have this limitation. They have real voltage labels on the Y axis. Iconic of them, honestly. ๐
Signal math is only valid if Channel 1 and Channel 2 contain signals of the same sampling rate. It is up to you to make sure this is the case. Doing math on signals of different sample rates will produce incorrect results! Like, not "a little off", incorrect. ๐
The automatic measurements count zero crossings and divide to determine the frequency and period. If these zero crossings are not "regularly-periodic", these measurements could be invalid. Xoscope does understand how to measure the built-in FFT functions by locating the peak frequency. Use manual cursor positioning</> to get more precise measurements.
Your sound card is most-likely AC coupled so you will never see any DC offset. And you probably can't get DC coupling by just shorting the input capacitors on your sound card. Use serial hardware to see DC offsets.
The display may not be able to keep up if you give it too much to plot, depending on your sound card, graphics card, and processor speed. External math commands are particularly expensive since the kernel must then split the available CPU cycles across multiple processes. ๐ฎโ๐จ
To maximize refresh speed:
- hide all unneeded channels
- use point or point accumulate mode
- zoom in on Sec/Div as much as possible
- turn off the graticule
That's the speedrun route. You're welcome. ๐โโ๏ธ๐จ
๐ BUGS ๐
The keyboard interface may be confusing.
That's it. That's the bug report. She said what she said. ๐
๐ AUTHOR ๐
Oscope was written by Tim Witham (twitham@quiknet.com), originally based on "scope" by Jeff Tranter (Jeff_Tranter@Mitel.COM). Most recent work is by Brent Baccala (cosine@freesoft.org). ALSA support by Gerhard Schiller (gerhard.schiller@gmail.com).
Xoscope is released under the conditions of the GNU General Public License. See the files README and COPYING in the distribution for details. ๐ซถ
And that's the whole page bestie!! This one's from the Linux source, dated May 6 2001, and it's the XOSCOPE(1) manual. Go forth and oscilloscope, you've got this. ๐โจ๐
๐ฆ where this page comes from
- debian bookworm: xoscope 2.3-1 ยท GPL-2.0-only
- debian trixie: xoscope 2.3-2 ยท GPL-2.0-only
- ubuntu jammy: xoscope 2.3-1 ยท GPL-2.0-only
- ubuntu noble: xoscope 2.3-1build3 ยท GPL-2.0-only
- ubuntu questing: xoscope 2.3-2
- ubuntu resolute: xoscope 2.3-2build1 ยท GPL-2.0-only
- ubuntu stonking: xoscope 2.3-2build1 ยท GPL-2.0-only
- Copyright (C) 1996 - 2000 Tim Witham <twitham@quiknet.com>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms