grame-cncm / faustide

Faust IDE (Integrated Development Environment)
https://faustide.grame.fr
Other
76 stars 23 forks source link

Second Bug with effect #85

Closed Pack-Blepper closed 9 months ago

Pack-Blepper commented 10 months ago

From this example:

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
effect = dm.zita_light;

adding a comment on any line after effect causes the compiler to ignore the definition (here, making the sawtooth sound dry).

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
//foo
effect = dm.zita_light;

runs normally.

declare options "[midi:on][nvoices:12]";
import("stdfaust.lib");
freq = hslider("freq",200,50,1000,0.01);
gain = hslider("gain",0.5,0,1,0.01);
gate = button("gate");
envelope = en.adsr(0.01,0.01,0.8,0.1,gate)*gain;
process = os.sawtooth(freq)*envelope <: _,_;
effect = dm.zita_light;
//foo

makes effect disappear.

sletz commented 10 months ago

@Fr0stbyteR stage bug since the same code works correctly in faustwasm standalone mode. Any idea ?

Fr0stbyteR commented 10 months ago

Hmm.. if you put a new line after //foo, the effect appears

sletz commented 9 months ago

Fixed in https://github.com/grame-cncm/faustide/commit/7f18b17896dfb0e2da699fae8daa914a7eefeb27 and deployed.