Question about feedback FM
Hi all,
I've been exploring FM synthesis in MAX for a few months, but i'm still failing to understand how feedback FM is supposed to work.
I've been reading quite a bit of litterature about it (especially this cool article here: https://ccrma.stanford.edu/software/snd/snd/fm.html) and i assumed that when increasing the mod index on a feedback operator, i would obtain something approaching a sawtooth wave, as long as the index stayed below 1.0, with the result becoming increasingly noisy for indexes above 1.0.
When implementing this in MAX, wether i try some classical MSP FM technique or some phase modulation algo with GEN, i always seem to get the same result: i do get something approaching a sawtooth for indexes < 0.16-0.17, but then as it approaches the 0.20 mark, i get more and more artifacts in the waveform and it quickly turns into some super distorted noisy square. At 1.0 of course it's just pure noise.
I've been looking through some past forum discussions, but haven't found anything on this particuliar issue. Maybe this is just me not understanding how this is supposed to work, or some parameter setting in MAX that i have forgotten / done wrong ? Anyway, it keeps puzzling me and i would really like to know what's going on there.
Thanks by advance for your help
Best regards
Lionel
Hi Lionel,
Have you gone through this tutorial?
https://docs.cycling74.com/max7/tutorials/06_synthesischapter05
I am no expert in FM, so you might know more than me about this, but you do understand that you easily can generate a lot of harmonically unrelated frequencies with FM synthesis?
Especially if you modulate a complex waveform such as a sawtooth with another sawtooth.
Then you get FM between all the individual harmonics and the result can be very noisy.
My tip is to try and make it work with pure sinewaves before you try anything else.
Good luck!
Hi
Thanks for the answer.
yes I have gone through some max tutorials and quite a bit of litterature, and as long as i keep the algos simple and straight, everything works fine.
It s the feedback part that seems not to behave according to theory. Btw: im only using basic cycle operators, no complex waveforms.
I do expect noisy results with high ratios, i was just wondering why it gets so noisy for low values < 0.2.
ill post an example patcher a bit later when i have access to my desktop pc, just to check if im the only one experiencing this.
Thanks again
Lionel
(you might be interested to learn than John Chowning himself provided a full explanation of harmonicity/index in this very forum:
https://cycling74.com/forums/carrier-and-harmonicity-in-fm-synthesis
no explicit reference to feedback FM though)
Oh, interesting stuff, thanks; didn't know he was posting in this forum.
I've just posted a little test patcher below, using gen~ to be as accurate as possible.
As i increase the feedback mod index, just as expected i first get some sort of rounded sawtooth wave, then just below 0.2 lots of artifacts and spikes appear in the waveform. By 0.5 all that remains is a super glitchy noisy square wave, which is fine for some applications, but from what little theory i know, it's a bit unexpected.
Do you get the same results, or is smthg wrong with my patching, or maybe some parameters in MAX ?
Thanks by advance
Damn, MAX crashes almost every time i try to open this patch... maybe a version problem ? i'm currently using 7.2.1 32 bit version.
I'va managed to run it a few times though and it looks ace for what i'm working on.
Should i try upgrading to a newer version or has it maybe to do with my dsp settings ?
Sorry if i'm taking up your time, it seems i've still got a lot of things to learn... but this looks really cool.
Thanks
Lionel
just a thought; by "feedback FM" do you explicitly mean a modulator whose frequency is modulated by ITS OWN output, or a modulator whose frequency is modulated by the output of ANOTHER (separate) modulator?
B
Yeah good point.
In fact the aim was to be able to do a bit of both simultaneously (dont know if that makes sense but i was curious about the results) ; but so far ive really only struggled with 1 operator doing self-modulation.
And Vichug s patch seems to be the solution to what i was clumsily trying to do with gen.
Lionel
Is it really unexpected that a feedback oscillator doesn't lead to noise? I was thinking of the classic intractibility of the three body pendulum; which if you imagine it swinging at audible rates, would be pretty unpredictably irregular. And one way of looking at noise is that it is a signal whose variations in frequency have no regularity. Maybe I'm wrong though...
It's true, the sampling rate is going to have a strong effect on the result, as the feedback could quite easily produce frequencies above nyquist. I just don't think that this alone is the cause of the noisiness at high modulation indices.
(what I meant by my question above is that 'series' modulation (op 3 into op 2) is subjectively more predictable than an 'incestuous' modulator (op 2 into op 2));
this thread has exhausted itself to the point where a thorough examination of Bessel functions is critical. I think. And Prof Chowning is unlikely to have time to enlighten us groundlings, as his own index asymptotically (we wish) approaches 90.
B
pps
I have, and regularly use, a DX synth: the only use I have for self-modulating modulators is as a source of noise. Yes, the algorithms are hard-wired, and in Max we have the luxury of 'over-thinking' an FM algorithm. But the model persists; a self-modulating modulator will tend towards noise, for a given sampling frequency, as Graham states. What's the first thing any DSP FM synth designer does? Low-pass filter the output!!
2c
@ Graham
You re right, it definitely has to go noisy for high indexes. But vichug s patch leads to a very different result from mine, and a better one i think.
Without upsampling i end up in nyquist territory very very soon.
Though i suppose this technique doesn t come without computational expense, ill have to check if my old pc is up to the task when i get it to work.
@ Brendan
I don t own any hardware so i don t know how yamaha synths behave.
But i ve seen some soft synth patches like fm8 making heavy use of feedback without going into glitch hell so i think it is possible.
Wether they use upsampling or some lp filtering in the feedback path (or even both) is beyond my knowledge.
I ve read discussions about it elsewhere on the net and people seemed to be just as puzzled as me as to how it all works.
(in a DX FM synth, modulators and carriers are hard-wired together in several different algorithms; we cannot stipulate WHICH modulator feeds back to itself, but we can control envelope, bias etc - great for chaos in bells and breath in winds.)
Hi
once again, I don't have Max here with me; going back to your original post, something else occurs to me: how are you 'measuring' or controlling the depth of feedback. As you know, the term 'index' refers explicitly to a scaling value derived from the modulator's own centre frequency, that is to say that mod amplitude = (carrier*ratio)*(mod freq*index); if you modulate mod freq by it's own output, and derive the feedback amplitude FROM mod freq, then **that scaling factor will be modulating at intra-audio rates**. At this point my maths chops break down, and it's also a shame I don't have access to Max atm; but I will on Saturday when I'm in SARC marking assignments, so maybe later I can clarify my ramblings ;)
Brendan
unfortunately, the ccrma site has been down for a while (maintenance?), so I can't view the algorithm you cite above; have you downloaded a pdf perhaps?
hey, the patch has crashed on me once too :s i'm not too sure why, maybe the vec argument to poly~ is behaving weird.
However regarding noisiness and self modulating oscillator : i had read about the maths involved, i don't remember if it was an article by Chowning or the book "Multimedia Programming Using Max/MSP and TouchDesigner' by Patrick Lechner, might be an example taken straight form this book ; but i do remember that it was, like, mathematical....... just related with classic phase modulation, as phase modulation is related to frequency modulation. here a version with control on the dealy time, i don't remember if it actually had a sound interest ;)
@ Brendan
i was refering to that: https://ccrma.stanford.edu/software/snd/snd/fm.html
@ vichug
I've given it another try, it just keeps crashing. If i don't use the upsampling it works, so it really has to do with this.
Could you explain what you mean by "vec argument to poly": you mean that the float and integer inputs we are using don't work fast enough because of vector size ?
' Could you explain what you mean by "vec argument to poly" '
eh, no, just mistake on my part, i just meant the 'up' argument to poly~. yes, i'm not caring about vector size here. Though - maybe the vector size is part of the problem ? i guess when you upsample by 128 you need have a rather small vector size, possibly, in order to not overflow the audio buffer ?
Did you succed opening the patch at all ? are you using max 7.3.3 ? (i'm at 7.3.1) also, for the first version i posted, the default upsample value is actually 128 which is really a lot ; the second one is upsampling 4 times which seems more reasonable.
Hi
I use version 7.2.1. But I ve rebuilt it from scratch with one of my patchers and it still crashes when i put on the upsampling. Even a value of 4 instead of 128 causes a crash almost every time.
I ve tried to reduce vector size and put on the overdrive, with no better result.
Could this be due to cpu overload (my pc config isnt exactly state if the art anymore...) ?
Upsampling can be stressful for the computer really fast, but you should be able to use a factor of 4 without problem in theory. I wonder if there was a bug fixed in max update susbsequent to 7.2.1, i don't know, maybe try a more recent max update ?
Thanks, ill try an update tomorrow and ill tell you if it works.
Hi
So ive been trying it again after updating MAX and my audio drivers.
It keeps crashing... but:
-Ive noticed its a lot more stable if i put in the frequency in the numberbox before turning dac on.
-Getting back to edit mode to add a new object while dac is on causes an instant crash (!)
-Lower upsampling values work are more stable, though i do get some occasional crashes.
Besides you were right as to the cpu: for upsampling values of 4 / 8, the cpu monitor keeps under 10 %.
At 128 it takes 35 % but definitely not the problem.
Still wonder if this has to do with some obscure setting ive got wrong or if its inherent to the poly object...
Lionel
Can confirm that vichugs patch has crashed pretty easily on my machine, too.
Shame though, it sounds pretty rad when playing around with it.
Thanks for the answer; was about to say im glad im not the only one struggling with it but then it doesnt solve the problem :-)
I cant see anyhing wrong in the patching and when i rebuild it from my own patches, i get the same behavior; but then im no expert at all when it comes to poly and upsampling.
Could it be an unsolved bug that we arent aware of ?
"Could it be an unsolved bug that we arent aware of ?"
maybe a bug report would be of use then ?.. i don't know, on my machine sometimes it doesn't crash !
@vichug
tbh i wouldn't mind filling in a bug report but as total noob to these aspects, i wouldn't feel very legit.
I'd rather like to see a few experienced MAX users validate it first.
well anyone is legit to file a bug report :p and as Wetterberg confirms, and as i've seen this behaviour also, it makes 3 persons, so it's logic to assume something is really going on here. If you prefer i can do it but i'd be grateful if you take care of this :s
OK so after spending a few more hours on it today and briefly reading from this:
http://www.google.com/patents/US4249447?dq=4249447&ei=7vK4T_m5LKOH6QHH2pTsCg
i think i've finally got it.
It has to do with phase and the way you design your math expr in gen~ that reads from the phasor.
In fact it's all just a stupid scaling problem, and i wasn't careful about it: the people who write about feedback coefs of 1.0 use sample accurate phase distortion techniques (that much was clear) and they have their phasor outputs scaled to radians, that's [0 ; 1] --> [-PI ; PI] or something like it.
If you keep your native output of [0 ; 1], it's pretty logical that you get more feedback for lower coefs.
The shape of the wave incl. artifacts doesn't change.
It's all about the scaling.
So all in all: sorry for all these useless math ramblings, though in the end, it certainly helped me along the way :-)
I keep a strong interest in the upsampling technique as a way of smoothing out the waves a bit more, so if anyone has an explanation for the "bug", i'm really interested to read it.
Thanks again
Lionel
@ vichug
no pb i'll do it :-)
thanks