From 90fe37ae4b0b5026a3f09e9050556237069c1e52 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Thu, 5 Nov 2026 14:53:19 +0100 Subject: [PATCH 1/2] Clarify that PeriodicWave real[0] is ignored The constructor sets index 0 of real and imag to 0, so a PeriodicWave cannot produce a DC-offset. Point authors to ConstantSourceNode instead. Closes #2530 --- index.bs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 08becf433..30cdb7127 100644 --- a/index.bs +++ b/index.bs @@ -10002,8 +10002,10 @@ Dictionary {{PeriodicWaveOptions}} Members : real :: The {{PeriodicWaveOptions/real}} parameter represents an array of - cosine terms. The first element (index 0) is the - DC-offset of the periodic waveform. The second element + cosine terms. The first element (index 0) is + ignored: it is set to 0 when the {{PeriodicWave}} is constructed, + so a {{PeriodicWave}} cannot produce a DC-offset. A DC-offset can + be added by connecting a {{ConstantSourceNode}}. The second element (index 1) represents the fundamental frequency. The third represents the first overtone and so on. From d17ca6573d3cbc018a8cff6ebcd53a181589b24f Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Fri, 6 Nov 2026 10:19:13 +0100 Subject: [PATCH 2/2] Note that PeriodicWave imag[0] is also set to 0 --- index.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 30cdb7127..60d6dbfc3 100644 --- a/index.bs +++ b/index.bs @@ -9995,7 +9995,8 @@ Dictionary {{PeriodicWaveOptions}} Members :: The {{PeriodicWaveOptions/imag}} parameter represents an array of sine terms. The first element (index 0) does not - exist in the Fourier series. The second element + exist in the Fourier series: it is set to 0 when the {{PeriodicWave}} + is constructed. The second element (index 1) represents the fundamental frequency. The third represents the first overtone and so on.