grame-cncm / faust

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

Adding a debug/single-stepped DSP modality for Faust programs #400

Closed dariosanfilippo closed 4 years ago

dariosanfilippo commented 4 years ago

Hello.

The outputs of some algorithms need to be inspected sample by sample to make sure that the behaviour is correct. When these algorithms do not work, it is sometimes necessary to also inspect sample by sample areas of the network far from the output stage.

In large networks, the code may require major changes to route whatever signal needs to be inspected to the output and use tools such as the CSV plot.

Bargraphs are bounded to block calculations and, even if not so, they couldn't be inspected if running at samplerate.

Would it be possible to have a faust2debug target generating a program that can be single-stepped on-demand, and where bargraphs can be used to inspect signals sample by sample?

Alternatively, would it be possible to have a function whose dedicated task, when placed somewhere in the code, is to take the incoming signal, route it to the first available output channel, and pass forward the same signal unaltered?

Thanks, Dario

sletz commented 4 years ago

I've added -bs (buffer-size) and -s (start-sample) options in faust2cvsplot and print of bargraph values in https://github.com/grame-cncm/faust/commit/55a86fe01b14dca6b7e69ec13e6798caab03a975.

So adding some bargraph based sensors in the DSP code + using the single-step mode (using -bs 1) should allow to see what you need.

dariosanfilippo commented 4 years ago

That's fantastic. Thank you so much, Stéphane.

Dario

On Mon, 2 Mar 2020 at 14:52, Stéphane Letz notifications@github.com wrote:

I've added -bs (buffer-size) and -s (start-sample) options in faust2cvsplot and print of bargraph values in 55a86fe https://github.com/grame-cncm/faust/commit/55a86fe01b14dca6b7e69ec13e6798caab03a975 .

So adding some bargraph based sensors in the DSP code + using the single-step mode (using -bs 1) should allow to see what you need.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/grame-cncm/faust/issues/400?email_source=notifications&email_token=AHG3I2FSFB6R5NNCBOMYWVDRFO2ZVA5CNFSM4KUG45NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPMBPA#issuecomment-593412284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHG3I2G4ZLHOHLUSFZQZM7LRFO2ZVANCNFSM4KUG45NA .