Sources and Sinks
Every flowgraph begins at a source and ends at a sink, and most beginner confusion lives at those two ends. This chapter catalogues the honest handful of each that this guide uses, what each one promises, and what each one quietly assumes. By the end you can look at any flowgraph's left and right edges and say where its numbers come from and where they go.
Sources: where numbers are born
Signal and noise sources invent their samples by arithmetic. A signal source makes a clean tone, a square wave, a ramp — the laboratory animals of this guide, because their output is known exactly, so anything the chain does to them can be checked exactly. A noise source makes controlled randomness, for testing how a chain treats the unstructured world. Chapter 6's first flowgraph and chapter 9's rate experiments are powered by these: no hardware, no weather, no excuses.
The file source reads samples that were written earlier by a file sink — a recording. It is how real signals enter a lab: record the air once, with whatever hardware and patience that took, then develop receivers against the recording at your leisure, as chapter 11 does. Its one assumption matters: a file of samples carries no label saying what rate it was recorded at or what frequency it sat on. That knowledge lives in the recordist's notes, and a flowgraph reading the file must be told the rate (the throttle below exists because of this). Wrong rate, wrong radio — chapter 16's first garbling cause.
Hardware sources — the blocks named for devices and driver families (RTL-SDR Source, UHD Source and their kin) — deliver samples from the air, paced by the device itself. They are the point of the whole toolkit and, in this guide, documented-only: the lab has no device attached, says so wherever the subject arises, and teaches their settings from the projects' documents rather than pretending a transcript.
The throttle: a source's chaperone
A file or arithmetic source will feed a chain as fast as the computer allows — a second of signal in a millisecond — which is wrong for anything involving sound cards or a reader's sense of time. The throttle block holds the stream to its stated sample rate. Two rules cover its whole behaviour: use it when nothing else in the chain sets the pace (no hardware either end), and never use it when hardware does — two pacemakers make the stream stutter and overrun (chapter 16).
Sinks: where numbers go to be known
The file sink writes samples raw: complex pairs as interleaved 32-bit floats, eight bytes per pair, nothing else — no header, no rate, no mercy. Its virtue is total fidelity: what the chain computed is what is on the disk, byte for byte, which is why this guide's lab measures its results from file sinks with plain Python (chapter 6) instead of trusting a display. Its arithmetic is worth memorising: a complex stream at 240,000 samples per second fills 240,000 × 8 ≈ 1.9 MB per second, about 115 MB a minute. Rates are disk bills too.
The audio sink hands samples to the sound card, which paces the whole graph by consuming them at the audio rate — and demands the stream be real and at an audio rate (44,100 or 48,000 per second are the household numbers), which is why receivers end with chapter 9's rate changes and a complex-to-real step before the speaker.
Graphical sinks — spectrum, waterfall, scope — draw the stream. They are how chapter 10 reads a signal's portrait. They are also blocks with appetites: a waterfall redrawn thirty times a second is real work, and closing the ones you are not watching is chapter 16's cheapest cure for overruns.
The null sink throws samples away: the honest ending for a branch built to be measured elsewhere, and the load a benchmark runs against. A flowgraph ending in a null sink and a stopwatch is a speedometer for its own chain.
The pattern to carry on
Read any flowgraph from its edges: source says what world the numbers came from, sink says what will be believed about them. The lab's rule, worth stealing: end development chains in file sinks and measure the file. A display can flatter; bytes cannot.
Check: given a complex file sink at 480,000 samples per second, a 10-second run writes 480,000 × 8 × 10 ≈ 38 MB. If that sum feels routine now, the ends of every flowgraph in the rest of this guide will read plainly.