flucoma / flucoma-cli

Fluid Corpus Manipulation programs for the command line
BSD 3-Clause "New" or "Revised" License
23 stars 5 forks source link

segfault in hpss #43

Open tremblap opened 2 years ago

tremblap commented 2 years ago

these values crash it:

fluid-hpss -source /Volumes/machins/projets/sylvain/sons/pad/Filtres-Gestes_00.wav -percussive /Volumes/machins/projets/sylvain/sons/pad/Filtres-Gestes_L_p128.wav -fftsettings 128 -1 -1 0 -harmfiltersize 5 5

but if I change buffer to 2 in fftsetting (128 -1 -1 2) it works.

tremblap commented 2 years ago

(128 -1 -1 2) it works ish - it takes ages and yield silence ~ (128 64 128 2) works faster but yields silence

in SC, the same values work {FluidHPSS.ar(PlayBuf.ar(1,b), harmFilterSize: 5, windowSize: 128)[1] * 0.1}.play

this might be related to the previous bug which I thought was documentation...

weefuzzy commented 2 years ago

in SC, the same values work

They're not the same values. Sending 128 -1 -1 0 is setting the maximum fft size with the last digit, not selecting a window function. So 0 is setting to 0 (which is bad, and should throw an error) and 2 sets it to 2 (which is also bad and should throw an error). Your SC string is effectively sending 128 -1 -1 -1

So, agreed, it ought not crash. But that fft settings string shouldn't be accepted in the first place.

tremblap commented 2 years ago

ah I forgot the new order - last thing is not the padding but max fft size... thanks!

tremblap commented 2 years ago

so my other report (doc issue) definitely needs updating for all maxValueThings