1 //------------------------------------------------------------------------ 2 // Project : VST SDK 3 // 4 // Category : Interfaces 5 // Filename : pluginterfaces/vst/ivstmidilearn.h 6 // Created by : Steinberg, 11/2018 7 // Description : VST MIDI Learn 8 // 9 //----------------------------------------------------------------------------- 10 // This file is part of a Steinberg SDK. It is subject to the license terms 11 // in the LICENSE file found in the top-level directory of this distribution 12 // and at www.steinberg.net/sdklicenses. 13 // No part of the SDK, including this file, may be copied, modified, propagated, 14 // or distributed except according to the terms contained in the LICENSE file. 15 //----------------------------------------------------------------------------- 16 17 #pragma once 18 19 #include "pluginterfaces/base/funknown.h" 20 #include "pluginterfaces/vst/vsttypes.h" 21 22 //------------------------------------------------------------------------ 23 namespace Steinberg { 24 namespace Vst { 25 26 //------------------------------------------------------------------------ 27 /** MIDI Learn Interface. 28 \ingroup vstIPlug vst3612 29 - [plug imp] 30 - [extends IEditController] 31 - [released: 3.6.12] 32 - [optional] 33 34 If this interface is implemented by the edit controller, the host will call this method whenever 35 there is live MIDI-CC input for the plug-in. This way the plug-in can change it's MIDI-CC parameter 36 mapping and inform the host via the IComponentHandler::restartComponent with the 37 kMidiCCAssignmentChanged flag. 38 Use this if you want to implement custom MIDI-Learn functionality in your plug-in. 39 */ 40 //------------------------------------------------------------------------ 41 class IMidiLearn : public FUnknown 42 { 43 public: 44 /** Called on live input MIDI-CC change associated to a given bus index and MIDI channel */ 45 virtual tresult PLUGIN_API onLiveMIDIControllerInput (int32 busIndex, int16 channel, 46 CtrlNumber midiCC) = 0; 47 48 //------------------------------------------------------------------------ 49 static const FUID iid; 50 }; 51 52 DECLARE_CLASS_IID (IMidiLearn, 0x6B2449CC, 0x419740B5, 0xAB3C79DA, 0xC5FE5C86) 53 54 55 //------------------------------------------------------------------------ 56 } // namespace Vst 57 } // namespace Steinberg 58