vst2sdk

A clean room reverse engineering project for the VST 2.x interface
Log | Files | Refs | README | LICENSE

vstmidi.h (2707B)


      1 /*
      2  * Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
      3  * Copyright 2024 Steinberg Media Technologies GmbH
      4  *
      5  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
      6  *
      7  * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
      8  *
      9  * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
     10  *
     11  * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
     12  *
     13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     14  */
     15 
     16 #pragma once
     17 #include "vsttypes.h"
     18 #include "vstversion.h"
     19 
     20 #pragma pack(push, 8)
     21 
     22 enum VstMidiEventFlags {
     23 	kVstMidiEventIsRealtime,
     24 };
     25 
     26 struct VstMidiEvent : VstEvent {
     27 	VstInt32 noteLength;
     28 	VstInt32 noteOffset;
     29 	char     midiData[4];
     30 	char     detune;
     31 	char     noteOffVelocity;
     32 	char     __unk00;
     33 	char     __unk01;
     34 };
     35 
     36 struct VstMidiSysexEvent : VstEvent {
     37 	VstInt32  dumpBytes;
     38 	VstIntPtr __unk00;
     39 	char*     sysexDump;
     40 	VstIntPtr __unk01;
     41 };
     42 
     43 struct MidiKeyName {
     44 	VstInt32 thisProgramIndex;
     45 	VstInt32 thisKeyNumber;
     46 	char     keyName[kVstMaxNameLen];
     47 	VstInt32 __unk00;
     48 	VstInt32 __unk01;
     49 };
     50 
     51 struct MidiProgramName {
     52 	VstInt32 thisProgramIndex;
     53 	char     name[kVstMaxNameLen];
     54 	VstInt32 midiProgram; // Could be swapped with thisProgramIndex?
     55 	VstInt32 midiBankMsb;
     56 	VstInt32 midiBankLsb;
     57 	VstInt32 __unk01;
     58 	VstInt32 parentCategoryIndex; // -1 appears to mean no category.
     59 	VstInt32 flags;
     60 };
     61 
     62 struct MidiProgramCategory {
     63 	VstInt32 thisCategoryIndex;
     64 	char     name[kVstMaxNameLen]; // Name guessed, but might be wrong. Doesn't seem to be used.
     65 	VstInt32 parentCategoryIndex;
     66 	VstInt32 flags;
     67 };
     68 
     69 #pragma pack(pop)