Forums > MaxMSP

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

April 2, 2014 | 7:59 am

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!

April 2, 2014 | 8:43 am

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

April 2, 2014 | 9:50 am

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.

April 2, 2014 | 1:57 pm

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

April 2, 2014 | 4:38 pm

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

April 2, 2014 | 6:16 pm

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

April 3, 2014 | 3:32 am

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.

– Pasted Max Patch, click to expand. –

April 5, 2014 | 9:28 am

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.

April 5, 2014 | 3:11 pm

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.

– Pasted Max Patch, click to expand. –

Viewing 9 posts - 1 through 9 (of 9 total)