1 /* 2 * mdaDetuneProcessor.h 3 * mda-vst3 4 * 5 * Created by Arne Scheffler on 6/14/08. 6 * 7 * mda VST Plug-ins 8 * 9 * Copyright (c) 2008 Paul Kellett 10 * 11 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 * 15 */ 16 17 #pragma once 18 19 #include "mdaBaseProcessor.h" 20 21 namespace Steinberg { 22 namespace Vst { 23 namespace mda { 24 25 //----------------------------------------------------------------------------- 26 class DetuneProcessor : public BaseProcessor 27 { 28 public: 29 DetuneProcessor (); 30 ~DetuneProcessor (); 31 getVst2UniqueId()32 int32 getVst2UniqueId () const SMTG_OVERRIDE { return 'mdat'; } 33 34 tresult PLUGIN_API initialize (FUnknown* context) SMTG_OVERRIDE; 35 tresult PLUGIN_API terminate () SMTG_OVERRIDE; 36 tresult PLUGIN_API setActive (TBool state) SMTG_OVERRIDE; 37 38 void doProcessing (ProcessData& data) SMTG_OVERRIDE; 39 40 //----------------------------------------------------------------------------- createInstance(void *)41 static FUnknown* createInstance (void*) { return (IAudioProcessor*)new DetuneProcessor; } 42 static FUID uid; 43 //----------------------------------------------------------------------------- 44 protected: 45 void recalculate () SMTG_OVERRIDE; 46 47 float *buf, *win; //buffer, window 48 int32 buflen; //buffer length 49 float bufres; //buffer resolution display 50 float semi; //detune display 51 int32 pos0; //buffer input 52 float pos1, dpos1; //buffer output, rate 53 float pos2, dpos2; //downwards shift 54 float wet, dry; //ouput levels 55 }; 56 57 }}} // namespaces 58