Closed bluenote10 closed 4 years ago
TBH the Rust backend has not been formally tested yet, so it may still contain bugs.
You can have a look at the validation tests here https://github.com/grame-cncm/faust/tree/master-dev/tests/impulse-tests and https://github.com/grame-cncm/faust/blob/master-dev/tests/impulse-tests/README.md and possibly contribute a "rust" target?
Good idea, that should help to narrow down the cause. I'll give it a shot this evening.
That would be great, thanks!
I can confirm that 4b6bed3 has resolved this issue, thanks again! The example produces a nice ringing tone now:
When experimenting with this simple Faust dsp
I'm not quite getting the expected output from the Rust backend.
Testing this Faust code in the online IDE suggest that it is correct in general, producing a single note output. With the Rust backend I'm only getting 108 non-zero output samples, then the signal dies to zero, which is essentially just a short clicking noise.
I have prepared a minimal architecture file I'm using to debug the Rust output:
Debug architecture file
```rust #![allow(unused_parens)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_mut)] #![allow(non_upper_case_globals)] extern crate libm; use std::fs::File; use std::io::Write; pub trait Meta { // -- metadata declarations fn declare(&mut self, key: &str, value: &str) -> (); } pub trait UIThe generated code is:
Generated code
```rust #![allow(unused_parens)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] #![allow(dead_code)] #![allow(unused_variables)] #![allow(unused_mut)] #![allow(non_upper_case_globals)] extern crate libm; use std::fs::File; use std::io::Write; pub trait Meta { // -- metadata declarations fn declare(&mut self, key: &str, value: &str) -> (); } pub trait UIVisualizing the content of the generated
debug.txt
gives:All subsequent output samples are exactly zero.
Note that it is necessary to run the example in release mode because of #432 (attempt to multiply with overflow). I'm not sure if that is directly related, because I thought that release mode would implicitly have wrapping semantics.