# How to have all frequencies from 0 to 15kHz?

I would like to smoothly transition from the full harmonic series of 0.01Hz to the full harmonic series of 65Hz using Max/MSP. I would like all frequencies within the range of 0Hz – 15,000Hz.

However, for a fundamental frequency of 0.01Hz, this would require 1,500,000 separate frequencies. Using the Max/MSP synthesis technique I know now, this would mean using 1,500,000 cycle~ objects or filtering noise with 30,000 fffb~ objects (each fffb~ would be set at the maximum of 50 bandpass filters).

I’m not about to copy and paste that many objects, and I’m sure that my Mac wouldn’t be able to handle it anyhow. This is pretty frustraing, given the simplicity of the concept. Any of y’all know of a more efficient way to accomplish this? The real issue seems to be the amount of data, but a million pieces of data can be handled much more efficiently than a million streams of signals. Halp!

I might try SuperCollider, but that’s still a big ask.

Additive synthesis is going to bring even today’s fastest computers to their knees with ~1million sinusoids implementing additive synthesis. Ditto for your subtractive approach.

Why not calculate the waveform outside of time (aka "non-real time")? A nifty expression powered by Uzi, a poke~, and a waveform~, and you’re good to go. A really sharp low-pass filter will be needed to brickwall the frequencies about 15 kHz as you slide the waveform’s fundamental frequency the 16 octaves you require. You may want to check out the Forbidden Planet example for a possibly useful way to do that.

Another approach, if you have friendly amplitude coefficients, might be waveshaping. I assume you’re familiar with Bernoulli functions.

Still another: do the calculations in your favorite spreadsheet app, then copy and paste into something MSP-friendly. SoundHack might be helpful here.

There is the question, though, of how much of all this you’re going to hear. Most built-in loudspeakers aren’t exactly studly below 100 Hz. I assume you’re using top-of-the-range high-end sub-woofers.

i dont get the 0,01 Hz part. unless you are doing AM or FM with the partials, noone will hear them.

Thank you everybody for your input. I am going to try these techniques. I will post results when I have them.

i’m pretty sure the full harmonic series for 0.01 Hz is undistinguishable from white noise by the human ear

This uses a closed form of generating an arbitrary number of harmonics of equal phase and magnitude– I think it’s the same algorithm used in the blip ugen in supercollider (or buzz in csound).

You’ll find that subsonic base frequencies are not very interesting– you may need to smear the phases to get a more ‘interesting’ results. Watch out for aliasing.

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----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d3YO7BcPw
YWfaX+hPrJkN3oQOwKZANgbvI3wnw0iuPkymnfoYGQZHRhqBDUhqlTUkGza+
L4tYU6d9BxniJKdDzzgje2CzPjnolHk0WNORilNbz7XVKiqytwwyukJKlgvj
DCgdyl.G0rIUE7.AeKTSjY5VWhqlhnw665xM8Q+K3BBgt.aJyhPuun88yaww
3voLjccAm53qXOkKPkyZ0l6KvUS80vtdUo95DYvP1nxCF5U+KJjsmn7WBpV1
Vd9nfM9Oiv6PfaEz1txZ4omcTkDYf+nJ8XYQAs9XiqhxVg8lDpHsSYFKOXCj
Gh0DGwY49lhiH8g1RdhLQdBrl7Xj3HlRgyHNaJKZX8dXaGO6P4+eA.CxeTmd
n7oCczMa.7JUa8i.6M+Jho5MEmD2Rb.haIOX64rxH7.VSdBLjNfy3aH1ZrI1
PCK6vFvjoJvdzAhM0QtkVmKzD4gXs4KrQaSJ0Z7IwD7Xu0IvlHORcdKYdYxz
E1dSWupqNi4tk3ioSWVBOlHNVSZLw0CwdhiIpxQNkzXOEGv3kIrjhrQZxgNF
ePtk7.VbcKiWV+R7KqRNSVSySTd6PaJEE+MYeVcn5xy7WjyP0ixrA4yoOUNV
e4o36mwyerril2skqRO0tjH+4h94Gy+O.J8Xqx.
-----------end_max5_patcher-----------
```

i’m pretty sure the full harmonic series for 0.01 Hz is undistinguishable from white noise by the human ear

White noise is uncorrelated. Any harmonic series is correlated. The ear hears the difference.

The only way you’d get a kind of noise with a harmonic series is by constantly changing the amplitude of each partial in a random manner. In theory this should be a way of modelling a cymbal. I had a go at implementing this latter idea several years ago, but I ran into the limits of CPU performance long before I got any kinds of interesting sounds. I think CPU limits will still hinder a real-time solution, but I’d be delighted to be proven wrong.

Here’s a tone consisting of 200 harmonically related sinusoids of equal amplitude sweeping from 2Hz to 20,000 Hz over the course of 30 seconds (or whatever rate you specify) and adjusting the number of partials to avoid aliasing. Modify to taste.

**all**of the following text. Then, in Max, select

*New From Clipboard*.

```
----------begin_max5_patcher----------
1008.3oc2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