Decoupling capacitors are useful for generating audio but not for CVs where you want response down to DC.

One way to get a bipolar output from a unipolar DAC is to use an op-amp mixer circuit. This is an inverting amplifier configuration with one feedback resistor and two input resistors. One of the inputs goes to the DAC, the other goes to a low-noise, regulated negative voltage, say -5V. The op-amp sums the two signals together at the output. Try, say, a 20k feedback resistor, 20k to -5V, and 10k to the DAC. This will turn the 0-5V range of the DAC into +5V to -5V (inverted), i.e. 0V from the DAC = +5V out, 2.5V from the DAC = 0V, 5V from the DAC = -5V out.

6 days later

Strangely enough,the problem I have with "spikes" in the signal is not bound to the source. I tried a simple connection, taking the 3.3 from the Bela, into a 10k pot, into the analog 0.
The reading is dead flat, until I move the pot. Then some spikes emerges, until I stop making the signal varying. then dead flat again.
What can be the issue here ?

It sounds like a scratchy pot to me. have you tried with different pots?
Can you post a still of the scope? If you set it to single trigger mode you should be able to capture your noise.

a month later

Sorry for the late answer, but I ran in this problem again, not having interfacing anything lately. The spikes are not occurring when I move the pot, but at random. It affects everything. I linked a video of it, the blue line is the sin output from the examples project, the red line is a simple 10k pot into Analog 0 wired to the 3.3v from the Bela. I simply multiply the reading from AnalogIn 0 with the output from the sine wave.

As you can see, the blue waveform is affected without me touching the pot. I tried a lot of them too. And also to change basic settings like sample rate, but it's always like this.
http://ovh.to/iw9ZH5g
Soundwise, you can hear pops now and then when it's strong enough, but you can hear it when modulating, ie using a pot to FM an oscillator in SC can get quite messy.

So I tried with just the simple sinetone project, and added a scope, and there are tiny spikes too:
http://ovh.to/Mkwp775

Is it me not understanding something ?

Interesting.
Where are you taking the ground signal from the board?
Is there anything else connected to the board?
Is your computer powered by battery or power supply?

Can you try instead of using the 3.3V source to use one of the analog outputs as your voltage reference? For instance, add this at the bottom of your render() function:

analogWrite(context, 0, 0, 0.66)

This should give you 3.3V out of analog 0.

For the recording of the two clips, ground was the pin right under the 3.3v supply. Nothing else was connected but 3.3, grd and analo in 0. I tried with my laptop wired or only on battery, and without the battery and only wired, same issue. I used to power it to get the amplifiers, but even without PSU and input/output (so nothing but the patch running), the sine get spikes.

I tried with the 3.3 from analogWrite, same issue. Also I have to write it every frame, only 0 makes it goes back to 0 every other frames. Here with the audio input on, a tiny one 😉

http://ovh.to/Y5o4NhF

    Oh...I'm seeing this also. I thought it was my code or my CV source. I've spent the past 2 days tracking this down.

    what is that? where does it come from? is it an input ? Could you share your code ?

    UlrichH are you using a BeagleBone Black? or a BeagleBone Green? or a BeagleBone Green WiFi?

      I'm seeing a semi random spike on the scope and hearing it on the headphone output. Randomly my waveforms just act...weird. I'll record a demo, sounds great. The next day...Noise or random math failures (I'm making an additive synth and the waveforms get funky looking and sounding). All of which I had attributed to noise on the CV input or floating voltages on my Beatstep Pro and/or my Korg SQ1.

      We are looking forward to investigate these issues , but we'd need some code and precise setup description in order to be able to reproduce and tackle the issue ourselves.

      code can be pasted here if you are ok with sharing it with the web, otherwise email to info@bela.io thanks

      giuliomoro the BBB sold with the Bela cape. I'm coming home in a few hours, I'll upload pictures of the setup and the code.

      giuliomoro so, the green line is the output of Korg Volca going into the audio in of the Bela. The connections are as follow:
      Analog Out 0 to 3.3V as you asked, into a 10k pot, ground to the analog out ground. The output of the pot is going to Analog In 0.
      The code is the sinetone example, with a scope on with 3 inputs, red analog 0 reading, green audio in reading and blue sine out reading.

      Do you mean you are connecting the analog out 0 to the 3.3V pin on the board? If that is the case, then DON'T ! What I meant was replacing the 3.3V source in your circuit with the output from analog0.

        giuliomoro what ? why would I do that ? Sorry, english is not my main language. I meant "set up to output 3.3V". French shortcut, lost in translation I guess.

        5 days later

        So I tried again getting audio from my Eurorack, same as before. Adding the output of an analog out from the Bela set around 2V with divided eurorack signal around 1Vpp with Zener for security. So in the limits, maybe not optimal but working with an Arduino for visualisation.

        Weird thing: before the input of the Bela, I put a physical high pass filter, around 1500Hz. I output waht comes in, which is a simple sine wave from a Eurorack module, to the scope. I output to the audio out the signal after a software DC filter (and also to the scope to see if there's any difference. There is none). I can hear and see the effect of the hardware low pass filter, but the crackles and spikes are not affected, both sonically and on the scope.

        I then tried to see only the output I use for voltage reference: noiseless IF nothing else is added. Things starts to get weird as soon as the outside world tries to communicate with the Bela. Even when only adding the circuitry without cable plugged in or whatever gets the signal to act weird.

          Hi UlrichH
          I am not sure I understand from your description what the setup is like.

          Adding the output of an analog out from the Bela set around 2V with divided eurorack signal around 1Vpp with Zener for security.

          Where is the output of the Bela analog out going to ? How is the Zener connected?

          I put a physical high pass filter, around 1500Hz.
          ...
          of the hardware low pass filter,

          Is it a high-pass or low-pass filter? Are you using an audio or analog input to Bela?

          things starts to get weird

          in what sense weird?

          Ultimately, your setup is not clear to me from the message above. Could you please send a more detailed description, possibly with a circuit diagram, of a minimal setup that showcases the problems you are having?
          Also you do not mention anything about ground connections.
          All the external circuitry connected to Bela's analog inputs should be referenced to a single ground pin (P9-1) to avoid disturbances from ground loops.