The frequency cap (and bug?)

Official support for: mutools.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hey, I'm using this post as a reflexion on how mulab's internal oscillators handle very high frequencies compared to others and discuss a potential bug

I've observed that there's 3 approaches different synthetizers use when dealing with notes that would play beyond nyquist frequency (4 if you count being designed in a way that such frequencies are never reached)
- Killing notes: notes beyond nyquist frequency are never played
- Plateau: notes plateau at nyquist frequency even if they should correspond to higher pitches
- Laissez-faire: Notes are allowed beyond with the resulting wave folding
Mulab uses the plateau approach, so notes are capped at 22.05 kHz

Interestingly enough, this can be circumvented in mulab with harmonics (only the fundamental of an osc is capped) so using a waveform that's just the x64 harmonic allows for a fair amount of wiggle room in wave folding territory (*see last paragraph)


I personally feel that the plateau approach is a bit akward for several reasons:
Killing notes is the safest options because it doesn't deal with wavefolding and notes played above just don't exist. Laissez-faire is more fun because you can play with wavefolding and no two notes sound the same, this leaves more room for experimenting with sound design
Plateauing ends up having all notes produce the same result when it reaches the cap. I suppose it just feels less intuitive (or physical?)

While this is fine for a single oscillator (these frequencies are practically inaudible after all), it becomes akward when using a high frequency oscillator to do AM/FM for another oscillator, because you get two regime changes from the produced harmonics:
- one when the harmonics cross nyquist which leads to unpredictable (fun) behavior with wave folding
- and a second when the modulator fundamental crosses nyquist which fixes the note
Most of the other synthetizers I've tested who use the plateau method do not allow modulation between their oscillators, so you can't experience this behavior

I don't really see this as too much of the problem (the trick with the x64 harmonic does allow to circumvent this fairly well)
However I am wondering if this behavior of the harmonics is undesired. default waveforms see their harmonics killed when crossing nyquist, but I could get the x64 to play by setting a default sine's fundamental to 0 then adding the x64. However, if I first set all of a waveform's harmonics with the "Zero" option then try adding the x64, it doesn't work above nyquist anymore.
I am led to believe that harmonics are supposed to be killed but can somehow escape their sentence by some bug.
I've attached a project with two oscillators, created as described before. One should play while the other shouldn't (at least they do on my side even after saving and reloading)

If harmonics are not supposed to play beyond nyquist, that's fine, after all with AM/FM you can still produce harmonics beyond the carrier and the modulator's own and hence get wavefolding. I do think being able to play with wavefolding more directly if more fun though
You do not have the required permissions to view the files attached to this post.

Post

Thank you for your interesting post :tu:
It will need some research.
I'm currently focused on other works and need to go step by step.
I've bookmarked this and will get back on this soon.

Post

Thanks again for diving into these oscillator details.

MuLab's oscillators indeed avoid aliasing by avoiding generating harmonics above nyquist.
The trick you applied discovers a bug: MuLab does not correctly handle the magnitudes of harmonics below the fundamental. The fundamental here defined as the harmonic with the highest magnitude. The bug is a consequence of the assumption that the first harmonic is the fundamental, which is not really the case with the 2 waveforms you used. The reason for the difference in behavior between those 2 almost equal waveforms is that the second waveform has true zero harmonic magnitudes below the fundamental while the first waveform hasn't, and that's where the bug occurs.

This bug will be fixed in the next update, and so in that project both oscillators will play silence as all harmonics are above nyquist.

Now about your interest in creatively playing with aliasing aka wave folding:
It can be an interesting sound palette, i agree, but simply switching off the anti-aliasing in the oscillators would result in a sound that is different when the project samplerate is different, and that's not what we want, we want projects to sound the same independent from the samplerate. So it would take more work to properly implement aliased oscillators, and that's not planned yet atm.

Post

MuTools wrote: Sun May 10, 2026 12:06 pm Now about your interest in creatively playing with aliasing aka wave folding:
It can be an interesting sound palette, i agree, but simply switching off the anti-aliasing in the oscillators would result in a sound that is different when the project samplerate is different, and that's not what we want, we want projects to sound the same independent from the samplerate. So it would take more work to properly implement aliased oscillators, and that's not planned yet atm.
This sort of thing definitely has consequences for post-processing as well; I sound design a lot for dubstep, and I tend to stack a lot of effects on top of what I make, meaning often times the slightest tweak to any harmonics would change the sound entirely.

I wonder if, in the meantime, an option for oversampling could be explored to mitigate the effects of the current oscillators wrt MuLab's modules like distortion, compression, limiting, etc.
Hello, everyone! :)
SoundCloud
Bandcamp

Post

Oversampling is on the wishlist and that planned development is already taken into account in the current code.

Post

Thanks for the answer,
I agree that oversampling should be handled carefully. I also agree that it should be a switch, as it can change a lot of the sound in an destructive way. The default behavior of killing harmonics is desirable for how a lot of instruments are already designed.

Post

does this new build changes the sound character of MuLab?
(i do like how it sounds/presents itself into space today)

Post

tiger001 wrote: Wed May 13, 2026 8:05 am does this new build changes the sound character of MuLab?
No sound change. (except for that oscillator bug fix when using rather exceptional waveforms at high pitches)
Do you notice anything different soundwise?

Post Reply

Return to “MuTools”