|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- /*
- * DISTRHO PingPongPan Plugin, based on PingPongPan by Michael Gruhn
- * Copyright (C) 2007 Michael Gruhn <michael-gruhn@web.de>
- * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * For a full copy of the license see the LICENSE file.
- */
-
- #ifndef DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED
- #define DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED
-
- #include "DistrhoPlugin.hpp"
-
- START_NAMESPACE_DISTRHO
-
- // -----------------------------------------------------------------------
-
- class DistrhoPluginPingPongPan : public Plugin
- {
- public:
- enum Parameters
- {
- paramFreq = 0,
- paramWidth,
- paramCount
- };
-
- DistrhoPluginPingPongPan();
-
- protected:
- // -------------------------------------------------------------------
- // Information
-
- const char* getLabel() const noexcept override
- {
- return "PingPongPan";
- }
-
- const char* getMaker() const noexcept override
- {
- return "DISTRHO";
- }
-
- const char* getLicense() const noexcept override
- {
- return "LGPL";
- }
-
- uint32_t getVersion() const noexcept override
- {
- return 0x1000;
- }
-
- int64_t getUniqueId() const noexcept override
- {
- return d_cconst('D', 'P', 'P', 'P');
- }
-
- // -------------------------------------------------------------------
- // Init
-
- void initParameter(uint32_t index, Parameter& parameter) override;
- void initProgramName(uint32_t index, String& programName) override;
-
- // -------------------------------------------------------------------
- // Internal data
-
- float getParameterValue(uint32_t index) const override;
- void setParameterValue(uint32_t index, float value) override;
- void loadProgram(uint32_t index) override;
-
- // -------------------------------------------------------------------
- // Process
-
- void activate() override;
- void deactivate() override;
- void run(const float** inputs, float** outputs, uint32_t frames) override;
-
- // -------------------------------------------------------------------
-
- private:
- float fFreq;
- float fWidth;
- float waveSpeed;
-
- float pan, wavePos;
-
- DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginPingPongPan)
- };
-
- // -----------------------------------------------------------------------
-
- END_NAMESPACE_DISTRHO
-
- #endif // DISTRHO_PLUGIN_PINGPONGPAN_HPP_INCLUDED
|