iPlug2 - C++ Audio Plug-in Framework
IPlugWeb.h
1 /*
2  ==============================================================================
3 
4  This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.
5 
6  See LICENSE.txt for more info.
7 
8  ==============================================================================
9 */
10 
11 #ifndef _IPLUGAPI_
12 #define _IPLUGAPI_
13 
14 #include "IPlugAPIBase.h"
15 #include <emscripten/val.h>
16 
17 BEGIN_IPLUG_NAMESPACE
18 
20 struct InstanceInfo
21 {};
22 
25 class IPlugWeb : public IPlugAPIBase
26 {
27 public:
28  IPlugWeb(const InstanceInfo& info, const Config& config);
29 
30  //IEditorDelegate
31  void SendParameterValueFromUI(int paramIdx, double value) override;
32 // void BeginInformHostOfParamChangeFromUI(int paramIdx) override; // TODO: as soon as we actually have a WAM host these are needed
33 // void EndInformHostOfParamChangeFromUI(int paramIdx) override; // TODO: as soon as we actually have a WAM host these are needed
34  void SendMidiMsgFromUI(const IMidiMsg& msg) override;
35  void SendSysexMsgFromUI(const ISysEx& msg) override;
36  void SendArbitraryMsgFromUI(int msgTag, int ctrlTag = kNoTag, int dataSize = 0, const void* pData = nullptr) override;
37 
39  virtual void OnIdle() override { SendDSPIdleTick(); }
40 private:
42  void SendDSPIdleTick();
43 
44  WDL_String mWAMCtrlrJSObjectName;
45  IByteChunk mSPVFUIBuf;
46  IByteChunk mSMMFUIBuf;
47  IByteChunk mSSMFUIBuf;
48  IByteChunk mSAMFUIBuf;
49 };
50 
51 IPlugWeb* MakePlug(const InstanceInfo& info);
52 
53 END_IPLUG_NAMESPACE
54 
55 #endif
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
Definition: IPlugAPIBase.h:42
Encapsulates a MIDI message and provides helper functions.
Definition: IPlugMidi.h:30
Manages a block of memory, for plug-in settings store/recall.
Definition: IPlugStructs.h:111
virtual void OnIdle() override
Plug-ins that override OnIdle() must call the base class!
Definition: IPlugWeb.h:39
This is used for the UI "editor" - controller side of a WAM or remote editors that communicate with d...
Definition: IPlugWeb.h:25
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
A struct for dealing with SysEx messages.
Definition: IPlugMidi.h:538