Overte C++ Documentation
MIDIEvent.h
1 //
2 // MIDIEvent.h
3 // libraries/script-engine/src
4 //
5 // Created by Stephen Birarda on 2014-06-30.
6 // Copyright 2014 High Fidelity, Inc.
7 // Copyright 2023 Overte e.V.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 // SPDX-License-Identifier: Apache-2.0
12 //
13 
16 
17 #ifndef hifi_MIDIEvent_h
18 #define hifi_MIDIEvent_h
19 
20 #include "ScriptValue.h"
21 
22 class ScriptEngine;
23 
25 class MIDIEvent {
26 public:
27  double deltaTime;
28  unsigned int type;
29  unsigned int data1;
30  unsigned int data2;
31 };
32 
33 Q_DECLARE_METATYPE(MIDIEvent)
34 
35 void registerMIDIMetaTypes(ScriptEngine* engine);
36 
37 ScriptValue midiEventToScriptValue(ScriptEngine* engine, const MIDIEvent& event);
38 bool midiEventFromScriptValue(const ScriptValue &object, MIDIEvent& event);
39 
40 #endif // hifi_MIDIEvent_h
41 
Represents a MIDI protocol event to the scripting engine.
Definition: MIDIEvent.h:25
Provides an engine-independent interface for a scripting engine.
Definition: ScriptEngine.h:93
[ScriptInterface] Provides an engine-independent interface for QScriptValue
Definition: ScriptValue.h:40