The most obvious way would be calculating the waveforms on a math level, but I’d be too stupid for that

1 Like

Did you have a look at the manual regarding buffers and export for Max?

Hi

Yes, first thing I did

I don’t know rnbo, but if just waveforms can you export them as lists for each sample then load (poke~ in regular max) them into the buffers from the lists?

1 Like

Quite possibly a bit beyond my intermediate capabilities but yeh that does sound feasible

Why does max (and pure data for that matter) tend to sound so harsh and brash? Is it something about the way it leads people to program sounds or is it something deeper, like embedded in the oscillator code? I know some people dislike this aspect of Max but I love it, tho I’m barely even a novice to using it, and to some extent would rather spend my time in a daw. But I find it somewhat hard to achieve that signature raw brashness in other software instruments. Slapping a redux on operator doesn’t get ya there. I feel like people will know what I’m talking about without examples, but I guess I could link to things if absolutely necessary lol.

1 Like

I don’t believe Pute Data has band limited or antialiasing-filtered oscillators out of the box.

Max has both “raw” and band limited oscillators, so it’s possible to use the harsher style.

That may be a part of what you’re hearing?

1 Like

Interesting. I know what bandlimiting means but I don’t know enough about digital oscillators/sampling to understand why that would produce that kind of raw/harsh/brash/sharp character? As an aside, I don’t really hear it in, for instance Fors’s devices. I wonder if he uses the BL osc types.

If it’s down to the oscillator design, does that mean it can’t be achieved with software synths that don’t share that osc design architecture?

I’m going to take a crack at this, I’m sure someone will be able to correct or elaborate on my summary.

To start with the example of a sawtooth wave, there’s two different fundamental functions in Max that one can use: phasor~ and saw~.

phasor~ is a “raw” oscillator, it will just creates all of the harmonics that it can. The problem with that method is that once you get up toward the nyquist frequency, the highest harmonics fold back around as lower frequencies, adding harsher, high-pitched noise to the signal. This is aliasing.

saw~ is an anti-aliased signal, which means an anti-aliasing or low-ass filter is applied at the very highest frequencies in order to get rid of that nasty stuff.

Here’s a comparison of the spectra of the two from the Max documentation:

saw~
https://docs.cycling74.com/max5/refpages/msp-ref/saw~.html

In fact, if you go to the rect~ help in Max, you can see it working as a live demo and compare the sound:

Like I mentioned before, this is a neat feature in Max that comes along in the base package. I could be wrong, but I don’t believe Pure Data has anti-aliased oscillators in the main install. People have implemented them though, and they can be installed with external libraries.

So, anti-aliased oscillators use a filter to sound less badder than a naive oscillator. (tri~ saw~ and rect~ are the anti-aliased oscillators.)

Someone smarter than myself can comment on band-limited oscillators using methods like BLEP and BLIT. Here are some fun articles!

13 Likes

This is super helpful and more straightforward than I’d imagined. For synths whose oscillator architecture you can’t tinker with, do you think it’s possible to recreate the Max harshness? Again, crudely adding some aliasing a la Redux at the end of an instrument chain doesn’t seem to do it, and I wouldn’t predict that it would. But I wonder if anyone else has tried to “Max up” their other softsynths with any success?

Taken from the Max for Live instrument modules (MRL.fm.06.Envelopes) and modified to be an Autechre-ish FM drum synth. This is a small drum, very rudimentary FM synthesis, but can create all sorts of drums and percussion sounds.

Just drag-n-drop this into your Drum Rack and modify the Amplitude, Brightness, Carrier, Harm, Index, and waveforms. You can make bass drums, snares, clicks, toms, all sorts of sounds. Adjust the length to whatever suits you.

If the colors aren’t to your liking, go ahead and modify them. I created this for my own theme, and I am not a fan of lots of colors or dark themes. If you have M4L, it’s very easy to modify it :slight_smile:

10 Likes

Well, while that certainly seems like it’s a plausible explanation for the characteristic harshness/brashness that seems so characteristic (tho not ubiquitous) of Max and PD, it was just one possible explanation offered by one person. I don’t know enough to be able to say “Oh yeah it must be that, case closed.” So i would prefer to leave the question open in case others have different ideas about what all might go into that particular tendency in Max and PD.

One way to do it:

buffer_to_list.maxpat (14.1 KB)

(currently max 1024 samples, but up the list length in zl.stream if you need more)

3 Likes

many people still do that on daily basis because 1. in older versins of max you could not include audiofiles inside an application and 2. if the waveform is based on functions, it makes the patch/file/app much, much smaller than containing audio data and 3. this way the buffer content can also be changed at runtime, by user action.

oh and 4. it is also more troublefree than loading audio from disk at init.

i mostly use it for biquad coefficients, FIR transfer functions, but also envelopes, windowing, wavetable oscillators and so on.

build it in max/msp until it works, then try to recreate the same in RNBO and see if it works as external.

eventually rely on a regular buffer object with the same name (?)

most of today commercial soft synths use highly sophisticated methods (which are normally not patched on MSP level), some other synths might use simply upsampling and filters.

in a wavetable synth for example you do not need to add that kind of stuff which is driving [saw~], because you usually do not have frequencies in it at nyquist - and because you usually know what the highest frequency in a wavetable is. in such cases you can just use different samples per octave, which never contain partials higher than sr/4 and you are safe.
well, except when you start to use those oscillator to do FM or PD with it…

if you want to have a non-non-aliasing rect wave you could use samplers such as halion.

well, or RNBO VSTs. or Pluggo. or PD VSTs…

but why would you like to have those?

5 Likes

Is there a best way then to store, say 50-100 waveforms in a max patch like this… Coll? Dict?

It would be a useful snippet for me at least!

hello all,

thought I’d share this little patch. i’m using it all the time** so maybe you’ll be interested too.

basically it’s a granular. it’s designed to play 8 instances of 1 sample with variable pitches.

proc—c.maxpat (62.6 KB)

if you want to support me you can do it via bandcamp. this patcher is available as a bonus for this track (in both .amxd*** and .maxpat)

i’ve never shared patches so your feedback is appreciated

** «prini», «oniwa» & «devia» were made using this patch
*** it’s definitely work in progress. the guts work as they should but i haven’t figured the design yet. might spend more time on it if there will be users )

20 Likes

This works for me with [coll] if you enable the “save with patcher” option on the inspector.

buffer to coll.maxpat (10.7 KB)

4 Likes

if it is about basic waveforms i´d recommend to learn how to generate them using math functions, it is the preferred method for a bunch of reasons.

otherwise [coll] is really good for smaller amounts of data.

for stereo/multichannel you can use the same index again.

everyone should have a audio2coll and coll2audio abstraction in his install.

I thought a little more about your question and instead of creating a [coll] for each waveform, one could store them as a list in a [pattr] and then have as many presets as one likes. Even more, since each preset is a single list, one could profit from the interpolation function of [pattrstorage] to have some pretty smooth waveshaping:

17 Likes

Nice idea with pattr!