/** * Copyright (c) 2021 Enzien Audio, Ltd. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions, and the following disclaimer. * * 2. Redistributions in binary form must reproduce the phrase "powered by heavy", * the heavy logo, and a hyperlink to https://enzienaudio.com, all in a visible * form. * * 2.1 If the Application is distributed in a store system (for example, * the Apple "App Store" or "Google Play"), the phrase "powered by heavy" * shall be included in the app description or the copyright text as well as * the in the app itself. The heavy logo will shall be visible in the app * itself as well. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #ifndef _HEAVY_LV2_DPF_EXAMPLE_ #define _HEAVY_LV2_DPF_EXAMPLE_ #include "DistrhoPlugin.hpp" #include "DistrhoPluginInfo.h" #include "Heavy_dpf_example.hpp" START_NAMESPACE_DISTRHO static void sendHookFunc(HeavyContextInterface *c, const char *sendName, uint32_t sendHash, const HvMessage *m); class HeavyDPF_dpf_example : public Plugin { public: enum Parameters { }; HeavyDPF_dpf_example(); ~HeavyDPF_dpf_example() override; void handleMidiInput(uint32_t curEventIndex, const MidiEvent* midiEvents, uint32_t midiEventCount); void handleMidiSend(uint32_t sendHash, const HvMessage *m); protected: // ------------------------------------------------------------------- // Information const char* getLabel() const noexcept override { return "dpf_example"; } const char* getDescription() const override { return "super simple test patch"; } const char* getMaker() const noexcept override { return "nobody"; } const char* getHomePage() const override { return "https://wasted.audio/plugin/dpf_example"; } const char* getLicense() const noexcept override { return "WTFPL"; } uint32_t getVersion() const noexcept override { return d_version(6, 6, 6); } int64_t getUniqueId() const noexcept override { return int64_t( 0x23CE0658 ); } // ------------------------------------------------------------------- // Init void initParameter(uint32_t index, Parameter& parameter) override; // ------------------------------------------------------------------- // Internal data float getParameterValue(uint32_t index) const override; void setParameterValue(uint32_t index, float value) override; // ------------------------------------------------------------------- // Process // void activate() override; // void deactivate() override; void run(const float** inputs, float** outputs, uint32_t frames, const MidiEvent* midiEvents, uint32_t midiEventCount) override; // ------------------------------------------------------------------- // Callbacks void sampleRateChanged(double newSampleRate) override; // ------------------------------------------------------------------- private: // heavy context HeavyContextInterface *_context; // HeavyDPF_dpf_example fdpf_example; DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(HeavyDPF_dpf_example) }; // ----------------------------------------------------------------------- END_NAMESPACE_DISTRHO #endif // _HEAVY_LV2_DPF_EXAMPLE_