Greetings everyone, I am playing around with the seed using DaisyDuino and want to output audio on the DACs instead of the audio outputs. The only example I found donig this is the Lfo code for Patch but I cannot figure out how to apply this to other codes.
I understand that “DaisyHardware patch;” has to be initialized in order to get access to PIN_PATCH_CV_1 and PIN_PATCH_CV_2 (on pin 29 and 30) but I don’t know how send the signal there instead of “out[chn][i] = sig;” for example.
Could anyone help me out with this and explain how to initialize and use the DACs as an output?
The Daisy Patch’s Sequencer example shows an example of using the analogWrite function to write to the DACs from the audio callback.
The default range of the analogWrite is 0 to 255 and the audio float range is -1 to +1, so we can map like this:
However, the DACs are designed to output CV at control rate, so they are DC coupled. And I’m not sure how well they’ll actually keep up with audio rate data, so this probably won’t work perfectly. Although, it might be serviceable for some use cases!
Also, the DAC outputs have a range of 0-5V, so the “audio” they output will actually be unipolar. Eurorack audio is usually bipolar +/-5V.
The point isn’t ’keeping up’ with audio rate. Even if each analogWrite is fast enough, the spacing between the analogWrite calls will not match the sample rate.