<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Val</title>
    <description>The latest articles on DEV Community by Val (@clideckmcp).</description>
    <link>https://dev.to/clideckmcp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4107117%2Fe1dc1157-16ee-4b63-b3c7-85c6c3e0a61f.png</url>
      <title>DEV Community: Val</title>
      <link>https://dev.to/clideckmcp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clideckmcp"/>
    <language>en</language>
    <item>
      <title>Why a Sampling Grid Can Miss a Waveform’s Deepest Trough</title>
      <dc:creator>Val</dc:creator>
      <pubDate>Wed, 18 Nov 2026 18:23:18 +0000</pubDate>
      <link>https://dev.to/clideckmcp/why-a-sampling-grid-can-miss-a-waveforms-deepest-trough-4e6</link>
      <guid>https://dev.to/clideckmcp/why-a-sampling-grid-can-miss-a-waveforms-deepest-trough-4e6</guid>
      <description>&lt;p&gt;A waveform can be measured at enough points to reconstruct it exactly, yet its lowest recorded sample can still be a poor estimate of its deepest trough. Here is a concrete example: 25 samples give an exactly correct RMS, while the continuous negative peak is more than six times the depth suggested by the lowest sample.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article, its supporting code, and its mathematical checks were prepared with substantial assistance from ChatGPT. It has not undergone external peer review.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The question grew out of work on &lt;a href="https://bassplus.clideck.com/" rel="noopener noreferrer"&gt;Bass Plus&lt;/a&gt;, our macOS audio app, and the accompanying Mathematics of Sound project. The example below is an ideal mathematical signal. It is not a measurement of the app or a claim that this estimator is implemented in it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shipyardhq.dev%2Fd7Qn2fzkwpfSsXrDPJs9g3jvCTWez3fBduSpQRDKCZo%2Frs%3Afit%3A768%3A0%3A0%2Fq%3A85%2Fsm%3A1%2Ff%3Awebp%2FaHR0cHM6Ly9tZWRpYS5zaGlweWFyZGhxLmRldi91c2VyXzNNQVNWUWRNRk9Db0FqWlBSTUs0UWlod1lGdS9wcm9kdWN0cy9wcm9kX213aWtzNmxwXzF1YzJzNmxsX3pqdHN4ZDg2L21lZGlhLzE3OTQ3OTY3NTY2NjAtYmFzcy1wbHVzLWNocm9tYXRpYy1saXF1aWQtY3VycmVudC0yMDI2LTExLTE1LmpwZw" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shipyardhq.dev%2Fd7Qn2fzkwpfSsXrDPJs9g3jvCTWez3fBduSpQRDKCZo%2Frs%3Afit%3A768%3A0%3A0%2Fq%3A85%2Fsm%3A1%2Ff%3Awebp%2FaHR0cHM6Ly9tZWRpYS5zaGlweWFyZGhxLmRldi91c2VyXzNNQVNWUWRNRk9Db0FqWlBSTUs0UWlod1lGdS9wcm9kdWN0cy9wcm9kX213aWtzNmxwXzF1YzJzNmxsX3pqdHN4ZDg2L21lZGlhLzE3OTQ3OTY3NTY2NjAtYmFzcy1wbHVzLWNocm9tYXRpYy1saXF1aWQtY3VycmVudC0yMDI2LTExLTE1LmpwZw" alt="Bass Plus Chromatic Liquid interface" width="768" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A small model with a useful distinction
&lt;/h2&gt;

&lt;p&gt;Imagine adding several cosine waves. Each has amplitude one, starts with zero phase, and completes an integer number of cycles during a shared period. For a nonempty set A of distinct positive integer frequencies, write&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;f_A(x) = Σ[a ∈ A] cos(ax)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here x is phase, measured in radians. To turn it into a time variable, use x = 2πν₀t, where ν₀ is a base frequency in hertz. The values of f are normalized amplitudes, not decibels.&lt;/p&gt;

&lt;p&gt;Two different measurements matter. RMS describes the square root of the average squared amplitude. The negative peak describes how far the lowest point falls below zero. Define its depth as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;K(A) = −min[0 ≤ x ≤ 2π] f_A(x)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fourier orthogonality gives a mean of zero and an RMS of √(N/2), where N is the number of frequencies. RMS therefore depends only on the number of unit-amplitude components in this model. The negative peak also depends on which frequencies are present.&lt;/p&gt;

