grame-cncm / faust

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

si.lag_ud(2,0); causes division by 0 #406

Closed magnetophon closed 4 years ago

magnetophon commented 4 years ago

When I compile:

process = si.lag_ud(2,0);

I get:

ERROR : division by 0 in -1 / 0

This used to work just fine, and is in fact used in the libraries, in RMS_compression_gain_mono.

sletz commented 4 years ago

Works here with Faust 2.23.0. It seems a compiler or library issue in Faust Web IDE, that we need to update. In the meantime you can use the old Web Faust Editor, but which has been recently updated with libfaust 2.22.5: https://fausteditor.grame.fr

magnetophon commented 4 years ago

I used faust 2.20.2. I'm building the latest commit now, to see if that helps.

magnetophon commented 4 years ago

The latest commit indeed fixes that issue, but it surfaces another bug, making me unable to compile old code: ERROR : path '/autoComp/fast_rel' is already used

Let me find a minimal failing example, bbl.

sletz commented 4 years ago

It's not a bug, it a more restrictive behaviour of the compiler: all paths should be distinct now. You'll have to fix your DSP source.

magnetophon commented 4 years ago

OK, fair enough. Where can I read about what has changed in that respect? IOW I haven't figured out what the error means yet.

Can you do a release that fixes the divide by 0 bug? Distro packagers (like me) would rejoice! :)

sletz commented 4 years ago

TBH I don't remember when this path issue was fixed ))-;

The point is that the compiler now refuses to compile code that cause several identical UI path (like/foo/bar/ui_item) to be produced, since identical paths cannot be distinguished when controlled with OSC for instance.

Yes, we'll have to prepare a new release soon.

magnetophon commented 4 years ago

NixOS just merged my pkg for 2.20.2. Any idea how long a new release would take?

sletz commented 4 years ago

We really need to make our testing machinery more robust (like this library related issue that was not seen...). Automatically testing libraries is not so easy.

A release should be done before IFC for sure...

magnetophon commented 4 years ago

OK, thanks. Would you mind if we keep this issue open till the release?

sletz commented 4 years ago

Yes, sure.

magnetophon commented 4 years ago

Fixed in latest release. Thanks!