grame-cncm / faust

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

ASSET failure: maxprim.hh, line: 57, version: 2.75.15 #1069

Closed danigb closed 1 month ago

danigb commented 1 month ago

Hey, thanks for the awesome audio environment and libraries! Impressive work 👏

While doing some tests on Faust IDE playground, I get an ASSERT failure error:

ASSERT : please report this message and the failing DSP file to Faust developers (file: maxprim.hh, line: 57, version: 2.75.15, options: -lang wasm-i -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 )

With this code:

import("stdfaust.lib");
freqs = (100.00, 300.00, 500.00, 1000.00, 1500.00, 2000.00, 2700.00, 3500.00, 5000.00, 6000.00, 8000.00);
N = 12;
split(signal) = signal : fi.filterbank(1, freqs);
display_peak(i, x) = attach(x, x : abs : vbargraph("h:peaks/%i", 0, 1));
peak_bands(signal) = split(signal) : par(i, N, _ : display_peak(i));
calc_max(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) = max(v2, max(v3, max(v4, max(v5, max(v6, max(v7, max(v8, max(v9, max(v10, v11)))))))));

process(signal, side) = mono with {
    side_bands = peak_bands(side);

    mono = attach(signal, side_bands : calc_max : hbargraph("max", 0, 2));
};

Thanks!

sletz commented 1 month ago

There is still a parsing bug when primitives (like max) are used in labels. So just rename hbargraph("maxBand", 0, 2) and it will compile.

sletz commented 1 month ago

Fixed in https://github.com/grame-cncm/faust/commit/37871be292ec9372c9a8111ea5535dda1d8c0329, but not yet deployed on Faust IDE.

danigb commented 4 weeks ago

Thanks!