Very good explanation Moonwax. The third method for protecting software is trade secret.
Many years ago there was a very gnarly bit of code that ran printers, called Adobe Postscript. Its operation was kept as secret. Many software companies spent a great deal of time to create print engines that would create image identical output, some more successful than others. DSP code can be and is recreated as well. Perhaps it’s not always worth the effort.
What about a wavetable synth, like an older model from Waldorf. Could that be done ?