eckel
June 2, 2024, 1:52pm
1
Hi, I am a beginner and puzzled by the results I get from the code below (the range of the CV input seems to be negative):
Measuring the voltage at the respective output I get:
CV_1: min: +0.17V, max: -8.65V
CV_2: min: +0.24V, max: -8.53V
#include "DaisyDuino.h"
DaisyHardware patch;
static void AudioCallback(float** in, float** out, size_t size)
{
float cv_1, cv_2;
patch.ProcessAnalogControls();
cv_1 = patch.GetAdcValue(0);
cv_2 = patch.GetAdcValue(1);
for(size_t i = 0; i < size; i++)
{
OUT_L[i] = cv_1;
OUT_R[i] = cv_2;
}
}
void setup() {
patch = DAISY.init(DAISY_PATCH_SM);
DAISY.StartAudio(AudioCallback);
}
void loop() {
}
I am using the Arduino IDE.
You’re sending the output to the Audio Outputs, which have a range of about -9 to +9v.
They also invert the signal, so +1.0 input produces about -9v output, and -1.0 input produces about +9v output.
I don’t consider it a bug, just a detail that needs to be considered, it’s discussed in the following thread:
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 aud…
1 Like
eckel
June 3, 2024, 7:48am
3
Thanks very much - this was very helpful!