Faust on Wizard again, "process = _" not passing audio through, any ideas?

Hi, I’m attempting to get a Faust “hello world” patch up and running. I’m using the code here process = _,_; from (https://github.com/pingdynasty/OpenWareLab/tree/master/Faust/Tutorial/02_DualVCA#audio-input-and-output) and uploading it and compiling it using the rebeltech online compiler but I get no audio output (or perhaps more accurately I think I get no audio input).

  • The physical device works because existing compiled pd patches on the device can take audio input, process and produce audio output
  • Any Faust patches I’ve written that don’t use audio input work fine using the rebeltech online compiler, like process = os.osc(440.0),os.osc(440.0)
  • Some patches I’ve never used before like this one work https://www.rebeltech.org/patch-library/patch/Dual_Stereo_MIxer, although the majority of audio-in-and-out patches don’t work for reasons unknown. That’s always been the case though, I’ve never had much luck with getting other people’s patches working on my device.

I’m on firmware version 20.7. I did attempt an upgrade to Wizard 21.0.0 as there was no mention of unsafe breaking changes, but it caused my device to bug out (device was mainly unresponsive and LED would flicker occasionally). Thankfully I was able to flash it again with 20.7 but I’m quite frankly a little scared to try this again.

I’m quite confused at this point. Any ideas why audio input might not work with Faust? What else can I try?

FAUST version on our server is a bit old and we can’t update it easily without updating other parts of OS. So it might have some bugs. Do you get the same way if you pass audio explicitly like this:

process(l, r) = l, r;

I don’t have a Wizard myself, but AFAICT it has a button that forces bootloader mode not to run firmware. This means that no matter how broken is the firmware you install, it’s always possible to replace it with the one that works. So no need to worry about bricking it this way.

It may be necessary to erase patch storage after flashing firmware, I would suggest to try that if you end up with firmware that doesn’t run. This is fairly common… Other than that, try the latest v21.2.2 release. It lists Wizard-specific bug fixes, so in certainly was tested and working on your hardware.

Thanks for the reply.

FAUST version on our server is a bit old and we can’t update it easily without updating other parts of OS. So it might have some bugs. Do you get the same way if you pass audio explicitly like this: process(l, r) = l, r;

Ok, I’ll try this next chance I get. Do you know what version of Faust is on the server? If it has an old version then that’d be great to know which exactly, so I don’t write patches that use newer language features or library functions and then can’t use them.

I don’t have a Wizard myself, but AFAICT it has a button that forces bootloader mode not to run firmware. This means that no matter how broken is the firmware you install, it’s always possible to replace it with the one that works. So no need to worry about bricking it this way.

Ah cool, I didn’t know this. Just found this product info page and it says how https://github.com/pingdynasty/OpenWareLab/blob/master/Wizard/Wizard_Getting_Started.md

Actually thinking about this, I’d rather not rely on the server if the version is not up to date. My first string of attempts at using the Wizard were thwarted when I was using puredata, and only a subset of objects were supported by the heavy compiller iirc but I wasn’t certain which - it made for a very frustrating development experience. In this case I’d rather try to get local builds working correctly.

Do you think it’s possible to use faust2owl on my machine, and upload the resulting .hpp file to the patch library and have it work? I could also try to use OwlProgram but that’s a last resort because I would like to publish things to the public patch library and I’d rather not need to set up my local environments for C++ development if there are any alternatives. But if that ends up being the only option to use recent faust versions + wizard then I’ll do it.

Nowadays we’re doing a bit better with docs, PD objects list is at List of supported Pure Data objects. | OpenWareLab . But you can do so much more with FAUST!

I think that FAUST uses old version of OWL patch templates. It might still work, but I’d expect some missing features or behave inconsistently. We’ve discussed updating their templates, but I think this won’t happen until we upgrade our version of FAUST on server.

Actually, if you want to try that approach (uploading generated C++ files), you don’t need to setup anything C++ related. I mean that it first runs FAUST compiler with correct patch templates, you could try doing the same and upload the resulting .hpp patch even if you don’t want to compile it locally.

Other than that, running old FAUST version is becoming more and more inconvenient, hopefully @mars can have it upgraded soon enough.

Awesome, thanks again for all your help.

Nowadays we’re doing a bit better with docs, PD objects list is at List of supported Pure Data objects. | OpenWareLab . But you can do so much more with FAUST!

Yes indeed. I found puredata generally to be a bit of a mess and did not mind at all having a reason to try something else. Faust is absolutely amazing, I’m consistently impressed by how well thought out it is, and being able to reuse the same dsp code on a Wizard and a raspberry pi and a web app and an arduino / teensy is so cool.

I think that FAUST uses old version of OWL patch templates. It might still work, but I’d expect some missing features or behave inconsistently. We’ve discussed updating their templates, but I think this won’t happen until we upgrade our version of FAUST on server.

Makes sense. I did try this just before and it complained that my dsp was missing a reference to a BYPASS_BUTTON or something that sounded like it was from the original OWL pedal.

Actually, if you want to try that approach (uploading generated C++ files), you don’t need to setup anything C++ related. I mean that it first runs FAUST compiler with correct patch templates, you could try doing the same and upload the resulting .hpp patch even if you don’t want to compile it locally.

Oh nice, this sounds like my favourite option so far. I’ll reply once I’ve tried it in case others read this in future.

EDIT: Ignore this, it now works after a firmware upgrade.

Hi, I’ve tried a few things but still no luck unfortunately.

Firstly I tried this with the rebeltech online faust compiler:

process(l, r) = l, r;

This didn’t work and essentially had the same symptoms as process = _,_;

Secondly I cloned and installed https://github.com/pingdynasty/OwlProgram. I couldn’t get the prerequisites to install on OSX so I’m on a linux box now, and I’ve run the commands from https://github.com/pingdynasty/OwlProgram#base-tools and they completed successfully (even if I don’t need them).

My test patch produces a sine wave and passes through audio, so I can hear if the patch is running, and hear audio input if it gets any:

import("stdfaust.lib");

fx(x) = os.osc(440.0) * 0.1,x :> _;
process = fx,fx;

I’m guessing a lot here and found that I can actually build my patch in PatchSource/fausttest.dsp using the command it instructs, make FAUST=fausttest load. I did get this error, but it still produced a bunch of files in OwlProgram/Build/Source which could be uploaded.

Building patch fausttest
In file included from ./LibSource/Patch.h:5:0,
                 from ./Source/SampleBuffer.hpp:5,
                 from ./Source/PatchProgram.cpp:4:
./LibSource/basicmaths.h:34:12: error: 'std::clamp' has not been declared
 using std::clamp;
            ^~~~~
compile.mk:148: recipe for target 'Build/PatchProgram.o' failed
make[1]: *** [Build/PatchProgram.o] Error 1
Makefile:110: recipe for target 'patch' failed
make: *** [patch] Error 2

I tried uploading the files produced (faustmath.h, FaustPatch.hpp, owl.h, progname.s and WaveReader.h) to the rebeltech online compiler, I selected cpp compilation, and set FaustPatch.hpp as main, and it compiled correctly and ran on the Wizard. As before, patches run fine, but no audio input is received. I’ve confirmed that other non-faust patches still receive audio input.

I might try a firmware update now.

It works! I just did the firmware upgrade to 21.2.2 and audio input is now passed through, on all previous patches I tried. So thats using the rebeltech online compiler and the ones i compiled locally.

I should have tried that sooner. I’m very pleased now though, I can finally start using these devices.

Thanks again for your help.

Congratulations! But yes, firmware upgrade should had been tried earlier.

It looks like you upload a few files that might not be needed. WaveReader.h file is only necessary if you pass FAUSTOPTS=soundfile to use WAV file loading. It won’t be enabled when compiling. So you can skip that file if you’re not using this feature. I’m not sure if you need to upload progname.s too, because it’s created automatically when compiling C++ code and is stored in subdirectory Build/Source.

1 Like