## Is it possible to fake decimation with FM?

2

Decimation, also known as sampling rate reduction is a creative effect that creates harsh aliasing, by "resampling" audio signal without an anti-alias filter. It works by performing sample-and-hold, producing strairstep-like waveforms.

I wonder if this effect can be also achieved with Frequency Modulation (or Phase Modulation)?

It would take some precise tweaking and a little bit of math, but I suppose you could effectively create a S&H process using square wave FM. But why would you want to do that? – Marc W – 2017-03-06T13:38:57.827

Mostly out of curiosity and from the will to understand FM better. – unfa – 2017-03-06T13:46:13.477

1

(This question intrigued me, so I though I'd try it out for myself and write a full explanative answer)

Phase modulation is often used as a step in the process of frequency modulation, so they are in fact, closely related.
If we look at frequency modulation and the effect it has on a signal, it is plausible to assume we can indeed, create a sample & hold process by applying certain parameters to the FM process. Just for fun, I'm going to attempt to create such a process using Reaktor, and explain the process as I go.

So the theory is, given that with FM, the frequency of a carrier signal is modulated using the amplitude of the modulator signal(i.e. deviation), We can attempt to create a square wave modulator with a peak amplitude that would, in the positive domain, cause the carrier to proceed unaltered and in the negative domain, give zero frequency, and therefore, no change in amplitude. This should resemble a S&H type process. I think. The trick is finding the correct parameter values.

Step 1: I created a S&H module in Reaktor as well as a simple FM module, using a sine wave generator(carrier) and a square wave generator(modulator). I also added an oscilloscope to visually display the output signals for comparison.
Step 2: I tested the output of the S&H module to give us an idea of the output we are attempting to recreate using FM.
(click to view full res images)

### ---The Reference Signal---

Parameters:
Sample Rate: 176,400 Hz
Sine wave freq: 200 Hz
S&H clock freq: 2,400 Hz

Carrier signal

A beautiful sine wave, as used in all tests

Sample & Hold reference waveform

We can see here the expected stepped waveform created by the S&H process; this is what the output from the FM should resemble if we are to be sure the process has worked.

Step 3: Using the FM module, it's time to test the theory, modulating the frequency of the carrier with the amplitude of the modulator. I set the modulator frequency to 2400 Hz, the same as the S&H reference clock, and adjust the deviation to attempt to hone in on the desired wave shape.

### ---The First Test---

Parameters
Carrier freq: 200 Hz
Modulator freq: 2,400 Hz
Deviation: 200 Hz

Modulator signal

Our modulator; a theoretically perfect square wave

The result

UMM... As we can see here, my theory kind of fell through... Why? Because I didn't think it through. Now I see it is obvious that at the positive peak, the waveform will carry on as normal; meaning it will form the next part of the sine wave, not a near vertical jump as I'd first assumed.

So is that it for the test? Well, no. While I thought that adjusting the modulator waveform was the key to moving forward, I couldn't work out in what way it should be changed. While fiddling around I adjusted the width of the square wave generator, which is actually a perfectly symmetrical pulse wave, and something interesting happened... The waveform began to resemble the S&H reference waveform! So with some precise adjustments....

### ---The Second Test---

Parameters
Modulator freq: 2,400 Hz
Carrier freq: 200 Hz
Deviation: 13,815 Hz
Modulator symmetrical value: 0.985

Modulator signal

The result

That's a lot better. It's clearly similar to the S&H reference signal which is great. We can remove some of the 'ringing' at some of the sharp edges with a high cutoff low pass filter:

The result (smoother)

The result (smoother with higher modulator freq)
Modulator freq: 7300 Hz

So it definitely works, the clock frequency adjusts the step size as it should. So the only thing left to do is a little refinement. I think we could refine this further with shorter pulses, higher deviation and by filtering the modulator rather than the output.

### ---The Final Test---

Parameters:
Modulator freq: 2,393 Hz
Carrier freq: 200 Hz
Deviation: 41,500 Hz
Modulator symmetrical value: 0.995

Modulator signal

The result

The result (increased modulator freq)
Modulator freq: 4,800 Hz

### So Why did this work??

Well, it's kind of hard to explain but basically it works because the sample rate cannot correctly represent the very high frequencies the pulse demands from the carrier, so instead, we get a simple, clean jump to the next part of the carrier wave, which, as we can see from the pulse waveform, is modulated to a near zero frequency wave, hence a horizontal interval. This gives us near perfect steps.
...and yes, it sounds almost identical to the S&H reference signal.

I could go on for hours about this, like utilizing the clock oscillator, but I'm going to end it here with our successful recreation because, after all, the OP's question has been answered. I appreciate it if you stuck with me and read this far. For people like me, this is interesting stuff but for others, it's probably a bit dry. I thought for clarity, I'd add one final image, which is an image of the instrument I built for this test in Reaktor.

That's the best answer I could ever imagine!

It's very interesting, because I also thought that a square waveform should do the trick alone. I'm going to experiment with implementing this in ZynAddSubFX (a fantastic opensource softsynth) - possibly altering the modulator frequency can produce some interesting sounds. – unfa – 2017-03-15T13:45:58.880

I'm glad you liked it. I enjoyed doing it. Yeah, I was going to post some pics of the crazy-looking waveforms I came across while doing this, but it was irrelevant to the question, plus the post was getting quite big, so I left it. Good luck with it anyway. – Marc W – 2017-03-15T20:03:33.240