comparison DPF-Prymula-audioplugins/plugins/CloneChannel/DistrhoPluginCloneChannel.hpp @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 /*
2 * DISTRHO CloneChannel - Copyright (C) 2023 Przemysław R. Pietraszczyk
3 * Based on DPF'ied SoulForce.
4 * Copyright (C) 2006 Niall Moody
5 * Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
24 */
25
26 #ifndef DISTRHO_PLUGIN_CLONE_CHANNEL_HPP_INCLUDED
27 #define DISTRHO_PLUGIN_CLONE_CHANNEL_HPP_INCLUDED
28
29 #include "DistrhoPlugin.hpp"
30
31 START_NAMESPACE_DISTRHO
32
33 // -----------------------------------------------------------------------
34
35 class DistrhoPluginCloneChannel : public Plugin
36 {
37 public:
38 enum Parameters {
39 kParameterSource, // przepisanie lewy prawy kanal
40 kParameterSource2, // klonowanie czy przesunięcie
41 kParameterCount
42 };
43
44 enum Programs {
45 kProgramDefault,
46 kProgramStayDown,
47 kProgramLookingForTheWorld,
48 kProgramGuerillaLove,
49 kProgramTumbleToThePower,
50 kProgramDoYourselfFavour,
51 kProgramPastIsPast,
52 kProgramYouAndOnlyYou,
53 kProgramCloneChannel,
54 kProgramCount
55 };
56
57 DistrhoPluginCloneChannel();
58
59 protected:
60 // -------------------------------------------------------------------
61 // Information
62
63 const char* getLabel() const noexcept override
64 {
65 return "CloneChannel";
66 }
67
68 const char* getDescription() const override
69 {
70 return "A fairly standard waveshaping distortion plugin, made more interesting through the use of feedback to control the shaping.\n\
71 Can get pretty loud and obnoxious.";
72 }
73
74 const char* getMaker() const noexcept override
75 {
76 return "ndc Plugs";
77 }
78
79 const char* getHomePage() const override
80 {
81 return "https://prymula.ct8.pl";
82 }
83
84 const char* getLicense() const noexcept override
85 {
86 return "MIT";
87 }
88
89 uint32_t getVersion() const noexcept override
90 {
91 return d_version(0, 1, 0);
92 }
93
94 int64_t getUniqueId() const noexcept override
95 {
96 return d_cconst('C', 'l', 'C', 'h');
97
98 }
99
100 // -------------------------------------------------------------------
101 // Init
102
103 void initAudioPort(bool input, uint32_t index, AudioPort& port) override;
104 void initParameter(uint32_t index, Parameter& parameter) override;
105 void initProgramName(uint32_t index, String& programName) override;
106
107 // -------------------------------------------------------------------
108 // Internal data
109
110 float getParameterValue(uint32_t index) const override;
111 void setParameterValue(uint32_t index, float value) override;
112 void loadProgram(uint32_t index) override;
113
114 // -------------------------------------------------------------------
115 // Process
116
117 void run(const float** inputs, float** outputs, uint32_t frames) override;
118
119 // -------------------------------------------------------------------
120
121 private:
122 /// Array of our plugin's parameters.
123 float parameters[kParameterCount];
124
125 /// Waveshaper coefficient.
126 //float coeff;
127 /// Current wave value for the feedback.
128 //float wave;
129 /// Envelope value for the feedback.
130 // float env;
131 /// Footswitch envelope.
132 //float footEnv;
133
134 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoPluginCloneChannel)
135 };
136
137 // -----------------------------------------------------------------------
138
139 END_NAMESPACE_DISTRHO
140
141 #endif // DISTRHO_PLUGIN_CLONE_CHANNEL_HPP_INCLUDED