#include "chassis.hpp" #include "patches.hpp" START_NAMESPACE_DISTRHO Chassis::Chassis() : Plugin(parameterCount, 128, 0), sampleRate(getSampleRate()) { // initial code here } // Initialisation functions void Chassis::initAudioPort(bool input, uint32_t index, AudioPort &port) { // port.groupId = kPortGroupStereo; Plugin::initAudioPort(input, index, port); if (!input && index == 0) port.name = "Left Out"; if (!input && index == 1) port.name = "Right Out"; } void Chassis::initProgramName(uint32_t index, String &programName) { programName = patchName[index & 0x7f].c_str(); //printf("prog = %s\n", patchName[index]); } void Chassis::loadProgram(uint32_t index) { index &= 0x7f; memmove(&patchRam, (uint8_t *)patchData + (index * 18), 18); } // Processing functions void Chassis::activate() { // calculate filter coefficients and stuff printf("called activate()\n"); } void Chassis::run(const float **, float **outputs, uint32_t frames, const MidiEvent *midiEvents, uint32_t midiEventCount) { // flatten the left channel to use as temporary storage, since // the synth engine only generates a mono channel bzero(outputs[0], sizeof(float) * frames); bzero(outputs[1], sizeof(float) * frames); } // create the plugin Plugin *createPlugin() { return new Chassis(); } END_NAMESPACE_DISTRHO