Coloured noise is made by scaling each DFT bin of white noise by 1/f^B before inverse-transforming
White (broadband) noise has equal power at every frequency. The book’s ShapedNoise procedure colours it by working in the frequency domain: take the DFT of a block of white noise, then for each bin k divide its power by k^B (a 1/f^B spectral tendency), rebuild the bin from the shaped amplitude and original phase, force the spectrum to be conjugate-symmetrical around 0 Hz so the result is real, take the inverse DFT, and normalize. The exponent B sets the tilt: B=0 leaves white noise, larger B rolls off the highs progressively (B=1, 2, 3 in the worked calls). Enforcing conjugate symmetry is the step beginners omit, which otherwise yields a complex (non-audio) result.
Examples
ShapedNoise( B, N, L, U ): X = DFT(whiteNoise); for k in 1..N/2 { power = Re^2 + Im^2; power = power / Pow(k, B); …reconstruct amplitudecos(phase), amplitudesin(phase); mirror into bin N-k conjugated }; IDFT; Normalize. Worked calls: B=0.0, 1.0, 2.0, 3.0 over 512 samples.
Assessment
Write the frequency-domain steps to turn white noise into 1/f^B noise, and explain why the procedure forces the spectrum to be conjugate-symmetrical before the inverse transform.