Summary
In Tutorials/Signals - Quantization and Sampling.ipynb, many cells call makelab.signal.plot_signal(...) with quantization_bits passed as the third positional argument. But plot_signal's third positional parameter is title, not bit depth:
def plot_signal(s, sampling_rate, title=None, xlim_zoom=None, highlight_zoom_area=True):
So calls like:
makelab.signal.plot_signal(audio_data_16bit, sampling_rate, quantization_bits, xlim_zoom=xlim_zoom)
pass quantization_bits (an int) into the title slot. The chart title then renders as a bare number (e.g. 16) instead of a descriptive title.
Expected
The intended helper is almost certainly plot_audio, which does take quantization_bits and builds a "{bits}-bit, {rate} Hz audio" title:
def plot_audio(s, sampling_rate, quantization_bits=16, title=None, xlim_zoom=None, highlight_zoom_area=True):
(Note: plot_audio had a separate bug where it discarded its computed title — fixed in the makelab review work, see context below — so it now produces the correct title.)
Impact
- Not a crash; the notebook still runs. The charts just show an unhelpful integer title instead of the bit-depth/sampling-rate description.
- ~15 call sites in
Tutorials/Signals - Quantization and Sampling.ipynb.
Proposed fix
Replace the affected plot_signal(..., quantization_bits, ...) calls with plot_audio(..., quantization_bits=quantization_bits, ...) (or pass an explicit title=). Then re-run the notebook (Restart & Run All, or the nbmake smoke test) to confirm titles render correctly.
Why this is a separate issue
This is a notebook-side bug. It was discovered during a review/cleanup of the makelab helper library (Tutorials/makelab/signal.py, audio.py), which was deliberately scoped to the .py files only. Filing separately so the notebook edit (which touches an nbmake-tested .ipynb) can be handled on its own.
Summary
In
Tutorials/Signals - Quantization and Sampling.ipynb, many cells callmakelab.signal.plot_signal(...)withquantization_bitspassed as the third positional argument. Butplot_signal's third positional parameter istitle, not bit depth:So calls like:
pass
quantization_bits(an int) into thetitleslot. The chart title then renders as a bare number (e.g.16) instead of a descriptive title.Expected
The intended helper is almost certainly
plot_audio, which does takequantization_bitsand builds a"{bits}-bit, {rate} Hz audio"title:(Note:
plot_audiohad a separate bug where it discarded its computed title — fixed in the makelab review work, see context below — so it now produces the correct title.)Impact
Tutorials/Signals - Quantization and Sampling.ipynb.Proposed fix
Replace the affected
plot_signal(..., quantization_bits, ...)calls withplot_audio(..., quantization_bits=quantization_bits, ...)(or pass an explicittitle=). Then re-run the notebook (Restart & Run All, or thenbmakesmoke test) to confirm titles render correctly.Why this is a separate issue
This is a notebook-side bug. It was discovered during a review/cleanup of the
makelabhelper library (Tutorials/makelab/signal.py,audio.py), which was deliberately scoped to the.pyfiles only. Filing separately so the notebook edit (which touches annbmake-tested.ipynb) can be handled on its own.