Hi folks,

Still working through a project, but I also have a separate question:

Let's say I'm using a Teensy 4.1 to convert MIDI note values and output variable PWM signals. Assuming I'm filtering well and getting a nice clean DC voltage at the end, I'm limited by the 3.3V output of the microcontroller itself. I need the range to be from 0-5v for proper CV control. For gate and general CV, a logic level shifter or voltage scale works just fine. However, since I'm working with pitch in note increments, scaling and logic-level shifting creates a mismatch in the output analog CV and my input MIDI value.

Unless I'm wildly misunderstanding CV and PWM, a PWM duty cycle generating a smoothed 2V DC with 3.3V supply/range would generate a proportionally higher DC voltage with a 5V supply/range. If this value is literally proportional, and I can simply multiply my initial value by ~1.515 to account for scaling, I guess that works.

Does anyone have a more reliable way to do this that wouldn't require scaling/rounding values in the code? Hardware solutions?