Example MIDI synthesizer and sweep generator code is provided in the GitHub repository:
MIDI synthesizer and sweep generator code was tested with a Feather M4 Express using CircuitPython version 4.1.0 rc-1.
MIDI input was received by a Cedar Grove Classic MIDI Interface FeatherWing with input from a variety of MIDI sources. See https://hackaday.io/project/168260-classic-midi-featherwing for details.
OSH Park shared PCB project: https://oshpark.com/shared_projects/RoKf63De
AD5245 Digital Potentiometer for Envelope Control
Unlike using the Feather's internal DAC as a multiplying DAC by applying a waveform to the DAC's reference voltage input, the digital potentiometer doesn't require a reference bias, eliminating the distortion that happens when the DAC's reference voltage is less than about 1v. The digital potentiometer's internal MOSFET switches are biased differently than a DAC, allowing the AD5245 potentiometer to control voltage values between ground and Vcc.
The resulting envelope met the original design expectations for distortionless scaling the waveform's amplitude. The only issue faced was limited I2C data transfer rates during short-duration envelope segments such as shown during the Sustain segment below.
The latest version of the envelope segment control algorithm was modified to use a fixed time interval approach rather than a variable time interval based on segment duration. In the newest code, the digital potentiometer updates regularly every 1ms during segment generation, a speed easily accommodated by CircuitPython and the Feather M4 Express.
Primary Project Objectives
- Generate a smooth ADSR modulated waveform from the AD9833 across the audio spectrum (1Hz to 20KHz).
- Implement with CircuitPython code.
- Develop CircuitPython libraries for the AD9833 and AD5245.
- Improve output bandwidth.
- Reduce power supply noise bleedthrough.
- CircuitPython test, example, and library code
- Updated custom FeatherWing PCB
a) FeatherWing Implementation Chart
b) KiCAD schematic and board layout with Gerber code
- OSH Park public shared project page
- GitHub public repository page
- Project description and report
- The digital potentiometer approach is very viable and eliminates the multiplying DAC reference input bias distortion issue.
- The digital potentiometer's 256-step resolution appears to be sufficient for artifactless envelope generation.
- Create a version of the PCB for the low-power AD9837 device (thanks to @jeffwurz).
- Design a Eurorack-compatible version that provides MIDI and CV/Gate inputs.
- Design a desktop test equipment version with display and selector knob.
- Incorporate the knowledge and experience gained in this project into the design of an Arbitrary Waveform Generator FeatherWing.