preenfm Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: cwyss on September 30, 2018, 01:53:41 PM

Title: Inconsistent sound with certain algorithms [Fixed in 2.09]
Post by: cwyss on September 30, 2018, 01:53:41 PM
Hi!

When I use  algorithms with stacked modulators, e.g. alg1, alg5 or alg11 which all contain the chain Op3->Op2->Op1, I experience a random change in the tone colour between consecutive strokes of the same key.

My patch is very simple:
If I now play a note, I get a slightly different tone everytime I press a key. I see this in a spectrum analyser where most of the time the amplitude of the carrier frequency is smaller than that of the first sideband c+m (and even the second c+2m), but sometimes also the carrier is the strongest component. This changes in tone colour are also audible.

I get the same behaviour with different algos, as long as they contain op2->op1 and op2 is the destination of another operator, e.g. alg5 or alg11.

To be absolutely clear here: When I play and hold a single note, this one note is perfectly stable, no change in its spectrum at all.
But when I release the key and then hit it again, then I obtain a different spectrum than before. The change is sometimes smaller, sometimes larger, in an apparently random way.

At first I thought perhaps this is how FM works in this particular situation, but...:

So this is probably a bug?
Title: Re: Inconsistent sound with certain algorithms
Post by: cwyss on October 02, 2018, 08:50:50 AM
So yesterday I did some more knob tweaking and button pushing and finally arrived at a patch with the setup I intended and which is now perfectly stable.   :D

This one uses algo 9 with op1 and op6 off, op4 and op5 are sine with freq=1.00 and the IM from op5 to op4 is 2.00. The envelope settings for op4 and 5 are again gate-type, as in my first patch. Also velocity and voices settings are the same.

So with my first patch perhaps I found some strange "instable" combination of parameters?
Will do some more testing and then report.
Title: Re: Inconsistent sound with certain algorithms
Post by: cwyss on October 03, 2018, 07:21:48 PM
Ok, I think I found it:
it's the envelope release time settings of the operators that cause the problem.

Instability occurs in two different cases:
The amount of instability also depends on the carrier to modulator frequency ratio c:m; you get a strong effect for c:m=1:2, for example.

Here is a list of steps to reproduce these instability phenomena:
Start with the patch "Preen mk2" from the factory default combo. It uses alg9. Then make the following parameter changes:
This produces a steady timbre with stable frequency spectrum between repeated key strokes.

Now set
You get an instability of the first type, which is easily audible (at least for me ;) ). Then:
It's stable again. Then
This is the instability of the second type. Finally
Again stable.

I tested this by repeatedly playing a C at 261Hz. In my spectrum analyser I then measured the level difference between the 1. and 3. harmonic, i.e. at 261Hz and 785Hz.
In the stable case I obtain a difference of around 11dB, where the 3. harmonic is stronger. For the first type of instability the changes are drastic, sometimes the 1. harmonic even becomes strongest. For the second type, the measurements vary between 11dB and around 8dB, if I remeber correctly.
For the second type, the time you wait befor the next key stroke also seems to matter. If I release the key, then wait for the sound to die completely, and only then trigger the note again, then the instability is much smaller. If after key release I retrigger the note immediately, the instability is stronger.
It seems like you have to give the envelopes enough time to complete their release phase...

Finally I also checked some other algorithms and got the same results:
for alg11 (with both cascades 123 and 456), alg14 (cascade 123), alg16 (345), alg1 (123)

My conclusion (so far):
Title: Re: Inconsistent sound with certain algorithms
Post by: Xavier on October 12, 2018, 10:55:11 PM
Thanks a lot for the post and the update.

I have to try to exactly understand what instability you talked about, but it seems OK in your last post :)

You can definitely get some weird behaviour with release time, specially when some release levels are not 0.0.
Title: Re: Inconsistent sound with certain algorithms
Post by: Xavier on October 13, 2018, 12:52:04 PM
Thanks again for the detailed post.

I think i have a fix for these problems.
Some variables that must be 0 at the beginig of a note,  were not correctly reset at the end of previous note. Specially audible when carrier releast time is 0.

Please, can you confirm the attached firmware fix that ?
(It also fixes the other bug you reported with op1 release time of default combo always 2.56).

To flash, upload and flash the firmware through the bootloader is the quickest solution :
http://ixox.fr/preenfm2/manual/upgrade-firmware/

Thanks

Xavier
Title: Re: Inconsistent sound with certain algorithms [Fix pending]
Post by: cwyss on October 14, 2018, 12:36:00 PM
The new firmware fixes the issue for the cascade 456 of alg9 and the cascade 123 in algos 1,5,11,14,19  :)
Unfortunately, the problem persists for the cascade 456 of alg11 and 345 in alg16.  :(

I also noticed that when I do my test for alg1, i.e., op1=sin, freq=1.0, op2=sin, freq=2.0, op3=off, IM1=1.8, and then switch to alg3 (and have op4=off too!), then the sound changes.
Theoretically the sounds should be the same for alg1 and alg3 when op3 and op4 are off, since both give just op2->op1, right?
Title: Re: Inconsistent sound with certain algorithms [Fix pending]
Post by: Xavier on October 14, 2018, 09:12:53 PM

Wow impressive test  ;)
OK i also fixed alg11 and alg16 in the attached firmware.
If you're into code here is the change :
https://github.com/Ixox/preenfm2/commit/1eefac254cdd65e0d54e67375ed608216a6c25d9

Thanks again for your test and report :)

In real FM you have to  add a high pass for operator in the middle of a cascade.
Without that, the final carrier is pitched shifted.
So in Algo1, op2 is high passed which caused this difference.
Keeping your same values, you won't here any difference if you use Op1 & Op3.

Title: Re: Inconsistent sound with certain algorithms [Fix pending]
Post by: cwyss on October 15, 2018, 09:08:31 PM
Tested all algos with the new firmware: everything fine now :)

And thanks for the info about the additional high pass: that makes it clear.