Creating novel audio effects in Max is a challenging task, involving both advanced knowledge of signal processing and the Max software environment. Automatic programming, which can teach a computer how to discover and produce novel effects on its own, may be used to accomplish this task. In order to best leverage automatic programming to this end, it is beneficial to have a system in place that can guarantee production of Max patches inherent with two key characteristics: syntactic correctness  and the ability to function as an audio effect. We present a system that automatically creates such Max patches using C++. We first introduce a set of classes that provide C++ with a sufficient internal representation of a Max patch. We then outline the process by which our system generates patch representations and discuss several rules that it follows in order to ensure syntactic correctness when translating these representations back into Max.