can't reach 5v with R2R DAC

Paul__B:
That certainly looks like a reasonable design. It contains the gain or "scale" and offset adjustments. It concerned me a moment that it had only a seven bit DAC but then I realised something. You don't actually need to use the maximum value - 255 or 127 - for the maximum output voltage. In fact, if five octaves is 61 notes, you only need a six bit DAC to generate a potential 64 values, and your "scale" and "offset" adjustments are used to tune the values 0 to 60 - or 1 to 61 (or even 3 to 63 if that suits) to match those note values and you have your whole scale neatly set out.

Presuming that is, that your synthesiser is perfectly (logarithmically) tuned so that a given voltage step corresponds accurately to a semitone. If it does not, then you may want much greater resolution on the DAC - possibly even more than 8 bits - so that you can map values to notes with a resolution of "quarter semitones" or better to correct them.

Right. I'll do it 7bit i think, and have more than 5v range.
Yes my synthesizer is in tune, I used it with someones midi 2 cv converter with a pic and dac0830, which is 8bit, and it was fine. But dedicated dacs are pricey and hard to get here.
I tested the circuit in a simulator program, and with the dac at 0v, I couldn't get 0v at the ouput of op-amp with the offset trim. The closer I could get was -120mV. Maybe it's the program's fault, or i drew it wrong. Anyways, I will try it with the real things. Thanks