Audio outputs negate the value I send from firmware

I don’t know if this is expected for Daisy hardware in general, or maybe the patch.Init() specifically, or maybe something is wired wrong in my module, but when I try sending a constant positive value to the audio outputs on my patch.Init(), I get a negative voltage coming out of the hardware. Specifically, if I write 1 to an audio channel, I see about -9V being output (the max negative voltage it will output). And if I write -1 to the channel, then approximately +9V is output.

Although the audio inputs are AC-coupled, the audio outputs can output a constant voltage, so I have been exploring using the audio outputs for modulation signals. It’s nice that they are bipolar as opposed the dedicated unipolar CV / LED outputs.

I want to continue using the audio outs for CV but I’m wondering if I share my firmwares, is this negative voltage behavior expected and consistent? Does it make sense to be writing code like OUT_L[i] = cv_value * -1?

Hey Adam!

I could run your firmware on my patch.Init() to confirm/test so please feel free to share!

From my understanding, the audio outputs are filtered so it’s not suited for outputting CVs that are slow or static. So I’m curious as to if you found a workaround.

Patch SM (unlike both version of Daisy Seed) has DC coupled outputs. Neither of them has DC coupled inputs, unfortunately.

And the audio outputs are inverted, as mentioned in the original post.

Are these details documented in Patch SM documentation?
Has the Patch SM schematic been published?

Here’s some firmware that demonstrates the behavior. Per the above discussion, I guess this will only work on Patch SM hardware (I do not have a Seed).

#include "daisy_patch_sm.h"

using namespace daisy;
using namespace patch_sm;

DaisyPatchSM patch;

void AudioCallback(AudioHandle::InputBuffer in,
                   AudioHandle::OutputBuffer out,
                   size_t size)
  for (size_t i = 0; i < size; i++)
    OUT_L[i] = 1;  // outputs approximately -9V on patch.Init() (Daisy Patch Submodule) hardware
    OUT_R[i] = -1; // outputs approximately +9V

int main(void)
  while (1)

With gen~ and Oopsy, you can simply connect a [float 1] or [float -1] operator to the [out 1] and [out 2]. It behaves the same.

The Patch SM audio outputs have a nice wide range of almost -9V to 9V, and since it apparently is DC-coupled, this can be quite useful for things like envelope generators. But I have to output all negative values to get a proper envelope signal. That’s fine, but since it seems backwards, it makes me concerned about how “future proof” my code is.

It sounds like @tele_player is confirming this inverted output behavior. It’s consistent on my hardware at least.

But my main question remains: Can I assume patch.Init() / Patch SM modules will all behave and continue to behave this way?

Worst case I guess it could be a firmware build option or configurable via SD card if the behavior changes in a future iteration of the hardware. I’d still like to know what to expect.

1 Like

That’s cool to know! I should try that out with my patch.Init(). Always neat to add some CV outs without any hardware modifications :slight_smile:

There was a conversation about the PWM being inverted in that oopsy prerelease thread, so I’ll add a link to this post on that thread. If you want to, you’re more than welcome to open a new issue on the oopsy GitHub about this. Thank you!

If you want to, you’re more than welcome to open a new issue on the oopsy GitHub about this.

I’m hesitant to treat this as a bug in Oopsy because it happens in raw C++ code too.

If we’re going to look at this behavior as an issue, I think the problem is in libDaisy. I believe fixing it there will automatically fix it in Oopsy, since Oopsy just generates C++ code that uses libDaisy, right?

Anyway, you got me thinking this behavior should be improved, so I filed an issue here: DaisyPatchSM audio outputs are inverted · Issue #575 · electro-smith/libDaisy · GitHub

1 Like

I think you’re right that it’s something deeper than a bug in Oopsy.
Thank you so much for opening the issue, Adam. The team will have a look at it.

On my Daisy patch, out_1 and out_2 are inverted relative to out_3 and out_4. Wondering if it is related to the original issue in this thread.

I’ve tested it by replicating the same value across all outputs:

	for (size_t i = 0; i < size; i++)
		float x = osc_sine1.Process();
		out[0][i] = x;
		out[1][i] = x;
		out[2][i] = x;
		out[3][i] = x;

and i get the following if i put out_1 on the left channel and out_3 on the right:

Anyone else gettign this behaviour? Wondering whether it is in firmware, or if the oputut jacks are wired out of phase.

The original post was referring to Patch.Init(), which is quite different from Patch. So, not really related.

I don’t have a scope, so I can’t check, but I wonder if this inversion is a result of the various codecs which have been used in Seed and Patch over the years.

The only thing YOU can do, if you need these to be in phase, is to invert the samples going to one of the codecs.

I’d be more concerned about the difference in output level,