grame-cncm / faust

Functional programming language for signal processing and sound synthesis
http://faust.grame.fr
Other
2.48k stars 315 forks source link

Magnetophon compressors not working in online IDE - edit: not in AU either #616

Open matthewjumpsoffbuildings opened 3 years ago

matthewjumpsoffbuildings commented 3 years ago

The compressors in fausts library made by @magnetophon (any of the ones that use peak_compression_gain_mono) don't seem to work in the online faust IDE.

For example a simple test of the following

process = co.peak_compression_gain_mono(0, 0, 0.1, 0.1, 1, 0);

Seems to produce silence with occasional clicks and pops.

From a little digging, it appears this may be due to a bug with si.lag_ud as mentioned in comments in the source:

// note: si.lag_ud has a bug where if you compile with standard precision,
// down is 0 and prePost is 1, you go into infinite GR and stay there

I'm not sure what down is, but I have tried setting prePost to 1 and 0, to no effect.

I am guessing the online IDE uses standard precision for floats, hence the appearance of the issue?

matthewjumpsoffbuildings commented 3 years ago

I have tested compiling to AU, using the -quad flag, to see if this was the cause of the issue. It's still not working, the following compressor

co.peak_compression_gain_mono(0.25,-20,0.12,0.4,2.0,0)

is producing silence once compiled to AU using faust2au with the -quad flag. So perhaps its not the si.lag_ud issue after all?

sletz commented 3 years ago

@magnetophon any idea?

magnetophon commented 3 years ago

I noticed the problem but I won't have time to research at least until september. Sorry!