Audio Programming Environment

Audio Programming Environment is an open-source audio plugin, that allows to directly script/code DSP real time, integrated in your signal chain. Utilizing a built-in code editor, compiler, console and a basic control surface API, testing and prototyping DSP is extremely easy and convenient.


Complete picture of APE

Audio Programming Environment (APE from now) is my brainchild, having struggled to learn to write DSP code in a practical manner. I grew tired of spending most of my time writing interfaces, frameworks, GUI's and whatnot, managing different libraries, dependencies etc. for very small plugins until I ultimately decided that it would be better to abstract the whole package away - enter APE.

APE is a comparatively small program that hosts user-written code and integrates it into the signal path of your host program. It provides a small API for making simple controls, like knobs and buttons to adjust variables inside your code, and to provide certain system information like tempo, channels etc. together with a console and an editor, that allows easy development and testing.

APE's intended use is the development process - testing out and fine-tuning algorithms in an efficient manner before integrating it into your primary project. It allows for on-the-fly compilation and testing. Also, it's intended to provide a simple introduction to writing DSP code in a manner where you don't have to worry about anything but the actual relevant code. It is therefore an ideal tool for teaching/educational projects and demonstrating small algorithms and / or effects.

I hope that someday it will evolve into a userbase-provided library of effects with a working implementation, with a design that allows to easily use the code in your own projects. Many great sites on the internet provide a lot of great examples, though they are mostly scattered and / or incomplete.


Audio Programming Environment linked with the Visual Studio compiler

Technical Reference

For now, refer to the manual (pdf).

Development Status

This project is currently not being actively worked on. I still recieve requests for new features which I implement along the way, but it needs a rewrite (also to support the newer versions of the cpl library).

Known Bugs

The transition to JUCE has brought along a pretty massive CPU load when rendering the graphics (mostly due to some weird osx redrawing of png's). This can be remedied by modifying the config.cfg. I'm trying to fix it, though. It is only a problem when the GUI is showing Some 32-bit hosts on OSX have shown some hanging behaviour on exit, however it might be the hosts - unfortunately, i dont have a suite of 32-bit hosts to test the plugin with on osx syswrap is not yet available on OSx, I'm working on it.
TCC has a hard time coping with system headers on OSX, if you experience problems prefix system includes with tcc: #include < tcc/stdio.h>
Legacy OSx support: I only have 10.8 atm, but it should work for 10.7 (i think? maybe lower) - im keeping an eye on it
If ape is initiated, but the editor never is opened, project recall will cause the message "Cannot open file 'Untitled'" to appear.


Alpha 0.3.2: 23-04-2014
  Missing examples for x64 vst target on OSx
  Alpha 0.3.1: 14-04-2014
  Fixed config.cfg's windows targets; tcc should now find missing headers
  Fixed a crash on host exit (directwrite disabled for now) on windows
  Alpha 0.3.0: 08-04-2014
  Source code rewritten to support JUCE also, which is the primary target platform now.
  this affects several things; notably the editor is switched from Scintilla to JUCE's inbuilt code editor now
  this has the welcome side effect of hotkeys working again
  syntax highlight only for C++ and friends for the moment.
  x32 and x64 builds on both Windows and OSx as AudioUnit and VST 2.4
  Countless bug fixes / code rewrite
  project recall now implemented
  autosave now implemented
  support for high dpi display
  an actual threading- and multi-instance model is now implemented; it should be completely safe to run multiple plugins in the same or other processes
  fix of fpu exceptions
  improved header support for other compilers than tcc
  improved graphics on some points, degraded on others

Alpha 0.2: 10-02-2014
  fixed uninitialized variable 'Engine::clocksPerSample'
  scilexer now properly adds filenames to project struct even in case of singleString-compilation
  scilexer now properly sets amount of files in the project
  the console should now properly print strings with linebreaks in them, this affects the core, api and scripts.
  fixed a bug where newlines will crash the console code.
  output logging of console now properly contains newlines.
  due to larger amounts of info being printed to the console, it is now scrollable and has a longer history
  added new compiler: syswrap. syswrap allows to interface to installed system compilers.
  fixed a bug where closing the editor would not reset the editor button in APE
  pressing the editor button now properly restores the window if user had minimized it before
  fixed a memory leak in the TCC compiler (early return caused no deallocation of plugin data)
  fixed a wrong return value in CInterface.h
  added a new knob function: api.createRangeKnob(). This knob formats it's display value based off a minimum, maximum and a callback function.
  fixed a bug where knobs initially would have the wrong format
  to enhance c++ compability, 'this' is now an illegal identifier
  added new valuestruct: scale
  added f_mod() and f_sin()
  added pi values
  compatized header with various compilers
  updated the example scripts to reflect these changes.

Alpha 0.1
  Initial release.

You may also want to check out commit history.