Fehler Fabrik Modules - beta, code review

Centering the waves automatically solves some problems but not others. It still leaves a net DC component to some of the waves, which can be a problem for true FM synthesis, because the modulator envelope effectively becomes a pitch envelope as well.

The wavetables in the YMF262 were designed for what Yamaha have always called FM synthesis, but was actually phase modulation. As a result the DC offset has no significant impact on the tuning.

OK, made a few changes. I’ve added a simple DC filter to the output. It’s just before the output port, after all of the operators have been mixed/multiplied, so it shouldn’t have any effect on the FM process. It’s toggle-able through the context menu. This is the first time I’ve implemented a filter or a menu option, hopefully I’ve done so correctly.

Here’s the code for the DC Filter:

struct DCBlock
    float xm1 = 0;
    float ym1 = 0;

    float r = 0.995;

    float process(float x)
        float y = x - xm1 + r * ym1;
        xm1 = x;
        ym1 = y;
        return y;


output = DCBlock.process(output);

Since PSI OP only outputs the mangled result of modulated operators, I ran ValleyRacks Dexter through the filter to get an idea of what it’s doing:

Looks OK to me, the important harmonic content isn’t being affected I think.

Applying the filter to PSI OP had an interesting result though. On some wave combinations with lots of square like components, the filtered wave produced a greater peak to peak voltage than the unfiltered original:



Looking into this, I realised a mistake I’d made implementing the different FM algorithms. Originally the modulation matrix sent operators to the output at unity gain, regardless of how many operators were being sent for that algorithm. Now operators are properly mixed, so output volumes are consistent between algorithims.

There’s still a difference in peaks between the filtered and unfiltered, but since they’re now within their proper range it shouldn’t be such an issue.


I can’t pretend I understand the details well, but what I know for sure is that with this revision, I can push it even harder, and it sure hits hard! Definitely a new fav module of mine.

1 Like

One more change now that I’m getting the hang of the menu options - by default the Speed envelope that controls the rate of change between the Start and End pitches loops, which can be heard as a repeated pitch envelope, or if it’s fast enough, further FM modulating. This can now be toggled off so the envelope only runs once per Trig input.

1 Like

Another new module, this one’s an asymmetrical waveshaper that splits a signal into high and low components and processes them separately.

This one’s not quite there yet, there’s still a lot of weirdness and clicking/popping that I’d like to try and mitigate. I also had some trouble getting it to build due to this issue. I think I’ve got it linking statically but please let me know if there’s any problems.

Still, the basic idea is there, which is to turn nice neat sine waves into pulsey messes


Here’s a Linux shared object issue I’m seeing: (from log.txt):

[0.175 warn src/plugin.cpp:158] Could not load plugin /usr/local/lib/VCV-Plugins/FehlerFabrik: Failed to load library /usr/loca/lib/VCV-Plugins/FehlerFabrik/plugin.so: /usr/loca/lib/VCV-Plugins/FehlerFabrik/plugin.so: undefined symbol: src_delete

This looks as if something in libsamplerate.so isn’t resolving.

Hmm… The github repo bundles libsamplerate as an Mach-O 64-bit static library. That’s not in any way portable. Shouldn’t this use the VCV Rack supplied libsamplerate?

There seems to be a problem with using the VCV Rack supplied libsamplerate. Linking in the way I did worked fine on my Mac but caused problems for others on Windows.

Honestly, I don’t know much about linking libraries, or using makefiles. I’ve managed to get building working on my Windows machine by basically copying the make from the Fundamental plugins. Make sure there isn’t a lingering dep/ from an older version before you use make.

Unfortunately linking like that causes a problem on my Mac - wget isn’t working properly:

FehlerFabrik: Ross$ make
wget -c http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/bin/wget
  Reason: image not found
make: *** [dep/lib/libsamplerate.a] Abort trap: 6

So, until I can get that sorted, I can’t confirm that the current makefile works on Mac. I also can’t build Fundamental from source on this machine for the same reason though, so I’m hoping it’s just this wget issue that’s holding me up.

I don’t have a Linux install I can check either, so if anyone has any more problems please let me know.

I change the Makefile on my Linux box to use -lsamplerate and I’m seeing none of the mentioned difficulties.

OK, wget issue on my Mac is solved (lots of updating via brew, but I think it was a simple brew upgrade wget that got it in the end) and I can now get the libsamplerate archive downloaded via make. I then ran into this issue (which funnily enough I also ran into two years ago, see if you can guess which account in that thread is me…). As @jeremy pointed out, only building the stuff in the /src folder, not the examples, circumvents the issue entirely. So the makefile is now updated, and I’ve removed the /dep folder from the repo, as using make should now create that folder and fill it with the necessary libsample library stuff. It builds and runs correctly on both my Mac and Windows machines.

As I said before, this is all new to me so apologies if I’m bungling it. Am I right in thinking that I shouldn’t include the /dep folder in the actual repo, just to let it be created by the make process?

Sorry for asking, is there a mac build?

I can only see mac builds :

1 Like

There’s now a Windows 64 build along with the latest Mac build. If anyone can make a Linux build of the latest version I can stick that up too.


Is it okay if I just upload the build to you?

1 Like

Thanks, I’ve updated the release to include this.

I’ll be able to sort Linux builds myself as soon as I can fish out an appropriate USB drive to boot Ubuntu from, I refuse to buy another one when I know I’ve got some hiding somewhere…

1 Like

lol, well I’m happy to help until you find those sneaky usb drives.

I appreciate the work you do. Thank you.

Hi Ross, just one little question, could the sigma module be changed in the layout?

imho it is not really logic,

that the lower values are on the upper half and the higher values are on the lower half. (see the VCV octave module)

but maybe you have some reason for this layout.


Agreed, I’ve updated Sigma to have this layout.

Honestly I don’t think there was any reason for it in the first place, I made that module pretty quickly without putting a lot of thought into the layout.

1 Like


I’ve created a new branch that adds polyphony to Fax, as requested on GitHub. It’s pretty untested, and it makes an already esoteric module even more complicated, so please let me know if there’s any improvements that could be made.

1 Like

I’ve now also added polyphony to Sigma and Planck. In adding polyphony to Sigma, I found that clamping all possible output channels (16 * 8 = 128 channels!) was seriously increasing the sample generation time, so I’ve removed it for now. IMO this is a reasonable trade off - if a user inputs 10V they’re only going to be getting 14V out of it, so it shouldn’t create a voltage that’ll be wildly out of the realms of possibility. For what it’s worth, the Fundamental Octave module also doesn’t clamp it’s outputs.

I have one more module that I’d like to implement, then I’m going to focus on tidying up the panels and making sure everything conforms to the voltage standards so I can release these things on the VCV Library.