FM Synthesis with an Imaginary Index of Modulation (Modified FM)

Theory and Practice of Modified Frequency Modulation Synthesis by Lazzarini and Timoney: core.ac.uk/download/pdf/29701...
Support this channel via a special purpose donation to the Georgia Tech Foundation (GTF210000920), earmarked for my work: • Support This Channel v...
MATLAB/Octave code:
pkg load signal
fs = 48000;
tt = 0:1/fs:10;
fc = 110;
fm = 220*sqrt(2);
oc = 2*pi*fc;
om = 2*pi*fm;
%a = linspace(0,1,floor(length(tt)/2));
%a = 21 * [a, 1, a(end:-1:1)];
a = 21 * linspace(1,0,length(tt));
%xx = cos(oc * tt + a .* cos(om * tt));
xx = exp(-a) .* cos(oc * tt) .* exp(a .* cos(om * tt));
figure(1);
specgram(xx,4096,fs);
axis([0 10 0 3000])
figure(2)
plot(tt,xx);
soundsc(xx,fs,16)
0:00 -- Introduction
0:30 -- Standard FM
2:22 -- Bessel functions
2:48 -- Euler's formula
4:12 -- Modified FM
5:08 -- Amplitude normalization
6:35 -- Waveshaping/AM interpretation
8:13 -- Harmonic examples
10:33 -- Inharmonic examples
12:50 -- Exponential envelopes

