-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DaisyPatchSM audio outputs are inverted #575
Comments
Hi @adamjmurray! Thanks for the thorough issue. It is the case that both the input and output are inverting circuits. That said, your point about the Patch SM being DC-coupled definitely is a good case for doing some software inversion in the audio backend so that the signals handled within the audio callback match. A basic implementation of this would be changing this line and replacing the This will consequentially invert the input, but I think there may be a combination of settings using the existing |
Hi @stephenhensley . Glad to hear you seem receptive to changing this. My main concern is if anyone else has been using a Patch SM's audio outputs for modulation (like an envelope generator), introducing a software inversion of the output value is a major breaking change. I'm not sure what Electro-Smith's strategy for backward compatibility. A safe way to roll this out would be to enhance the Personally I think the default should be to do the software inversion so things work as intuitively as possible, but perhaps when the change first releases, the default behavior shouldn't change and you can encourage people to use the constructor where they explicitly choose the behavior they want. Then revisit changing the default one day in the future. Or maybe that's too much time and effort (especially since it may make it harder to fix with e.g. Oopsy). You could just clearly state the behavior is changing when an update is released. Maybe anyone else using audio outs for modulation also agree with me that it's currently backwards and will welcome the change. 🤷♂️ So that's why I defer to Electro-Smith on a roll-out approach. Otherwise I'd probably just send a PR because this seems easy enough to just change, but I'm thinking about the existing firmware code out there and don't want to cause any unpleasant surprises. |
Hi @adamjmurray For sure! It is definitely a little bit counter-intuitive with the DC usage. We do tend to avoid breaking changes as much as possible. So I like the idea of it being optional, and unfortunately non-default. This actually might tie in with one of the things I recently staged on the DaisyPatchSm hw;
. . .
hw.Init();
auto audio_cfg = hw.audio.GetConfig();
audio_cfg.postgain = -1.f;
hw.audio.Init(audio_cfg, hw.AudioSaiHandle()); Which could be simplified to a single helper-function in the |
That sounds good to me. I'll keep watching this issue for further developments. |
The values I write to a
DaisyPatchSM
's audio outputs result in a negated voltage coming out of the hardware (I am testing with a patch.Init() module). This firmware demonstrates the behavior:A brief discussion on the Electrosmith forum leads me to believe this behavior is by design on the hardware side. In that case, I view the current behavior on the software side as a bug.
Because the Patch SM has DC-coupled audio outputs, it can be used as a dual bipolar modulation signal generator/modifier with a nice wide peak-to-peak voltage range. In practice, one must be aware of the above behavior and, for example, only output negative values when outputting an envelope. This is very counterintuitive.
I feel that
libDaisy
should abstract aware the hardware details that these audio outputs are inverted. If I send a signed value to the output from code, I expected a voltage of the same sign produced by the hardware. This would be consistent with the other outputs, where a positive value to the CV or gate outputs results in positive voltage.So my request is to make
libDaisy
automatically negate the audio outputs when working withDaisyPatchSM
objects (and anywhere else applicable in the Daisy ecosystem).The text was updated successfully, but these errors were encountered: