iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
IPlugWasmUI.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 _IPLUG_HYBRID_UI_
12#define _IPLUG_HYBRID_UI_
13
14#include "IPlugAPIBase.h"
15#include <emscripten/val.h>
16
17BEGIN_IPLUG_NAMESPACE
18
20struct InstanceInfo
21{};
22
32{
33public:
34 IPlugWasmUI(const InstanceInfo& info, const Config& config);
35
36 // IEditorDelegate - send to DSP via controller
37 void SendParameterValueFromUI(int paramIdx, double value) override;
38 void SendMidiMsgFromUI(const IMidiMsg& msg) override;
39 void SendSysexMsgFromUI(const ISysEx& msg) override;
40 void SendArbitraryMsgFromUI(int msgTag, int ctrlTag = kNoTag, int dataSize = 0, const void* pData = nullptr) override;
41
43 void OnIdle() override { SendDSPIdleTick(); }
44
45 // Called from JS when DSP sends messages (via controller)
46 // These are exposed via EMSCRIPTEN_BINDINGS
47
48private:
50 void SendDSPIdleTick();
51
52 WDL_String mControllerName;
53};
54
55IPlugWasmUI* MakePlug(const InstanceInfo& info);
56
57END_IPLUG_NAMESPACE
58
59#endif // _IPLUG_HYBRID_UI_
The base class of an IPlug plug-in, which interacts with the different plug-in APIs.
Definition: IPlugAPIBase.h:43
Hybrid UI class - IGraphics side for split DSP/UI builds.
Definition: IPlugWasmUI.h:32
void OnIdle() override
Plug-ins that override OnIdle() must call the base class!
Definition: IPlugWasmUI.h:43
Encapsulates a MIDI message and provides helper functions.
Definition: IPlugMidi.h:31
A struct for dealing with SysEx messages.
Definition: IPlugMidi.h:539