1 /* 2 * Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> 3 * (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com> 4 * 5 * This file is part of lsp-plugins 6 * Created on: 16 окт. 2015 г. 7 * 8 * lsp-plugins is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * any later version. 12 * 13 * lsp-plugins is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with lsp-plugins. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #include <core/types.h> 23 #include <core/windows.h> 24 #include <core/status.h> 25 26 #include <metadata/plugins.h> 27 #include <metadata/ports.h> 28 29 namespace lsp 30 { 31 //------------------------------------------------------------------------- 32 // Common port name definitions 33 const char PORT_NAME_BYPASS[] = "bypass"; 34 35 const char PORT_NAME_INPUT[] = "in"; 36 const char PORT_NAME_OUTPUT[] = "out"; 37 const char PORT_NAME_SIDECHAIN[] = "sc"; 38 39 const char PORT_NAME_INPUT_L[] = "in_l"; 40 const char PORT_NAME_INPUT_R[] = "in_r"; 41 const char PORT_NAME_OUTPUT_L[] = "out_l"; 42 const char PORT_NAME_OUTPUT_R[] = "out_r"; 43 const char PORT_NAME_SIDECHAIN_L[] = "sc_l"; 44 const char PORT_NAME_SIDECHAIN_R[] = "sc_r"; 45 46 // Port groups 47 const port_group_item_t mono_in_group_ports[] = 48 { 49 { PORT_NAME_INPUT, PGR_CENTER }, 50 { NULL } 51 }; 52 53 const port_group_item_t mono_sidechain_group_ports[] = 54 { 55 { PORT_NAME_SIDECHAIN, PGR_CENTER }, 56 { NULL } 57 }; 58 59 const port_group_item_t mono_out_group_ports[] = 60 { 61 { PORT_NAME_OUTPUT, PGR_CENTER }, 62 { NULL } 63 }; 64 65 const port_group_item_t stereo_in_group_ports[] = 66 { 67 { PORT_NAME_INPUT_L, PGR_LEFT }, 68 { PORT_NAME_INPUT_R, PGR_RIGHT }, 69 { NULL } 70 }; 71 72 const port_group_item_t stereo_sidechain_group_portss[] = 73 { 74 { PORT_NAME_SIDECHAIN_L, PGR_LEFT }, 75 { PORT_NAME_SIDECHAIN_R, PGR_RIGHT }, 76 { NULL } 77 }; 78 79 const port_group_item_t stereo_out_group_ports[] = 80 { 81 { PORT_NAME_OUTPUT_L, PGR_LEFT }, 82 { PORT_NAME_OUTPUT_R, PGR_RIGHT }, 83 { NULL } 84 }; 85 86 const port_group_t mono_plugin_port_groups[] = 87 { 88 MAIN_MONO_PORT_GROUPS, 89 PORT_GROUPS_END 90 }; 91 92 const port_group_t mono_plugin_sidechain_port_groups[] = 93 { 94 MAIN_SC_MONO_PORT_GROUPS, 95 PORT_GROUPS_END 96 }; 97 98 const port_group_t mono_to_stereo_plugin_port_groups[] = 99 { 100 MAIN_MONO2STEREO_PORT_GROUPS, 101 PORT_GROUPS_END 102 }; 103 104 const port_group_t stereo_plugin_port_groups[] = 105 { 106 MAIN_STEREO_PORT_GROUPS, 107 PORT_GROUPS_END 108 }; 109 110 const port_group_t stereo_plugin_sidechain_port_groups[] = 111 { 112 MAIN_SC_STEREO_PORT_GROUPS, 113 PORT_GROUPS_END 114 }; 115 116 //------------------------------------------------------------------------- 117 // Miscellaneous lists 118 const port_item_t file_channels[] = 119 { 120 { "1", NULL }, 121 { "2", NULL }, 122 { "3", NULL }, 123 { "4", NULL }, 124 { "5", NULL }, 125 { "6", NULL }, 126 { "7", NULL }, 127 { "8", NULL }, 128 { NULL, NULL } 129 }; 130 131 const port_item_t midi_channels[] = 132 { 133 { "01", NULL }, 134 { "02", NULL }, 135 { "03", NULL }, 136 { "04", NULL }, 137 { "05", NULL }, 138 { "06", NULL }, 139 { "07", NULL }, 140 { "08", NULL }, 141 { "09", NULL }, 142 { "10", NULL }, 143 { "11", NULL }, 144 { "12", NULL }, 145 { "13", NULL }, 146 { "14", NULL }, 147 { "15", NULL }, 148 { "16", NULL }, 149 { NULL, NULL } 150 }; 151 152 const port_item_t octaves[] = 153 { 154 { "-1", NULL }, 155 { "0", NULL }, 156 { "1", NULL }, 157 { "2", NULL }, 158 { "3", NULL }, 159 { "4", NULL }, 160 { "5", NULL }, 161 { "6", NULL }, 162 { "7", NULL }, 163 { "8", NULL }, 164 { "9", NULL }, 165 { NULL, NULL } 166 }; 167 168 const port_item_t notes[] = 169 { 170 { "C", NULL }, 171 { "C" UTF8_SHARP, NULL }, 172 { "D", NULL }, 173 { "D" UTF8_SHARP, NULL }, 174 { "E", NULL }, 175 { "F", NULL }, 176 { "F" UTF8_SHARP, NULL }, 177 { "G", NULL }, 178 { "G" UTF8_SHARP, NULL }, 179 { "A", NULL }, 180 { "A" UTF8_SHARP, NULL }, 181 { "B", NULL }, 182 { NULL, NULL } 183 }; 184 185 const port_item_t fft_windows[] = 186 { 187 { "Hann", "fft.wnd.hann" }, 188 { "Hamming", "fft.wnd.hamming" }, 189 { "Blackman", "fft.wnd.blackman" }, 190 { "Lanczos", "fft.wnd.lanczos" }, 191 { "Gaussian", "fft.wnd.gauss" }, 192 { "Poisson", "fft.wnd.poisson" }, 193 { "Parzen", "fft.wnd.parzen" }, 194 { "Tukey", "fft.wnd.tukey" }, 195 { "Welch", "fft.wnd.welch" }, 196 { "Nuttall", "fft.wnd.nuttall" }, 197 { "Blackman-Nuttall", "fft.wnd.blackman_nuttall" }, 198 { "Blackman-Harris", "fft.wnd.blackman_harris" }, 199 { "Hann-Poisson", "fft.wnd.hann_poisson" }, 200 { "Bartlett-Hann", "fft.wnd.bartlett_hann" }, 201 { "Bartlett-Fejer", "fft.wnd.bartlett_fejer" }, 202 { "Triangular", "fft.wnd.triangular" }, 203 { "Rectangular", "fft.wnd.rectangular" }, 204 { "Flat top", "fft.wnd.flat_top" }, 205 { "Cosine", "fft.wnd.cosine" }, 206 { "Squared Cosine", "fft.wnd.sqr_cosine" }, 207 { "Cubic", "fft.wnd.cubic" }, 208 { NULL, NULL } 209 }; 210 211 const port_item_t fft_envelopes[] = 212 { 213 { "Violet noise", "fft.env.violet" }, 214 { "Blue noise", "fft.env.blue" }, 215 { "White noise", "fft.env.white" }, 216 { "Pink noise", "fft.env.pink" }, 217 { "Brown noise", "fft.env.brown" }, 218 { "4.5 dB/oct fall-off", "fft.env.falloff_4_5db" }, 219 { "4.5 dB/oct raise", "fft.env.raise_4_5db" }, 220 { NULL, NULL } 221 }; 222 } 223 224 225 226