Пікірлер: 54

  • @MathHammer
    @MathHammer23 күн бұрын

    Fun! I was my Ph.D. advisor's TA for "Signal Analysis and Transform Methods" back in the mid-late 1980's. I also love Bessel functions.

  • @Calcprof
    @Calcprof23 күн бұрын

    Euler lives! e^iθ = cos(θ) + i sin(θ). The imaginary sines and cosines are just the hyperbolic functions cosh and sinh. I love Bessel functions.

  • @MathHammer

    @MathHammer

    23 күн бұрын

    Haha, me too. Cylinder functions and other "special functions of mathematical physis" have always been a joy to me. I have a well-worn copy of Watson's treatise on Bessel function.

  • @kwgm8578
    @kwgm85783 күн бұрын

    I ran into J(s), the Bessel functions. I thought I had left the planet for a few weeks, but then something clicked, and a new world was opened before me. This was a class named Advanced Engineering Math and for the first time in my engineering student career, I earned an A in a math class. I did a lot of Control theory in my Masters program. I'll look at your recommendation. That first FM bass sound was the best - a nice Moog Mini bass, but the dual FM harmonic a few tries later had promise. It sounded like a good Vth. Too many modulation cycles and it gets very brassy, too. The "alternative" never sounded good. Thank you. I dont have time to read your code now, but I hope to next year, after I get taxes filed and get my life ready for some intense spine surgery and rehab afterwards. Again, I enjoyed this.

  • @moselle409
    @moselle40923 күн бұрын

    Another fascinating video. I added "spectrogram" to my TODO list.

  • @ravelite
    @ravelite23 күн бұрын

    Thank you, Prof. Lanterman. This series on FM variants is amazing!

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Thank you for your kind words!

  • @Elizabeth-vh6il
    @Elizabeth-vh6il23 күн бұрын

    Nice! Thanks for the introduction. It would be really interesting to hear this applied in context with the kind of instrument patches that you're more likely to use in a real song, to get a comparison of what's possible in modified FM vs regular FM.

  • @fnytnqsladcgqlefzcqxlzlcgj9220

    @fnytnqsladcgqlefzcqxlzlcgj9220

    23 күн бұрын

    Yeah was hoping for something applied rather than just theory with a sample of the nature of the function

  • @DrSynth
    @DrSynth23 күн бұрын

    Fun stuff Aaron. Definitely curious what the sonic differences would be with the modified FM in multiple Modulator configurations. Setting various Modulator indices and ratios to leverage the standard Bessel function behaviors is one of the subtle arts of (standard) FM.

  • @possible-realities
    @possible-realities15 күн бұрын

    Nice video! So it seems that the end result is basically that you are multiplying a (co)sine wave with f(t) = exp(-a) * exp(a*cos(om*t)) = exp(a*(cos(om*t)-1)). When a is no too small, what you get is basically a periodically repeated gaussian, or a spike train convoluted by a gaussian. (Only the part close to the peak matters, and there the (co)sine wave looks like a quadratic function). In the frequency domain, that's a gaussian spectrum multiplied by a spike train (so that only the harmonics remain). Multiplying by a sine wave shifts the spectrum up and down, basically moving the peak of the gaussian in the spectrum (and creating some interference between the copy that moved up and down). This kind of approximation to a gaussian pulse train definitely has its uses in sound synthesis. A nice thing is that gaussians are solutions to the diffusion equation. You can imagine a string that is initiatially plucked with a spike. The spike bounces back and forth, while the damping coould be described by a diffusion equation (pretty much what Karplus-Strong does if I remember correctly, but numerically, and with different initial conditions). If you change a so that the variance of the gaussian (e g measured as the inverse of the second derivative at the peak) increases linearly over time, you should get some kind of natural damping.

  • @vikenemesh
    @vikenemesh23 күн бұрын

    The modified FM Timbre is really much smoother to control, Thank you for introducing us! But it is also kind of lacking in the harmonics - from a musical point of view at least - is there a way to remove the "bessel-swirl" that does not remove as much spectral content?

  • @boptillyouflop

    @boptillyouflop

    23 күн бұрын

    FM synthesis feedback loops is the classic way to get less swirly and more consistent harmonics. Another alternative is that you can use phase distortion synthesis on the modulator.

  • @vikenemesh

    @vikenemesh

    23 күн бұрын

    @@boptillyouflop I will be looking into those, thank you!

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    I think if you want more harmonics in the modified version you can just crank up the index. With a bit of work one would probably make a rule of thumb for mapping indices from one technique to the other.

  • @morgan0
    @morgan023 күн бұрын

    something else this reminded me of, phase shifting sines thru min(max(a, b), -min(a, b)), a continuous xor, has a bit of a fm sound imo, but different. in surge, i implemented it and 8 others part of a generalized system of describing limited gradient two input scale invariant functions, extending what i listed and min, max, etc. the one i listed is the lowest order unless you consider f(x, y)=0 to be valid, four that are one order higher, and another four that are the next higher order, except it is missing simpler stuff like min(x, 0), x, and anything that could be achieved by swapping and/or negating inputs isn’t there. however surge doesn’t have phase shift on oscillators which i think is dumb but slightly detuning two sines will at least sweep thru phases. i think i had made something modulating the phase of sines thru the simplest 5 modes (i only implemented the following 4 in surge) and used it to be the synth parts for a sega genesis midi. later i can try to find the relevant formulas tho i will double check with what’s in surge, after i find where it is in the surge code nowadays. i haven’t done anything with it in a while but i came up with a system for categorizing and describing two input functions, how to do so for three inputs broke my brain when i tried lol.

  • @morgan0

    @morgan0

    23 күн бұрын

    ah if you use two external instrument oscillators in surge, those could be left and right coming from another synth that does have modulatable phase

  • @morgan0

    @morgan0

    23 күн бұрын

    oh and i should probably say how to get to it in surge. right click on the ring mod sliders in the voice mixer

  • @zmix
    @zmix23 күн бұрын

    Excellent exploration Aaron.. I think that these 'semi - 'failed' experiments are so interesting. I have so many tweaks I'd like to try in order to understand more, like why the index shifts so much between the two methods. I've got a request: I have always been fascinated by the dynamic tonal difference between Yamaha's implementation of FM and NED's implementation, especially the sorts of things that happen when the modulation index changes slowly as in the NED factory Timbre "Dr Floyd" as heard in the soundtrack to the 2001 a space odyssey sequel "2010", so maybe you could have a look / listen? The Synergy on the other hand sounds nearly identical to the Yamaha method, might be worth a 'comparo' video? Thanks again.

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    The thing I don’t know is how numbers in a Synclavier map to actual indices of modulation, whereas the Yamaha DX mappings are very well documented. The DX mapping is exponential, which is kind of built into how it uses log and anthology tables to turn multiplication into addition, whereas the Synclavier uses actual digital multipliers.

  • @zmix

    @zmix

    23 күн бұрын

    @@Lantertronics Like Synergia the Arturia Synclavier is running Cameron Jones' actual code, so it's a valid example to play with.

  • @cheater00
    @cheater0023 күн бұрын

    hey Aaron, I think you really missed an opportunity there. at 4:20 (nice) where you replaced a with -ja, rather than make it a constant (a or -ja), make it a point that constantly rotates on the circle of radius a around the origin. It will start out at a+0j, then continue counter clockwise to ja, -a, and -ja. If you do that, I think you could get some interesting results if the frequency of how quickly that number goes around the circle is really slow, like 0.2 hz or something. so again, in that formula at 4:20, instead of having -ja, you would have a * j^(2*pi*fj) where fj is a new parameter like fc or fm. would you mind terribly trying it out and recording what you get? you're basically morphing between standard and "modified" FM synthesis.

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    I actually did that! The problem I ran into is that while regular FM is constant envelope the envelope of modified FM changes drastically with the index. I couldn’t figure out a way to consistent handle the amplitude compensation, and without any such thing, morphing between original and modified as you described just sounded like slow amplitude modulation. Definitely worthy of further thought.

  • @cheater00

    @cheater00

    23 күн бұрын

    @@Lantertronics I don't think you need to do that envelope fixing thing at all. But anyways, your examples seem to be rendered offline, so maybe just do a curve fit on the loudness contour.

  • @franksheeran9243
    @franksheeran924323 күн бұрын

    I think in all these graphs I'm hearing changes above 3000 that aren't visible on the graph. The spectrogram suggests the sound mostly isn't changing, but ears say otherwise. At my age I trust my eyes more than my ears, usually, though...

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Oh there definitely is stuff up there; I somewhat arbitrarily set the top of the plot at 3000. If I was doing a less off-the-cuff video I would have customized it for each plot.

  • @G8tr1522
    @G8tr152223 күн бұрын

    man this is cool

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Thanks!

  • @Don-ev5ov
    @Don-ev5ov23 күн бұрын

    To oversimplify, the normalized modified Bessel In are less bumpy than the Jn? Also, the In result from using an imaginary argument in the Bessel equation? Just my understanding at the moment -not really asking. Well explained.

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    You are right on all counts.

  • @815TypeSirius
    @815TypeSirius23 күн бұрын

    Now rotate them in real time.

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    You mean, like, make the index of modulation rotate on a circle in the complex plane?

  • @815TypeSirius

    @815TypeSirius

    23 күн бұрын

    @@Lantertronics did my comment get deleted? I linked to the video. kzread.info/dash/bejne/pq6Eqqmbj93PY6Q.htmlsi=6h8edr3sG_FQVpop

  • @eliasknaapinen

    @eliasknaapinen

    23 күн бұрын

    ​@@Lantertronics He's probably referring to the guy who uploaded a bunch of "spectral rotation" trickshot techniques a short while ago. In a nutshell: manipulate an audio signal in such a way, that its image on the spectogram appears rotated. You'll likely find it on a quick search of audio spectral rotation.

  • @zaphhood4745
    @zaphhood474523 күн бұрын

    Basicly all the music from Eye of the Beholder.

  • @juno6
    @juno623 күн бұрын

    Very interesting experiments. How about feedback? How does it sound in this scheme?

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Good question! That would be trickier to implement, I’d need to write a loop processing a sample at a time instead of writing it all vectorized like I did.

  • @vrixphillips
    @vrixphillips22 күн бұрын

    HELL YEAH! GO TECH :D

  • @Lantertronics

    @Lantertronics

    22 күн бұрын

    Thanks!

  • @h0verman
    @h0verman21 күн бұрын

    it's interesting how with the modified FM and the lack of oscillating bands you can much more clearly hear what i presume is your editing software compensating for the decreasing amplitude in discrete stages

  • @Lantertronics

    @Lantertronics

    21 күн бұрын

    Not sure what’s going on really, but Camtasia adjusts from clip to clip. It doesn’t do any compressor type adjustments within each clip (without me running a compressor effect in Camtasia; which I’m not).

  • @mak533
    @mak53322 күн бұрын

    Aaron -- is there a quick record function in Octave/MATLAB to capture synthesized sounds? File type specification / setting paths, etc.

  • @Lantertronics

    @Lantertronics

    22 күн бұрын

    You want to use the audiowrite function.

  • @mavisbavingson2299
    @mavisbavingson229923 күн бұрын

    can someone explain why digital FM implementations use phase modulation ?

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Check out this reddit post: www.reddit.com/r/synthesizers/comments/4xnzbs/how_fm_is_actually_pm/?rdt=56978

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Look for the long comment on that post by x2mirko.

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    The main problem that comes in with a straightforward implementation of raw FM is that if one of the modulators is spitting out a DC offset (which you can get from a chain of modulators), then the carrier its driving will seem out of tune, whereas with phase modulation, that DC offset won't be heard as a problem.

  • @seisette
    @seisette23 күн бұрын

    I was thinking, a series on the Electro-Smith Daisy Seed would be phenomenal. It's a great tool for DSP.

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    I have a student experimenting with the Daisy Seed: kzread.info/dash/bejne/nH-OydxxZLeal9o.html

  • @raph151515
    @raph15151523 күн бұрын

    at 11:35, weird I feel an old "prince of persia" video game vibe

  • @Lantertronics

    @Lantertronics

    23 күн бұрын

    Interesting!

  • @atomictraveller
    @atomictraveller22 күн бұрын

    i'm too important to think here much but it sounds like there may be an implicit unfitness for inharmonic ratios, sounds like cancellation is just faster/all over the place. thanls for reminding folks you can just put stuff in an audio loop and try it and get all kinds of insight into dsp. rofl dude is asking you to try stuff next "30 years later"

  • @artpinsof5836
    @artpinsof583622 күн бұрын

    🤯🤯🤯

  • @Lantertronics

    @Lantertronics

    22 күн бұрын

    Thanks! :)