Skip to content

Commit

Permalink
herp
Browse files Browse the repository at this point in the history
  • Loading branch information
Brad Miller committed Apr 16, 2012
1 parent 21aee37 commit 9ec7c51
Show file tree
Hide file tree
Showing 59 changed files with 14,736 additions and 0 deletions.
502 changes: 502 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
VST DirectMusic/WinMM Driver
********************************

First-time Installation
-----------------------

Simply run the installer.


Upgrading
---------

Run the downloaded installer. It will ask you to remove old versions.
Only then, you can install a upgraded version.


License
-------

Copyright (C) 2011 Chris Moeller, Brad Miller

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 changes: 20 additions & 0 deletions driver/driver.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "driver", "driver.vcxproj", "{BD7491C1-986F-4D48-99E6-018AB4ACF801}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BD7491C1-986F-4D48-99E6-018AB4ACF801}.Debug|Win32.ActiveCfg = Debug|Win32
{BD7491C1-986F-4D48-99E6-018AB4ACF801}.Debug|Win32.Build.0 = Debug|Win32
{BD7491C1-986F-4D48-99E6-018AB4ACF801}.Release|Win32.ActiveCfg = Release|Win32
{BD7491C1-986F-4D48-99E6-018AB4ACF801}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
223 changes: 223 additions & 0 deletions driver/driver.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>driver</ProjectName>
<ProjectGuid>{BD7491C1-986F-4D48-99E6-018AB4ACF801}</ProjectGuid>
<RootNamespace>vst_win32drv</RootNamespace>
<Keyword>AtlProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>Static</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<UseOfAtl>Static</UseOfAtl>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(DXSDK_DIR)lib\x86;$(LibraryPath)</LibraryPath>
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(DXSDK_DIR)lib\x86;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<CustomBuildStep>
<Message>
</Message>
<Command>
</Command>
<Outputs>
</Outputs>
</CustomBuildStep>
<Midl>
<TypeLibraryName>.\Debug/vst_win32drv.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_USRDLL;I_ASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Debug/vst_win32drv.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
<ObjectFileName>.\Debug/</ObjectFileName>
<ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<CompileAs>Default</CompileAs>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>dxguid.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>LinkVerboseLib</ShowProgress>
<OutputFile>out\vstmididrv.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>.\src\vst_win32drv.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>.\Debug/vstdrv.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>.\Debug/vst_win32drv.lib</ImportLibrary>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<CustomBuildStep>
<Message>
</Message>
<Command>
</Command>
<Outputs>
</Outputs>
</CustomBuildStep>
<Midl>
<TypeLibraryName>.\Release/vst_win32drv.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_USRDLL;I_ASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>.\Release/vst_win32drv.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\Release/</AssemblerListingLocation>
<ObjectFileName>.\Release/</ObjectFileName>
<ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<CompileAs>Default</CompileAs>
<FloatingPointModel>Fast</FloatingPointModel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>dxguid.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>LinkVerboseLib</ShowProgress>
<OutputFile>out\vstmididrv.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ModuleDefinitionFile>.\src\vst_win32drv.def</ModuleDefinitionFile>
<ProgramDatabaseFile>.\Release/vstdrv.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>.\Release/vst_win32drv.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\VSTDriver.cpp" />
<ClCompile Include="src\MidiEvent.cpp" />
<ClCompile Include="src\VSTDirectMusicSynth.cpp" />
<ClCompile Include="src\vst_win32drv.cpp" />
<ClCompile Include="src\vst_winmm.cpp" />
<ClCompile Include="src\stdafx.cpp" />
<ClCompile Include="vst_win32drv_i.c" />
</ItemGroup>
<ItemGroup>
<None Include="src\vst_win32drv.def" />
<None Include="src\VSTDirectMusicSynth.rgs" />
<None Include="src\vst_win32drv.rgs" />
</ItemGroup>
<ItemGroup>
<Midl Include="src\vst_win32drv.idl">
<GenerateStublessProxies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateStublessProxies>
<TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\vst_win32drv.tlb</TypeLibraryName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vst_win32drv.h</HeaderFileName>
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vst_win32drv_i.c</InterfaceIdentifierFileName>
<GenerateStublessProxies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateStublessProxies>
<TypeLibraryName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\vst_win32drv.tlb</TypeLibraryName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vst_win32drv.h</HeaderFileName>
<InterfaceIdentifierFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vst_win32drv_i.c</InterfaceIdentifierFileName>
</Midl>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\VSTDriver.h" />
<ClInclude Include="src\MidiEvent.h" />
<ClInclude Include="src\VSTDirectMusicSynth.h" />
<ClInclude Include="src\Resource.h" />
<ClInclude Include="src\stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\vst_win32drv.rc">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OUTDIR)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OUTDIR)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
65 changes: 65 additions & 0 deletions driver/src/MidiEvent.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* Copyright (C) 2003, 2004, 2005 Dean Beeler, Jerome Fisher
* Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include <memory.h>

#include "MidiEvent.h"

MidiEvent::MidiEvent() {
sysexInfo = 0;
nxtEvent = 0;
};

MidiEvent::~MidiEvent() {
if (sysexInfo != 0) {
delete[] sysexInfo;
}
}

MidiEvent *MidiEvent::getNext() {
return nxtEvent;
}

long long MidiEvent::getTime() {
return timemarker;
}

MidiEventType MidiEvent::getType() {
return type;
}

bool MidiEvent::isFinal() {
return nxtEvent == 0;
}

void MidiEvent::chainEvent(MidiEvent *newEvent) {
nxtEvent = newEvent;
}

void MidiEvent::assignSysex(const unsigned char *Sysex, long len, long long setTime) {
sysexInfo = new unsigned char[len];
memcpy(sysexInfo, Sysex, len);
type = SysexData;
sysexLen = len;
timemarker = setTime;
}

void MidiEvent::assignMsg(long Msg, long long setTime) {
type = ShortMsg;
midiMsg = Msg;
timemarker = setTime;
}
49 changes: 49 additions & 0 deletions driver/src/MidiEvent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* Copyright (C) 2003, 2004, 2005 Dean Beeler, Jerome Fisher
* Copyright (C) 2011 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __VSTMIDIDRV_MIDIEVENT_H__
#define __VSTMIDIDRV_MIDIEVENT_H__

enum MidiEventType {
ShortMsg,
SysexData
};

class MidiEvent {
private:
long long timemarker;
MidiEventType type;
MidiEvent *nxtEvent;

public:
unsigned char *sysexInfo;
long sysexLen;
long midiMsg;

MidiEvent();
~MidiEvent();

long long getTime(void);
MidiEventType getType(void);
MidiEvent *getNext(void);
bool isFinal();
void chainEvent(MidiEvent *newEvent);
void assignSysex(const unsigned char *Sysex, long len, long long setTime);
void assignMsg(long Msg, long long setTime);
};

#endif
Loading

0 comments on commit 9ec7c51

Please sign in to comment.