Skip to content

Commit

Permalink
Merge branch 'master' of github.com:libpd/libpd
Browse files Browse the repository at this point in the history
  • Loading branch information
danomatika committed Jan 10, 2018
2 parents 3c849b9 + 51878bf commit 115156a
Show file tree
Hide file tree
Showing 52 changed files with 3,324 additions and 1,176 deletions.
60 changes: 60 additions & 0 deletions csharp/Hooks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System;
using System.Runtime.InteropServices;

namespace LibPDBinding
{
public delegate void LibPDPrint (string text);
public delegate void LibPDBang (string recv);
public delegate void LibPDFloat (string recv, float x);
public delegate void LibPDSymbol (string recv, string sym);
public delegate void LibPDList (string recv, object[] args);
public delegate void LibPDMessage (string recv, string msg, object[] args);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDPrintHook ([In] [MarshalAs (UnmanagedType.LPStr)] string text);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDBangHook ([In] [MarshalAs (UnmanagedType.LPStr)] string recv);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDFloatHook ([In] [MarshalAs (UnmanagedType.LPStr)] string recv, float x);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDSymbolHook ([In] [MarshalAs (UnmanagedType.LPStr)] string recv, [In] [MarshalAs (UnmanagedType.LPStr)] string sym);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDListHook ([In] [MarshalAs (UnmanagedType.LPStr)] string recv, int argc, IntPtr argv);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDMessageHook ([In] [MarshalAs (UnmanagedType.LPStr)] string recv, [In] [MarshalAs (UnmanagedType.LPStr)] string msg, int argc, IntPtr argv);

// MIDI
public delegate void LibPDNoteOn (int channel, int pitch, int velocity);
public delegate void LibPDControlChange (int channel, int controller, int value);
public delegate void LibPDProgramChange (int channel, int value);
public delegate void LibPDPitchbend (int channel, int value);
public delegate void LibPDAftertouch (int channel, int value);
public delegate void LibPDPolyAftertouch (int channel, int pitch, int value);
public delegate void LibPDMidiByte (int port, int midiByte);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDNoteOnHook (int channel, int pitch, int velocity);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDControlChangeHook (int channel, int controller, int value);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDProgramChangeHook (int channel, int value);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDPitchbendHook (int channel, int value);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDAftertouchHook (int channel, int value);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDPolyAftertouchHook (int channel, int pitch, int value);

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
internal delegate void LibPDMidiByteHook (int port, int midiByte);
}
70 changes: 43 additions & 27 deletions csharp/LibPDBinding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,63 +40,79 @@
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<FileAlignment>4096</FileAlignment>
<DebugType>Full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<FileAlignment>4096</FileAlignment>
<DebugType>None</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<FileAlignment>4096</FileAlignment>
<DebugType>Full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<FileAlignment>4096</FileAlignment>
<DebugType>None</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Native\LibPDNativeMessaging.cs" />
<Compile Include="Native\LibPDNativeMethods.cs" />
<Compile Include="Native\LibPDNativeMidi.cs" />
<Compile Include="Hooks.cs" />
<Compile Include="LibPDNativeMessaging.cs" />
<Compile Include="LibPDNativeMethods.cs" />
<Compile Include="LibPDNativeMidi.cs" />
<Compile Include="Managed\Patch.cs" />
<Compile Include="Managed\PdProcessException.cs" />
<Compile Include="Managed\Pd.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Managed\PdArray.cs" />
<Compile Include="Managed\Events\PrintEventArgs.cs" />
<Compile Include="Managed\Events\SymbolEventArgs.cs" />
<Compile Include="Managed\Events\FloatEventArgs.cs" />
<Compile Include="Managed\Events\BangEventArgs.cs" />
<Compile Include="Managed\Events\ListEventArgs.cs" />
<Compile Include="Managed\Events\MessageEventArgs.cs" />
<Compile Include="Managed\Data\IAtom.cs" />
<Compile Include="Managed\Data\Symbol.cs" />
<Compile Include="Managed\Data\Float.cs" />
<Compile Include="Managed\Messaging.cs" />
<Compile Include="Managed\Utils\MessageInvocation.cs" />
<Compile Include="Managed\Data\Bang.cs" />
<Compile Include="Managed\Midi.cs" />
<Compile Include="Managed\Events\NoteOnEventArgs.cs" />
<Compile Include="Managed\Events\ProgramChangeEventArgs.cs" />
<Compile Include="Managed\Events\ControlChangeEventArgs.cs" />
<Compile Include="Managed\Events\PolyAftertouchEventArgs.cs" />
<Compile Include="Managed\Events\MidiByteEventArgs.cs" />
<Compile Include="Managed\Events\PitchbendEventArgs.cs" />
<Compile Include="Managed\Events\AftertouchEventArgs.cs" />
<Compile Include="Native\Defines.cs" />
<Compile Include="Native\Midi.cs" />
<Compile Include="Native\Messaging.cs" />
<Compile Include="Native\General.cs" />
<Compile Include="Native\Audio.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="LibPDBinding.nuspec">
<SubType>Designer</SubType>
</None>
<None Include="..\libs\mingw32\libwinpthread-1.dll">
<Link>libwinpthread-1.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand All @@ -105,10 +121,10 @@
<Link>libpdcsharp.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="app.config" />
<None Include="LibPDBinding.nuspec">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Folder Include="Managed\Utils\" />
<Folder Include="Managed\Data\" />
</ItemGroup>
</Project>
17 changes: 17 additions & 0 deletions csharp/LibPDBinding.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibPDBinding", "LibPDBinding.csproj", "{56E27175-956F-4182-8A74-5DE0CC1FCDC2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{56E27175-956F-4182-8A74-5DE0CC1FCDC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{56E27175-956F-4182-8A74-5DE0CC1FCDC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{56E27175-956F-4182-8A74-5DE0CC1FCDC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{56E27175-956F-4182-8A74-5DE0CC1FCDC2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions csharp/LibPDBinding.userprefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="app.config">
<Files>
<File FileName="app.config" Line="5" Column="23" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>
Loading

0 comments on commit 115156a

Please sign in to comment.