Using sample as carrier/modulator in FM Synthesis

Massimo Palermo's icon

Hello!
I would like to use a generic wave signal as carrier or/and modulator in FM synthesis.
Any ideas about how to do it?
max

rjungemann's icon

Not only is it fairly straightforward to do, it is a wonderful way to make some pretty outlandish sounds! Especially effective in Maxforlive. Attached is an example.

The secret is to replace your cycle~ with a phasor~ and a wave~ in series.

I recommend the AKWF wavetables from http://www.adventurekid.se/AKRT

Have fun! Let us know if you come up with something cool!

One last thing, if you're not in edit mode you can drag and drop waveforms onto the live.drop (Maxforlive is not necessary). You can overlap the waveform~ object (which visually displays the waveform) with the live.drop to create a sorta visual version of live.drop.

4527.FMWavetable.maxpat
Max Patch
rjungemann's icon

Oops, here's an updated version with the presentation mode made to look more... presentable.

I am trying to build a series of tutorials that start with basic FM theory, then go into subtractive synthesis, more advanced FM, then finally a fully-fledged 4-operator FM synth, I'll post it in the forums when I finish it....

Other fun things to try:

Use a pictslider to create a 4-point waveform interpolator (just crossfade—wavetables have the advantage that morphing is LITERALLY just crossfading because the phases always line up)

Try a a tapin~ and tapout~ to create FM feedback. You can make some truly horrible growling.

Try PM instead of or in addition to FM, it can make some pretty good robotic sounds.

Stack modulators

Use poly~ for upsampling, it will allow you to modulate further before things dissolve into noise (but sometimes that's what you want)

Construct your own single-cycle waveforms

Modulate the index with LFOs, ADSRs, or LFOs modulated by an envelope (to create LFOs whose speed changes over the course of the envelope)

4528.FMWavetable.maxpat
Max Patch
Roman Thilenius's icon

as rjungemann says, this is what [cycle~] and [wave~] are for.

i would recommend to use cycle~in a certain way; instead of letting it run freely, you
can make it run with signal input in order to be able to modulate it sample exact.
connect one phasor~object to the second inlet of the cyle~, and then use the phasor~
object to control the frequency.

[phasor~]

(second inlet)
[cycle~ mysample]

this way you can also insert something between the two later so that
you can add phase distortion, vibrato, or have the wave playing backwards.

controlling the frequency by signal is generally important 1.) when you
need to modulate the frequency (for example in a synth with glide/portamento
mode or for a pitch wheel input) and 2.) when you want to have 2 [cycle~]s
running in sync with each other.

-110

brendan mccloskey's icon

re "truly horrible growling"

you may be aware of the so-called Quantized Modulator brand of FM, described here:

and implemented in this simple demo patch of mine below.

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan

ps.
regular viewers will agree that every six months or so, I find some excuse to post this patch....

MIB's icon

@n00b: I thought that patch sounded familiar ;) still fun though!!

brendan mccloskey's icon

I'm a one-trick-pony MIB : P

It is fun, but too chaotic in a conventional FM algorithm.

Peter McCulloch's icon

It's way easier to use the signal as the modulator, since you're just multiplying it by some large value and using it as an offset on the carrier's frequency. (i.e. you don't really have to modulate it, just an oscillator, which is easy)

An alternative is to use an envelope follower on an audio signal and have that change the modulation index based on volume.

rjungemann's icon

I love this thread, learning some tips myself!

To piggyback on what Peter was mentioning, here is a PureData tutorial for creating an FM patch that uses a guitar signal. It is trivial to migrate over to Max (although you need to grab the Max version of sigmund~ here http://crca.ucsd.edu/~tapel/software.html). I did just post this in another thread but the part that makes it interesting is the amplitude of the guitar signal changes the index of the FM synth, a little like what Peter was describing with envelope following.

Massimo Palermo's icon

Hi guys,
thank you for your suggestion!!!

Rjungemann, your patch was a start for mine!
My idea was to "mix" audio files, no wavetables or similar. In last attempt I used a drum loop and a sample from Anton Webern. Cool sound!!
I think the patch works fine to generate noisy-sound and sound effects.
Now, I would like to test some of the other idea I have read in this thread.
Please let me know any comment about the patch.

Rjungemann, I have changed an operation in your patch. You multiply Carrier (C) by ratio(R), but ratio formula is C/M, then M=C/R
I think that's correct
m.

4554.test5.maxpat
Max Patch
rjungemann's icon

Very cool! Thanks for posting your version of the patch, Massimo!

I have a feeling the algorithm I implemented may be an accidental variant of phase modulation as opposed to true FM. Thanks for the correction, I'm definitely going to explore your updated version!

Edit: Also, forgot to mention, thanks n00b_meister for posting your quantized FM patch, I am fascinated by some of the sounds it produces. It definitely warrants a more in depth look.

brendan mccloskey's icon

I posted the QM patch as an example of how you can tinker with the bog-standard FM algorithm. Admittedly it is something of a one-trick-pony, but should inspire you to experiment with routing, feedback and quantization options in your own synth.

Keep us posted on developments

B

brendan mccloskey's icon

So here's a simple and unsophisticated experiment: a carrier (C2) modulated by a Q-modulated (M1) carrier (C1). C2 is then finally modulated by a soundfile.
There's a loadbang inside the subpatch.

Just a waste of an afternoon really :)

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan