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 #ifndef METADATA_PHASE_DETECTOR_H_ 23 #define METADATA_PHASE_DETECTOR_H_ 24 25 namespace lsp 26 { 27 //------------------------------------------------------------------------- 28 // Phase detector metadata 29 struct phase_detector_metadata 30 { 31 static const plugin_metadata_t metadata; 32 33 static const float DETECT_TIME_MIN = 1.0f; 34 static const float DETECT_TIME_MAX = 50.0f; 35 static const float DETECT_TIME_DFL = 10.0f; 36 static const float DETECT_TIME_STEP = 0.0025f; 37 static const float DETECT_TIME_RANGE_MAX = 100.0f; 38 static const float DETECT_TIME_RANGE_MIN = - 100.0f; 39 40 static const size_t MESH_POINTS = 256; 41 42 static const float REACT_TIME_MIN = 0.000; 43 static const float REACT_TIME_MAX = 10.000; 44 static const float REACT_TIME_DFL = 1.000; 45 static const float REACT_TIME_STEP = 0.0025; 46 47 static const float SELECTOR_MIN = -100.0f; 48 static const float SELECTOR_MAX = 100.0f; 49 static const float SELECTOR_DFL = 0.0f; 50 static const float SELECTOR_STEP = 0.1f; 51 52 static const float SAMPLES_MIN = - 50.0f /* DETECT_TIME_MAX [ms] */ * 0.001 /* [s/ms] */ * MAX_SAMPLE_RATE /* [ samples / s ] */; 53 static const float SAMPLES_MAX = + 50.0f /* DETECT_TIME_MAX [ms] */ * 0.001 /* [s/ms] */ * MAX_SAMPLE_RATE /* [ samples / s ] */; 54 static const float DISTANCE_MIN = - 50.0f /* DETECT_TIME_MAX [ms] */ * 0.001 /* [s/ms] */ * MAX_SOUND_SPEED /* [ m / s] */ * 100 /* c / m */; 55 static const float DISTANCE_MAX = + 50.0f /* DETECT_TIME_MAX [ms] */ * 0.001 /* [s/ms] */ * MAX_SOUND_SPEED /* [ m / s] */ * 100 /* c / m */; 56 static const float TIME_MIN = - 50.0f /* DETECT_TIME_MAX [ms] */; 57 static const float TIME_MAX = + 50.0f /* DETECT_TIME_MAX [ms] */; 58 59 enum ports 60 { 61 // Input Audio 62 IN_A, IN_B, 63 64 // Output Audio 65 OUT_A, OUT_B, 66 67 // Input controls 68 BYPASS, RESET, 69 TIME, REACTIVITY, SELECTOR, 70 71 // Output controls/meters 72 BEST_TIME, BEST_SAMPLES, BEST_DISTANCE, BEST_VALUE, 73 SEL_TIME, SEL_SAMPLES, SEL_DISTANCE, SEL_VALUE, 74 WORST_TIME, WORST_SAMPLES, WORST_DISTANCE, WORST_VALUE, 75 FUNCTION 76 }; 77 }; 78 } 79 80 #endif /* METADATA_PHASE_DETECTOR_H_ */ 81