Faust/pd patches on ac/dc

Hello everyone!

I wanted to share my recent experience with running Faust/Pd patches on AC/DC. Unfortunately, most of them didn’t work at all. What I mean is that AC/DC doesn’t produce any sound or voltages from its output pins. I also tried some simple tutorial patches, but encountered the same issue.

My assumption is that the inputs/outputs and knob labels might be different from other devices on the OWL platform. However, I’m not entirely sure about this.

Can anyone provide any suggestions on this matter?

Thank you!

USB audio output overrides patch output. This is the default behavior, but it’s possible to enable a setting that prevents this from happening. This requires compiling a custom firmware.

Knobs control parameters A - D
Parameters AA-AD control green LED intensity
Setting parameters AA-AD above ~0.9768009768009768 will set respective red LED on (not kidding, but that’s just 4000 / 4095 in integer math)

I’m not sure if there are any PD specific issues, but I ran FAUST code on ACDC (quadraphonic panner/mixer, 4 channel FDN reverb).

1 Like

Where can this configuration be changed?

I’ve run some code snippets and it works!

Can you share this patch, including with FAUST code? I was looking through the documentation and did not find anything about the FAUST mapping for the ACDC.

Hey Jakob,

The quick answer is that parameters A-D are bound to knobs, AA-AD set green LED level and buttons 1-4 set red button state.

I think it’s not documented because using AC/DC for running patches is not really supported officially at the moment. It’s certainly possible and I’ve got it working with a bit of an effort. So what you need is:

  1. AC/DC :wink:

  2. Custom firmware build if you want to output patch as audio, because normal AC/DC firmware outputs audio from USB. Not tested this myself, but you could probably just connect USB input to output on your PC for initial testing. I hope that eventually there would be an official build for this purpose, especially once Befaco will release its serial MIDI expander. IIRC, what you need is to add to ACDC config the following:

#define USE_USBD_AUDIO_RX_PRE_FX
#define USE_USBD_AUDIO_TX_PRE_FX
  1. Local builds from my custom branch for OwlProgram, since current version of FAUST that we have seems to work incorrectly with parsing parameter labels starting from AA or something like that. It also has fixes to get latest FAUST version to work correctly on OWL.

  2. Debugger (ST-link v3 mini) is highly recommended if flashing firmware, especially something experimental. Xibeca board doesn’t have a normal MIDI bootloader, but rather a DFU bootloader from ST that can be used. The problem is that if you’ve installed a broken firmware, you have to force it by shortening pads on the back of the board and there are reports that a few people didn’t get it to work (both my boards are fine though).

Now, the actual patch looks like that:

import("stdfaust.lib");

MINUS60DB = 0.001;
MINUS4DB = 0.6309573; 
MINUS3DB = 0.7079457;
MINUS2DB = 0.7943283;
MINUS1DB = 0.8912509;

make_channel(i) = led : sp.spat(4, pan, distance)
with {
    j = i + 12;
    pan = hslider("Pan%i[OWL:%i]", 0.0, 0.0, 1.0, 0.001) : si.smoo;
    distance = hslider("Distance%i[OWL:%j]", 1.0, 0.0, 1.0, 0.001) : si.smoo;
    level = vbargraph("Level%i>[OWL:%k]", 0.0, 1.0);
    rms = ba.slidingRMS(64); // supposed to be unstable with DC?
    rms_sqr = ba.if(rms < MINUS60DB, 0.0, ba.if(rms > MINUS1DB, 1.0, rms * rms));
    k = i + 8;
    led = _ <: attach(_, rms_sqr : level);
};

panners = par(i, 4, make_channel(i));

make_out_led(i) = _ <: led
with {
    level = vbargraph("Out%i>[OWL:%k]", 0.0, 1.0);
    rms = ba.slidingRMS(64);
    rms_sqr = ba.if(rms < MINUS60DB, 0.0, ba.if(rms > MINUS1DB, 1.0, rms * rms));
    k = i + 16;
    led = _ <: attach(_, rms_sqr : level);      
};

out_leds = par(i, 4, make_out_led(i));

process = panners :> (_, _, _, _) : out_leds;

This is based on default ACDC C++ patch except it pans in 2D instead of being a simple VCA.

I might be able to provide a firmware build that I’ve used for running patches. The problem is that current firmware seems to not work on ACDC correctly - USB device doesn’t appear for me. So I had to rollback USB library version used, but I’m not sure if USB audio is working correctly after that. But at least I had no problem running code on it.

Btw, they’re planning to release a dev kit based on Xibeca specifically for running patches that exposes all channels from its codec, has serial MIDI, etc.

Uff, that is quite the process. I mean, the most intuitive use would be that, when the ACDC is connect a device it acts as audio interface, but when its not connected it loads the custom patch.

1 Like

yeah indeed this is quite a process … I have a ACDC sitting unused in my overflow case because I seldomly pair my modular with the computer nowadays. I would love to put some patches on the ACDC and use it as a audio interface (every now and then) but as it is it is just to complicated.