making max MSP synths sound good...
Hi, I am trying to track down information, tips, resources etc to optimize Max MSP for 'good sounding' synthesis.
I have done some searching but can't seem to find what I assumed would be an obvious topic.
What I mean by 'good sounding' is that relatively immediate smoothness you get in Reaktor, or SuperCollider. (Apologies if saying those words in this forum is blasphemy!) Max seems glitchier and harsher for synthesis in comparison.
I am planning to build a basic synth tutorial for my Masters project, and for my BTEC class, to get them into synthesis and ultimately Max. (Hopefully, like a more basic, but better sounding and more user friendly of the excellent Huddersfield University's SYBIL).
Is there a 'synth tips' type, post that I can draw from and add to? If so, please can someone point it out? If not, would it be too presumptuous as a forum noob to suggest that we make one?
In the spirit of sharing ideas, please check out my first basic attempt at smoothing out audio switching, job no. 1 in my 'good sounding' Max synth job list, below.
Any constructive comments greatly appreciated.
(If anyone is interested, I'll happily breakdown the rest of my job list and continued ideas to solve).
If all you are trying to do in this patch is fade one sound source out and another one in then look at [amtrix~] which is like [selector~] but you can set a ramp time for making and breaking connections and thus avoid nasty clicks.
Let me know what the other "problems" you're trying to solve are.
lh
Tim Canfer wrote on Thu, 19 March 2009 06:05Hi, I am trying to track down information, tips, resources etc to optimize Max MSP for 'good sounding' synthesis.
My two ideas are:
1) Avoid cycle~. 512 samples is pretty small for this kind of wavetable. Try 65536 and playback using play~.
2) There's an abstraction in the CNMAT MMJ Depot* called silictor~ that has a ramp time... it does a similar thing to what you've done. Also, matrix~ has a ramp time (I'd probably use that).
mz
mzed wrote on Thu, 19 March 2009 10:41Tim Canfer wrote on Thu, 19 March 2009 06:05Hi, I am trying to track down information, tips, resources etc to optimize Max MSP for 'good sounding' synthesis.
My two ideas are:
1) Avoid cycle~. 512 samples is pretty small for this kind of wavetable. Try 65536 and playback using play~.
2) There's an abstraction in the CNMAT MMJ Depot* called silictor~ that has a ramp time... it does a similar thing to what you've done. Also, matrix~ has a ramp time (I'd probably use that).
mz
Thanks, I'll definitely try that - why not wave~ by the way?
That's exceptionally helpful, cheers!
I'll have a crack at the matrix object - I did find that with a straight fade it got quite crunchy below 100ms, curve seems to give smoother results so far, but it may be due to my patching inexperience.
Here is my list so far, which has prompted a mini project of defining specifically, in engineering terms, what is meant by 'warm' (I assume even order harmonics, esp 2nd, but need to look into that) and 'smooth', ect. Anyway, the list:
1. High frequency glitches in turning audio on and off, switching between oscillators, and fast variations of frequency and amplitude. Pretty simple this one, log fades and basic smoothing
2. Aliasing/Foldover effects. Is this possible to fix mathematically rather than with a filter? See if AES have any papers on Yamaha DX7 EAS Foldover elimination.
3. Basic synthesis has a harsh sounding basic oscillators and esp. filters compared to Reaktor or SuperCollider. Dissect Core cell modules in Reaktor, see what makes them tick.
4. Overly 'clean' 'digital' sound how to model the 'warmth' inherent in analogue synths? Free running oscillators, modelling freq variations. layering with poly...
(solving notes in italics)
That is what I have so far, I am also planning to define 'good analogue characteristics' and reverse-engineer into Max. Planning to get my hands on the college SH09, and compare / analyze. Any other info - recommended reading into that is appreciated.
Huge and abject thanks again...
Tim
Tim Canfer wrote on Thu, 19 March 2009 12:25
Thanks, I'll definitely try that - why not wave~ by the way?
That's probably better. Play around with the interpolation modes.
mz
Tim Canfer wrote on Thu, 19 March 2009 12:26
2. Aliasing/Foldover effects. Is this possible to fix mathematically rather than with a filter? See if AES have any papers on Yamaha DX7 EAS Foldover elimination.
My DX7 aliases like crazy; that's part of the fun. I think it runs at some odd sample rate (57k, maybe?), which make the aliasing hard to reproduce.
Sorry I can't help with Max anti-aliasing.
mz
the waveforms in max objects are already anti-aliased (saw~, tri~, rect~).
honestly, max isn't the best environment to build synths in. Reaktor is better suited for that. However, Max, in the larger picture, is a much better, much more versatile program.
Check out the ddg tutorial on synth building, if you haven't already.
Don't let the kids over at the NI forum read that! I'd like to disagree here. Max can get some pretty nice lush tones, as well as doing super harsh aliased goodness that I haven't heard anywhere else.
The trick is (as with most sound applications) is not to approach max with 'how can I get this to sound like Reaktor' rather than 'what can I do with this that I can't anywhere else'. Reaktor will always be better at sounding like Reaktor. Hands down, no competition there.
If you want to take advantage of max in using synthesis call on its strengths, which is largely data manipulation. Try creating synth tones that don't rely on midi on/off messages but rather a message indicating is duration in milliseconds. Now you have a synthesizer that know's how long the note is going to last (a huge advantage over midi). What can you do with that?
Think about the different kinds of sonic parameters you want to control. How would you sequence them? A straightforward way would be to write them out in a coll and use some sort of metro-counter combination for playback. Too tedious? Try and find a way to generate this data algorithmically.
Ultimately, I've found great synthesis comes from complex time varying timbral changes. If you can make an instrument that reacts differently to pitch, velocity, duration among other parameters then you are on the path to something interesting.
mzed wrote on Thu, 19 March 2009 10:41Tim Canfer wrote on Thu, 19 March 2009 06:05Hi, I am trying to track down information, tips, resources etc to optimize Max MSP for 'good sounding' synthesis.
My two ideas are:
1) Avoid cycle~. 512 samples is pretty small for this kind of wavetable. Try 65536 and playback using play~.
mzed are you suggesting that the small (512) size of the buffer in a cycle~ (or an anti-aliased tri~ or saw~ or rect~ I take it) is a limitation for producing higher quality synthesis? I am just curious because i've never considered this as a cause for weaker sounding synthesis although it does make some sense... Would a 65536 sample wavetable of a sawtooth wave sound better than a 512? Or does this really depend on the waveform?
"Would a 65536 sample wavetable of a sawtooth wave sound better than a 512? Or does this really depend on the waveform?"
That depends on the samplerate and interpolation algorithm.
ComfortableInClouds wrote on Thu, 19 March 2009 18:57the waveforms in max objects are already anti-aliased (saw~, tri~, rect~).
honestly, max isn't the best environment to build synths in. Reaktor is better suited for that. However, Max, in the larger picture, is a much better, much more versatile program.
Check out the ddg tutorial on synth building, if you haven't already.
That's really interesting, thanks!
Do you know if wave~ in anti-aliased, and how that is managed? I assume it's a filter of some kind, (arbitrary, or linked to sample rate?)
That would be useful to know for anti-aliasing modulated waves...
Yes, I know that both Reaktor and SuperCollider are better at 'traditional' synthesis, but I am curious to find out exactly why, hence this project...
That is mostly because you can't make a standalone app in reaktor and it seems far easier to make a good looking front end in Max5 rather than SC (that and I am a complete noob at SC!).
I have checked out most of the ddg tutorial, but it doesn't seem to offer any more than the Max tutorials - is it worth going through that as well as the tutorials?
Thanks again
Nick Inhofe wrote on Fri, 20 March 2009 11:15Don't let the kids over at the NI forum read that! I'd like to disagree here. Max can get some pretty nice lush tones, as well as doing super harsh aliased goodness that I haven't heard anywhere else.
//
Ultimately, I've found great synthesis comes from complex time varying timbral changes. If you can make an instrument that reacts differently to pitch, velocity, duration among other parameters then you are on the path to something interesting.
Thanks for that - I had not thought of that approach to synthesis...
At the moment though, what I am trying to do is to create 'traditional' synth tones - and it seems tricky to get anything particularly 'lush' (another word to nail down, thanks!).
It's not so much that I am trying to make Max sound like reaktor, more I am trying to define, in programming terms what are generally regarded as 'good synth' characteristics, and how to apply them in Max.
marlon brando wrote on Sat, 21 March 2009 04:41"Would a 65536 sample wavetable of a sawtooth wave sound better than a 512? Or does this really depend on the waveform?"
That depends on the samplerate and interpolation algorithm.
(sorry about the flurry of replies, should have done some last night...)
What if you were to have a wave~, using interpolation 1 (high quality) for both a single cos wave at 512 and 65536 lengths at 44.1kHz? Would that give any noticeable advantages?
Kevin Shea Adams wrote on Fri, 20 March 2009 15:29
mzed are you suggesting that the small (512) size of the buffer in a cycle~ (or an anti-aliased tri~ or saw~ or rect~ I take it) is a limitation for producing higher quality synthesis? I am just curious because i've never considered this as a cause for weaker sounding synthesis although it does make some sense... Would a 65536 sample wavetable of a sawtooth wave sound better than a 512? Or does this really depend on the waveform?
Yes, that's what I think. But I'm 1/2 superstitious and 1/2 scientific in my reasons for holding this belief. I while ago there was a thread where the sound of Max was being compared to other things. There are those who believe Reaktor or SuperCollider "Sound Better." I did some subjective tests here at the lab with a sine wave who's frequency was being swept by another sine wave, and everyone felt that the SuperCollider version sounded "smoother." Around that time, a posting by James McCartney was linked; he hypothesized that there is nothing fundamentally higher quality about SC, but that users were pointed to higher quality oscillators and filters more quickly.
Anyhow, 512 samples is a small table to synthesize a sine wave. Especially in the case of 0.2 Hz, or whatever LFO frequency I was using. There will be a lot of interpolation going on and the signal to noise ratio won't be ideal.
This is frequency dependent. A 512 sample wavetable is perfect at around 86.3 Hz (when the period is the same as the size of the wavetable). Over many useful frequencies, the quality difference is negligible. But, noise adds up, especially with a lot of oscillators or with modulation synthesis.
The CNMAT objects are using 65536 sample wavetables. Given the computing resources of the day, it seems like throwing more samples at quality couldn't hurt.
I wouldn't extend this logic to every waveform. Linear Interpolation works fine for a sawtooth... the waveform is mostly lines anyhow. Also, I believe the anti-aliased oscillators in Max are generated out of blits and the form is frequency dependant. They aren't reading out of a fixed table.
I'd be curious if other people have thoughts on this.
mz
you can be sure many people understand what you mean when
you say max sounds harsher than SC or reaktor.
of course it doesnt - but let me tell you i thought the
same - for severeal years!
the only limit max has is the 24 bits of signal precision - but thats true to SC and R4 as well. everything else can be done for the cost of CPU and brain.
(but even the 24 bits of precision can be partly extended - by using the "hr" objects by joshua, for example you can convert
50 signals to double precision using [hr.* 1.] or [hr. + 0.] and
then sum the 50 channels with a [hr.*] to archive a higher quality mix.)
cycle~? lores~?
we are not forced to use them.
we are not forced to use clip~ and overdrive~ either.
we are allowed to upsample in a poly~.
we are also allowed to dither, to bandlimit, or to build
symetric networks for phaselinear filters.
we are also allowed to buy a 7000 dollar DA interface with a
proper clock at 192 kHz but thats another story.
hey, we are even allowed to load a multiband compressor
VST plug-in (from some socalled "pro" company) inside each
voice of or polyphonic maxmsp patch. or three of them.
i had that time when i refused to visit any more live
acts which are using maxmsp, because they all sounded
the same: minimalistic and consequently repetive 16-bit
quality drumloops with distortion.
but it is absolutely legal to break with the monkey see
monkey do principle.
-110
Roman,
While you're allowed to upsample in poly~, there is no comfortable solution provided to deal with input/output filtering inside the poly~.
The ideal would to have built-in filter insides poly~ when oversampled ... please C74 ...
Salvator
Salvator wrote on Mon, 23 March 2009 14:11Roman,
While you're allowed to upsample in poly~, there is no comfortable solution provided to deal with input/output filtering inside the poly~.
The ideal would to have built-in filter insides poly~ when oversampled ... please C74 ...
Salvator
thats danmed true, at the moment linear interpolation after downsampling is all what i actually use. (i use the method which, i think, ben nevile once told me, using count~ for windowing)
yet it can make sense to have a "poly up 2" when you have something like this:
in~ in~
comb~ comb~
*~
comb
out~
so that at least between the 2 processes a higher rate is kept.
-[poly~ proposal up 110]
Yes, the lack of a good antialiasing filter for upsampled polys is really a big drawback. You may use cascade~ but the cutoff frequency is still far from the Nyquist frequency if you want to avoid most aliasing even if this object is the lowpass filter with the steepest slope. It's a poor man's solution. I appreciate how Reaktor handles this.
Roald Baudoux
Hi All,
Aliasing is especially a concern when altering the dynamic of the audio (i.e. waveshaping, compressors etc;..)
And unfortunately, cascade~ is far from being ideal.
For 44100 work, even 10 cascaded low pass (60db/octave) @nyquist are not steep enough because :
1. if corner frequency is nyquist biquad filter will alter the phase and gain bellow nyquist down to the audio range.
Higher Q don't help at all because of ringing.
2. With such cascaded filter the slope is "only" -60 for frequency of 44100 hz. This means that all the audio that WILL alias between niquist and say 30000 Hz, are not that much attenuated...
Depending on your application, (in my case distortion/softcliping) a good antialiasing requiere at least -60db not within 1 octave but within 1/8 of octave !
So fft~ or buffir~ are the only "efficient" way.
Well, did I say efficient ???
I should say "effective", because in a poly, both fft~ and buffir~ easily put your CPU onto it's knees...
I actually found my way using polyphase buffir~, or mixture of biquad + notch + buffir~ etc...
but still a LOT of hassle & more CPU that needed.
So an optimized routine built inside poly~ would be great !
If only it was easy like this "poly~ mygreatpatch up 8 @antialias masteringquality"
Salvator
>> a good antialiasing requiere at least -60db not within 1 octave but within 1/8 of octave !
the question is if antialisasing is wanted in any situation.
i mean it needs quite some CPU if you do that on a 64 voice synth or some multitapdelay-poly patcher .. my construction using cout~with biquad~ or lores~ already sucks a lot of cycles and its only my very last option when i think i really need this.
>>>So fft~ or buffir~ are the only "efficient" way.
FIR with a steep slope is the next problem in a 32-bit signal system which also should not have 1000 samples delay if it is for realtime hehe .. actually there seem to be no proper solution for a brickwall filter except fft.
but fft inside a poly is something i wont do anyway ..
depending on the musicla and technical effect one want to archieve, i think its ok to go a bit lower than nyquist.
its also ok to cascacade biquads like salvstor described; one lowpass and one notch and move tham around until it fits somehow.
of course with loosing phaseaccuracy ...
Sure, good oversampling solution depend on the application...
For polyphonic synth, I guess using lower corner frequency is fine.
BTW : Anyone seen that this message in plugconfig documentation ?
"oversampling Arguments: code number
This message is currently ignored by the runtime plug-in environment."
Such 'global' oversampling would be better that filtering each voice !
But speaking of that , I guess a main upsampled poly~ containing the "polyphonic poly~ 's" may also work the same way...
In that case, you only need 1 set of filters (input & output of the global poly~) and it would then not requiere 64 set of filters
Last, latency for good FIR and FFT are about the same. And considering it's high frequency filtering, the lengh of the filter/fft can be of only about 64 or 128 samples.
It's also possible to use FIR that are not linear phase. For example take the fingerprint of 10 cascaded biquad lowpass @22050 , and then use that in buffir~ (it's about 64 taps and no latency).
Hope this help some,
Salvator
BTW : I'm not a synth specialist, but good sounding synth may also be more about repartition of the partial/harmonics than alisasing, which is only 1 obvious part of the puzzle.
I imagine starting with good prepared waves (with proper harmonics and antialiasing and whatever) and run it thru phasor~ -> wave~ would be the most efficient and pleasing.
Salvator
Use csound~ and/or rtcmix~ inside maxMSP as sound sources.
They are hard to beat in terms of sound quality and flexibility.
On the other hand the learning curve is pretty steep, specially CSound. But it worth it if you want to achieve a professional sound and even further
JMD
>>>Such 'global' oversampling would be better that filtering each voice !
that would be a nice addition to [plug-in~] and [plugout~] indeed.
for poly~ your wishes will remain wet dreams, but
for the runtimes themselves something like "global poly upification with antialiasing" could be an option.
>>>But speaking of that , I guess a main upsampled poly~ containing the "polyphonic poly~ 's" may also work the same way...
the idea is not wrong, it is just a lot of work then
getting messages into the subpoly. i for example usually
use a very flexible, custom way of talking to voices from
outside the poly patcher.
I second the use of ~csound inside Max. Only just scratching the surface now myself, but the returns have been more than worth it.
I also use csound~, it hands down has the best quality of sound.
Learning it is definitely a well worth investment of time.
I just use reaktor as a vst in max, reaktor makes building nice synths easy, easier than msp has ever made it imho. Max is much better for all my algorithmic composition and control and
"connect x to y" needs so I let them both do what they do best. Just my two cents worth, not looking to start a flame war over Reaktor vs MSP.
Can I just say that after years of thinking that max was bad for making synths, after truly learning synthesis inside and out from playing with analogue modular systems like doepfer, as well as my nord modular g2, absynth, other virtual analogue synths and reading computer music tutorial, I know know that max can sound as good as any synth, and its not as hard as I thought (especially now that there is poly~, when I started max there was no such thing)
Its all about just knowing what objects are important to making a lush synthesis algorithm. I think the most important discoveries for me were:
you have to layer multiple biquads or other filters to get nicer sounding filters
tanh~ will make anything that would clip (sig above 1 and below -1) become more soft analogue warm.
freqshift~ is great
phaseshift~ is also great
add lots of subtle noise in the signal chain on parameters like pitch and filter freq to make the whole thing more alive
dont use comb~ (It sounds like crap to me) make your own with tapin and poly with a vector size of 1, this way you can get a much more lush comb filter with different allpass or lp/hp in the feedback chain
If you want pretty FM that doesn't alias, use saw or tri, cycle usually aliases
chebyshev polynomial wave tables or lookup tables to distort cycle~ or other sine wave, you can build up great harmonics with this
using line~ or slide~ on just about every parameter that will be taking input from sliders or whatnot.
running at 96k can make a big difference. Especially with fming cycle~
A nice easy reverb like gigaverb~ or freeverb~ etc.. will go a long way.
pong~ does some great things when you run a saw wave through it and turn it over *~ 1.0, it will fold or wrap creating harmonics somewhat akin to hard oscillator syncing
Thats my list of random handy things, Ive been getting great synths with these techniques. Hope your project turns out great!
. Good luck!
Quote:I also use csound~, it hands down has the best quality of sound.
in order to know better what everybody is talking about, it would be interesting to actually hear what that best quality sounds like.
anyone cares to upload some sound examples of "good synth sounds" made in your preferred environment (reaktor, csound, supercollider ...)?
Quote:in order to know better what everybody is talking about, it would be interesting to actually hear what that best quality sounds like.
You should download and install csound~:http://www.davixology.com/csound~.html
You'll also need to install csound itself:http://www.csounds.com/about
There are several examples in the csound~ helpfile.
It's all freeware.
Jean-Michel Darrémont
It's worth downloading these as well: http://iainmccurdy.org/csound.html
and running them in the CsoundGUI or other front end to get a feel for the capabilities. All of these can be implemented in the cound~ object.
i'm well aware of csound and what it sounds like. that's not my point.
sound quality is a very interesting topic, but often there is a lot of myth/voodoo/misunderstanding involved in the discussions.
a general statement like "this software sounds better than this" is not at all helpful, without concrete examples. in order to be able to make any useful comment about sound quality, one at least has to try to compare oranges with oranges.
so fine, now we have some csound examples. next step would be to recreate those, that you think sound excellent, in max and start comparing.
who knows, finally you might even end up "making your msp synths sound good..."
good point volker, somehow this "use reaktor instead" or "try java and C++" are a kind of offtopic here.
i am already pissed when i see jitter objects in an audio app but that is probably because i am a purist.
for anyone who is just starting with coding DSP in Max i
can only recommend to read the post from axiom crux - except
his comment about comb~ it seems perfect advise, i can only
say √, √, √, √, √ when reading it.
not only that my parenthesis are converted to childish smileys, no, they even appear at the wrong position.
I can understand that attitude - I personally wasn't claiming that "program X" is superior to "Program Y". I do know there is a lot of "voodoo" surrounding these claims. Perhaps some sonic results emerge more quickly due to how each application is structured. Beyond that I wouldn't make any claims as to why different applications seem to have a different "character".
I simply mentioned csound~ as it has yielded good results for me, and has been a pleasure to work with, so I thought to suggest it as an approach that others may or may not be interested in. Perhaps the same results could be gotten in "pure" Max/MSP. I can't be bothered to compare "scientifically", as this approach seems to be working fine for me creatively.
volker b�hm wrote on Fri, 27 March 2009 04:37Quote:I also use csound~, it hands down has the best quality of sound.
in order to know better what everybody is talking about, it would be interesting to actually hear what that best quality sounds like.
anyone cares to upload some sound examples of "good synth sounds" made in your preferred environment (reaktor, csound, supercollider ...)?
I put up two sounds at:http://mikezed.com/sound_test/swept_sine_01.aifhttp://mikezed.com/sound_test/swept_sine_02.aif
Obviously not "good" in a musical sense. I can tell the difference on very good Meyer Speakers. Can you guess which is which?
One was made in SC like:
{ SinOsc.ar(SinOsc.kr(0.2, 0, 400,800),0,0.1) }.play
One was made with the max patch below. I resaved them out of BIAS peak 6. I had to convert the Max one to 32-bits to obscure it's identity; SC defaulted to 32 bit.
mz
I won't plunge to guest (actually 2 is smoother, but I am listening through the crapy builtin DAC of my laptop so it does not mean much...), but you can save as 32bit float in max to be fair...
pa
...and another thing. To be faire to SC, your modulating SinOsc should be in Audio Rate...
pa
I second UnUnUnium in that it is not a competition between such and such system. That's not the point at all.
I suggest csound~ and rtcmix~ here because they work well for me, they are not only good technically but also musically, in terms of flexibility and for the many patches created over the years like as much inspiring paths and then, they are free.
The good point is that they give, each one with MaxMSP, different results and thus are very complementary.
Of course MaxMSP is great, don't worry it's one of my top toys, and one of its greatness is that it can join all those flavors together in real time.
Try them for some time if you want to make your own idea.
tremblap@gmail.com wrote on Fri, 27 March 2009 19:03...and another thing. To be faire to SC, your modulating SinOsc should be in Audio Rate...
pa
hehe exactly.
but otoh, we all know that if it would be exactly
the same process there would not be a difference in
sound.
it does not really matter that it is something
completely different: SinOsc.ar versus cycle~ IS a
valid example for ""SC sounds better than max".
not because there wouldnt be a wavetable osc in SC, but
there was no compiled max external in SinOsc fashion.
-110.kr
I'm not sure I understand Roman's last post but it seems correct that the code in SC should be
{ SinOsc.ar(SinOsc.ar(0.2, 0, 400,800),0,0.1) }.play
if trying to compare it to an audio-rate modulation of the carrier frequency in msp. (It's been a while since I've been in SC however, not sure if you can do this or if you need to use .kr. It would be funny if a non-audio rate modulator sounded better than MSP wouldn't it?)
One simple approach to getting "good sounding synthesis": run msp out of guitar amp and mic it. Forget trying to rebuild the world in code and just capture analog circuits, physics, air. Let your interpolation happen in the continuum... whoa now.
-Kevin
You know that you can record 32bit directly in sfrecord~ - no conversion necessary...
stefantiedje wrote on Sun, 29 March 2009 09:48You know that you can record 32bit directly in sfrecord~ - no conversion necessary...
My point was to compare basic objects and UG's at their default settings. I believe that there is no fundamental quality difference between the best sound in MSP and the best sound in SC. However, SC directs users towards better sounding programming quicker.
the reason I say that about comb is because comb has no lowpass/highpass or smoothing in it, so you cant get nice karpus-strong type physical model sounds.
reson~ and ffb~ are also nice objects.
i've recently made an album with field recordings and sine tones (512 wavetable). a friend recently told me about the size of the wavetable and said he preferred the sound of the larger wavetable
it got me thinking so i knocked up a patch with a huge wavetable vs cycle's 512.
need to do a blind test but at the moment i'd say i prefer the sound of the larger one. this could be in my head though!
what do others find?
try to make a cosine oscillator wavetable which is only 7 samples long, and you will find out if it is true.
for the cosine the effect of bigger wavetables (or to say upsampling) is not dramatically though, at least not compared to a saw wave or complex harmonic wave.
many people still prefer to use phasor~ with cos~ over cycle~, but for (many) other reasons.
the patch you posted generates a wavetable with 131072 samples but peek~s it into a buffer~ with only 1365.3 ms which equals 60209.73 samples or 45,93% of the wavetable. connect a spectroscope~ to the outlet of the masterfader and you will see the resulting extra harmonics of this less-than-half-cosinewave. i changed the buffer~ size to get the full wavetable and comparing them i have to agree that the big wavetable sounds cleaner - can also be seen in the spectroscope~
p
forgot to add the sampling rate for the patch is 96kHz
it will work fine then
edit - seems i misunderstood : /
edit2 - actually i think it works at 96kHz
edit3! - buffer size should be 1365.333374 ms, now THIS should work fine
you are right - actually i never even thought of using such a high sampling rate...
p
Salvator wrote on Tue, 24 March 2009 08:49Hi All,
Aliasing is especially a concern when altering the dynamic of the audio (i.e. waveshaping, compressors etc;..)
And unfortunately, cascade~ is far from being ideal. For 44100 work, even 10 cascaded low pass (60db/octave) @nyquist are not steep enough because :
1. if corner frequency is nyquist biquad filter will alter the phase and gain bellow nyquist down to the audio range. Higher Q don't help at all because of ringing.
2. With such cascaded filter the slope is "only" -60 for frequency of 44100 hz. This means that all the audio that WILL alias between niquist and say 30000 Hz, are not that much attenuated...
Depending on your application, (in my case distortion/softcliping) a good antialiasing requiere at least -60db not within 1 octave but within 1/8 of octave !
So fft~ or buffir~ are the only "efficient" way...
First, the corner frequency of an anti-aliasing filter should NOT be the Nyquist frequency. I believe the rule-of-thumb is to set your anti-aliasing lowpass corner at 1/3 of the sampling rate (whereas Nyquist is of course 1/2 the sampling rate).
[EDIT: This "1/3" rule may apply more to simpler analog filter design than specialized, high-order digital filters. Still, at 44k1, one-third would be around 15k, which wouldn't be so bad...)
Second, what about [cross~]? It's 18dB/octave, and easier to use than biquad~ to boot (takes frequency as an attribute, rather than coefficients).
Off the top of my head, a couple cascaded cross~ objects with corner freqs at 1/3 the (target) sampling rate should provide a perfectly reasonable anti-aliasing filter, to be placed right before the output of an upsampled poly~.
I'll try it myself later though to be sure... there's an upsampled poly~ patch I've had on the backburner a while now.
cheers,
Leigh
Hi Tim, I usually seem to get smoother results from Max than most things I have seen posted. There are audio examples and downloads of some of my Max stuff here -
https://sites.google.com/site/davebessellmusic/software-maxmsp
Some of it is quite old now and may not run correctly on current versions of Max but there are quite a few techniques on there that may help.
Look particularly at the subtractive synth Node and the physical modelling stuff which gives a much more organic sound even if you are not necessarily trying to imitate instruments.
a lot could have happened to tim during the last 3 years.
makes you wonder..
that beeing said, there's a lot to learn from this thread, although i'm not sure all of it is still relevant nowadays.