grame-cncm / faust

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

Compiling some dsp's without -double bypasses them. #117

Closed magnetophon closed 6 years ago

magnetophon commented 6 years ago

Steps to reproduce:

git clone https://github.com/magnetophon/faustCompressors.git
cd faustCompressors
faust2jaqt drumDuxpander.dsp
./DrumDuxpander

Connect some audio to it, and notice that it passes audio, but won't do any gain-reduction.

In contrast:

faust2jaqt -double drumDuxpander.dsp
./DrumDuxpander

will do gain-reduction.

sletz commented 6 years ago

I don't hear gain-reduction here testing with faust2jack. Moreover using faust2plot I git this:

faust2plot drumDuxpander.dsp

faustCompressors letz$ ./drumDuxpander % Usage: octave --persist thisfile.m

faustout = [ ... 0.00498194 0.00498194 0.00498194 0.00498194 0.00498194 0.00498194; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... ];

faust2plot -double drumDuxpander.dsp drumDuxpander; magellan-pro-2:faustCompressors letz$ ./drumDuxpander % Usage: octave --persist thisfile.m

faustout = [ ... 0.00498194 0.00498194 0.00498194 0.00498194 0.00498194 0.00498194; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... 0 0 0 0 0 0; ... ];

Some same sample values in both cases. How are you testing gain-reduction ?

magnetophon commented 6 years ago

@sletz Thanks for looking in to this.

It's a dynamic processor, so it will only do gain-reduction if there is an input signal, which I don't imagine faust2plot will give.

I'm just compiling with faust2jaqt and sending in audio. Without -double, the meters will not move, with it, they will.

sletz commented 6 years ago

OK, I was thinking faust2plot was actually injecting a dirac like impulsion to test processors, but this is not the case (BTW a very interesting extension to have, I'll have a look...)

I tried injecting a real audio signal (compiled with faust2jack). It was working correctly as far as I can judge by ear.

Does type problem also occur with faust2jack ? (cannot use faust2jaqt here for now)

magnetophon commented 6 years ago

Yes, the same happens with faust2jack here. Did you see the meters move? I'm asking since you mentioned judging by ear, and this is a bit of a weird dynamic processor that might not work how you expect it to.

sletz commented 6 years ago

Well faust2plot actually does set an Dirac impulse as sample 0 for processors (I was looking at an old architecture file...). Can you test it ?

I indeed see the meters moving.

magnetophon commented 6 years ago

Sorry, I don't have faust2plot on my system: I haven't packaged it yet, and in NixOS is almost impossible to run software without packaging it.

It seems this bug is not easily reproducible, since I get it with any architecture (also lv2) and you don't get it at all. For the record: without -double, the meters don't move here.

rmichon commented 6 years ago

@sletz yep, not to mention that this can also be easily done directly from the Faust code just by putting 1-1' before the expression to check.

sletz commented 6 years ago

C'est pas faux : http://fr.kaamelott-officiel.wikia.com/wiki/C%27est_pas_faux

rmichon commented 6 years ago

@sletz Lol, I thought @magnetophon sent that message and then I started to wonder how Kaamelott managed to make it out of France haha

magnetophon commented 6 years ago

@rmichon Je ne parle pas francais...

But now that we have your attention, can you reproduce this issue?

rmichon commented 6 years ago

@magnetophon will have a look at it but it's the morning here and I have LOTS of work to do, the past 2 weeks have been kind of crazy mostly because Yann and I are shooting videos for a Faust online course early next week and it's actually a pretty gigantic amount of work. This is done in a studio by Kadenze, so we can't really push the deadline :(. I also need to defend my PhD thesis the following week. Aaaaah!

magnetophon commented 6 years ago

@rmichon OK, good luck with your endeavors. Those things are way more important; I can wait.

Will the video course be openly available? Will it be a beginners course, or could I learn stuff too?

rmichon commented 6 years ago

Cheers! And yes, videos will be available for free, of course. It's more a beginners course "on steroids": it's only 5 sessions but they should be really intense. In your case, not sure if you'll have much to learn from it... :)

magnetophon commented 6 years ago

I just tried with release 2.5.10, and that fixes the problem. Sorry for not trying that right away!

rmichon commented 6 years ago

I loooove when problems resolve like this!