&lt;p&gt;For example, the sets {1, 2} and {1, 3} both have RMS 1. Their negative depths are 9/8 and 2 respectively. The first follows by writing cos x + cos 2x as 2(cos x + 1/4)² − 9/8. The second reaches −2 at x = π.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsonqa96i0pq5a1peucca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsonqa96i0pq5a1peucca.png" alt="Two pairs of cosine waves have the same RMS of one but negative depths of 1.125 and 2." width="799" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 1. Equal RMS, different troughs.&lt;/strong&gt; The curves have identical average squared amplitude. Their lowest values differ. The plotted curves are numerical renderings; both stated depths follow from the exact calculations above. Plotting code was prepared with AI assistance.&lt;/p&gt;

&lt;p&gt;For an acoustic-pressure interpretation, a negative value means a pressure deviation below equilibrium; it does not mean negative energy. This example also concerns the negative peak specifically. Both signals reach the positive value 2, so their maximum absolute amplitudes are identical.&lt;/p&gt;

&lt;h2&gt;
  
  
  Twenty-five samples that conceal a deeper trough
&lt;/h2&gt;

&lt;p&gt;Now take every frequency from 1 through N and put q = 2N + 1 equally spaced samples around one period. Include phase zero, and do not duplicate the endpoint at 2π:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;f_N(x) = Σ[a = 1 to N] cos(ax)
x_j = 2πj/q,    j = 0, 1, …, q − 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At phase zero all components equal one, so the sample is N. Every other sample is exactly −1/2. One way to see this is to sum the q complex roots of unity and pair each root with its conjugate. Equivalently, use the finite Dirichlet-kernel identity&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 + 2f_N(x) = sin(qx/2) / sin(x/2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At every nonzero grid point the numerator is zero. The removable singularity at phase zero has the value 2N + 1.&lt;/p&gt;

&lt;p&gt;Choose N = 12. The recorded values are 12 once, followed by twenty-four values of −0.5. Their mean is zero, and their mean square is (144 + 24 × 0.25)/25 = 6. Their RMS is therefore √6, about 2.44949: exactly the RMS of the continuous signal.&lt;/p&gt;

&lt;p&gt;But look halfway between the first and second nonzero sample positions, at x = 3π/25. The numerator of the identity is −1. The depth at this particular point is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;−f_N(3π/q) = 1/2 + 1 / (2 sin(3π/(2q)))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For q = 25, that is about 3.16836. A separate exact rational calculation bounds the true continuous depth between 3.2301038754 and 3.2301038755. The marked point is a convenient witness of a missed trough; it is not the exact minimizer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmjxdlzqqh8ytxwy2aj1r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmjxdlzqqh8ytxwy2aj1r.png" alt="The continuous twelve-harmonic signal drops below its sampled minimum of minus one half; a marked off-grid witness has value approximately minus 3.16836." width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 2. The curve between the samples.&lt;/strong&gt; The sample markers and the off-grid witness represent different evaluations of the same function. The witness already proves that the sample minimum is insufficient. The exact global-depth check uses a separate polynomial calculation. Plotting code was prepared with AI assistance.&lt;/p&gt;

&lt;p&gt;This gap is not restricted to twelve components. Since sin u ≤ u for positive u, the witness depth is at least 1/2 + q/(3π). It grows with N, while the negative depth inferred from the original grid remains 1/2. These are unnormalized sums: their total RMS also grows as more components are added.&lt;/p&gt;

&lt;h2&gt;
  
  
  The samples contain the information
&lt;/h2&gt;

&lt;p&gt;There is no contradiction with signal reconstruction. A trigonometric polynomial of known degree at most N is uniquely determined by these 2N + 1 samples. Discrete Fourier orthogonality recovers its coefficients.&lt;/p&gt;

&lt;p&gt;In physical units, the sample rate is (2N + 1)ν₀, above twice the highest frequency Nν₀. The problem is the operation applied after sampling: taking the smallest recorded value does not minimize the reconstructed curve.&lt;/p&gt;

&lt;p&gt;A display that joins the dots with straight lines can consequently give the wrong impression of the trough. Reconstructing the known polynomial, then finding its minimum with a controlled calculation, answers a different and more demanding question.&lt;/p&gt;

&lt;p&gt;There is another useful experiment. Move the entire grid by a fraction δ of one sample spacing, using xⱼ = 2π(j + δ)/q. The sampled minimum changes. The sampled RMS remains exactly √6 for every shift in this example: squaring the polynomial produces no frequency as high as q, so averaging over the shifted grid still cancels all nonconstant terms.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo8v8vccd0s1url2sh41g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo8v8vccd0s1url2sh41g.png" alt="Moving the twenty-five-point sampling grid changes the observed negative peak, while the sampled RMS stays equal to the continuous RMS." width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 3. Move the measuring grid, keep the waveform.&lt;/strong&gt; The offset runs through one sample spacing; offsets zero and one describe the same grid. RMS agreement is exact. The changing sampled-minimum curve is evaluated numerically. Plotting code was prepared with AI assistance.&lt;/p&gt;

&lt;p&gt;The positive peak of the original signal is N at phase zero, and the original grid captures it. This construction demonstrates a missed negative trough; it does not demonstrate a missed maximum absolute peak or an audible defect in an audio product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put an error interval around the estimate
&lt;/h2&gt;

&lt;p&gt;The general model also permits a simple bound. On an M-point uniform grid, let Kₘ be the negative of the sample minimum. Define S₁ as the sum of the frequencies and S₂ as the sum of their squares. Then&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;K_M ≤ K(A) ≤ K_M + E_M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;E_M = min(π S_1 / M, π² S_2 / (2 M²))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why does this work? Every phase lies within π/M of a grid point. The derivative has magnitude at most S₁, which bounds the change in amplitude over that distance. At a true minimum the first derivative vanishes; Taylor’s theorem and the second-derivative bound S₂ give the second, quadratic estimate. Both bounds are valid, so we can use the smaller one.&lt;/p&gt;

&lt;p&gt;The bound applies to any finite frequency set in this model, and also to a shifted uniform grid. It is conservative. For a fixed set, doubling M reduces the quadratic allowance by a factor of four; it does not guarantee that every observed error decreases by exactly that factor. On a very coarse grid, Kₘ can even be negative, so the definition matters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhye6k2z1zs80cgn6egkz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhye6k2z1zs80cgn6egkz.png" alt="Intervals computed from increasing grid sizes enclose the known exact depth of nine eighths for the two-frequency signal." width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 4. An estimate with a stated allowance.&lt;/strong&gt; For A = {1, 2}, the exact answer is 9/8. Each interval starts at the sampled estimate and adds the analytic discretization bound. Its displayed endpoints are floating-point approximations of mathematical bounds. Plotting code was prepared with AI assistance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the calculation
&lt;/h2&gt;

&lt;p&gt;This small example uses only the Python standard library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;math&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pi&lt;/span&gt;

&lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;M&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;
&lt;span class="n"&gt;samples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;M&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;M&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;k_grid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;s1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="no"&gt;M&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;pi&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;s2&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;M&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="no"&gt;M&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Approximate interval: [{k_grid:.9f}, {k_grid + error:.9f}]"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Exact depth for this example: 9/8 = 1.125"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The approximate interval is [1.118969855, 1.143065568]. It contains 1.125, as the analytic argument predicts.&lt;/p&gt;

&lt;p&gt;There are two sources of error to distinguish here: missing a minimum between grid points, and rounding while evaluating numbers. The formula controls the first. Ordinary floating-point cosine evaluations do not automatically certify the second. A machine-certified interval needs justified evaluation-error bounds and outward rounding, or an exact alternative such as the rational polynomial check supplied with this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to carry into an audio interface
&lt;/h2&gt;

&lt;p&gt;A useful analysis display can show the sampled minimum, identify any reconstructed curve, and state an error allowance when one is available. A slider that moves the sample grid makes the distinction visible without changing the underlying waveform. The axes should retain the same amplitude scale throughout the interaction.&lt;/p&gt;

&lt;p&gt;This is an educational example using equal-amplitude integer harmonics. It does not establish how arbitrary music, different phases, a playback device, or a processing chain behaves. It also does not resolve the open cosine-sum question that motivated the wider project. Its practical contribution is narrower: a correct average can coexist with a poor extremum estimate, and a small amount of analysis can make that uncertainty explicit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Attribution and reproducibility
&lt;/h3&gt;

&lt;p&gt;The Fourier-series and Parseval background is standard; see the &lt;em&gt;NIST Digital Library of Mathematical Functions&lt;/em&gt;, §1.8. The Chebyshev identity Tₙ(cos x) = cos(nx), used in the accompanying exact polynomial check, is given in §18.5, equation 18.5.1. These classical tools and the elementary bounds above are not claimed as new discoveries.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://bassplus.clideck.com/mathematics-of-sound/downloads/bassplus_sampling_reproducibility.zip" rel="noopener noreferrer"&gt;reproducibility files&lt;/a&gt; contain the plotting code, the standard-library demonstration, and an exact rational verifier. The verifier forms the polynomial sum of T₁ through T₁₂, isolates every critical point using Sturm’s theorem, and bounds their values. This checks the twelve-component example; it is not external peer review or proof-assistant formalization.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Project affiliation: CliDeck Research Notes, Mathematics of Sound. This is educational material authored for the project that motivated the investigation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>science</category>
      <category>software</category>
    </item>
  </channel>
</rss>
