Skip to content

Commit

Permalink
Merge pull request #311 from microsoft/pete-dev
Browse files Browse the repository at this point in the history
Sync up Main
  • Loading branch information
Psychlist1972 authored Apr 16, 2024
2 parents faa9327 + 5f70948 commit a6272ba
Show file tree
Hide file tree
Showing 209 changed files with 6,603 additions and 1,505 deletions.
237 changes: 66 additions & 171 deletions build/build.cake

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
File renamed without changes.
4 changes: 2 additions & 2 deletions build/staging/version/BundleInfo.wxi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Include>
<?define SetupVersionName="Developer Preview 5" ?>
<?define SetupVersionNumber="1.0.24066.2126" ?>
<?define SetupVersionName="Developer Preview 6 arm64" ?>
<?define SetupVersionNumber="1.0.24107.1653" ?>
</Include>
34 changes: 34 additions & 0 deletions docs/data-translation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: page
title: Data Translation
parent: Windows Midi Services
---

# Data Translation

In general, Windows MIDI Services translates MIDI messages only when it has to. This translation happens in two different places, depending upon the driver in use.

Internally, the MIDI service moves messages around in the UMP format. This enables a standard format for message scheduling and processing. In addition, the `Windows.Devices.Midi2` API treats all messages as UMP, including ones to/from devices which were bytestream MIDI 1.0 format.

## Translation Scenarios involving data format changes

Windows MIDI Services supports MIDI 1.0 and MIDI 2.0 devices.

| Device | Driver | Windows.Devices.Midi2 | Older MIDI 1.0 APIs |
| ------------------- | --------------------- | -------------------------- | ------------------------ |
| USB MIDI 1.0 Device | MIDI 2.0 Class Driver | To/From UMP by driver | To/from byte stream by service |
| USB MIDI 1.0 Device | Older MIDI 1.0 Class Driver | To/From UMP by service | To/from byte stream by service |
| USB MIDI 1.0 Device | Vendor MIDI 1.0 driver | To/From UMP by service | To/From byte stream by service |
| USB MIDI 2.0 Device | MIDI 2.0 Class Driver | No translation required | To/from byte stream by service |
| Any other MIDI 2.0 Device | (no driver. ex Virtual, Network 2.0) | No translation required | To/from byte stream by service |
| Any other MIDI 1.0 Device | (no driver. ex BLE) | To/From UMP by service | To/From byte stream by service |

## Translation between Message type 2 (MIDI 1.0 Channel Voice) and Message type 4 (MIDI 2.0 Channel Voice)

Currently, Windows MIDI Services does not translate messages based on negotiated protocol or Function Block declared protocol. Instead, for native UMP endpoints, applications should send the correct protocol messages (message type 2 for MIDI 1.0-compatible and message type 4 for MIDI 2.0-compatible messages) based upon the information provided by the `EndpointDeviceInformation` [and related enumeration types](developer-docs\Windows.Devices.Midi2\enumeration\README.md). In addition, for native bytestream endpoints, applications should send the appropriate MIDI 1.0 messages in UMP.

## Resources for translation

Windows MIDI Services makes use of publicly-available open source libraries for protocol and data format translation.

* [midi2.dev](https://midi2.dev) contains a number of libraries which include translation.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ While we're in developer preview, get started by downloading and installing the

These are the updated MIDI 2.0 specifications which apply to this project today.

* [MIDI 2.0 UMP Specifications](https://midi.org/specifications)
* [MIDI 2.0 UMP (and other) Specifications](https://midi.org/specs)

16 changes: 8 additions & 8 deletions samples/cpp-winrt/api-client-basics/api-client-basics.vcxproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
Expand Down Expand Up @@ -149,16 +149,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions samples/cpp-winrt/api-client-basics/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
<package id="Windows.Devices.Midi2" version="1.0.0-preview.5-0185" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Windows.Devices.Midi2" version="1.0.0-preview.6-0190" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
Expand Down Expand Up @@ -149,16 +149,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions samples/cpp-winrt/api-client-send-speed/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
<package id="Windows.Devices.Midi2" version="1.0.0-preview.5-0185" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Windows.Devices.Midi2" version="1.0.0-preview.6-0190" targetFramework="native" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup Label="Globals">
<CppWinRTOptimized>true</CppWinRTOptimized>
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
Expand Down Expand Up @@ -149,16 +149,16 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets')" />
<Import Project="packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets" Condition="Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240111.5\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.props'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.5-0185\build\native\Windows.Devices.Midi2.targets'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.props'))" />
<Error Condition="!Exists('packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Windows.Devices.Midi2.1.0.0-preview.6-0190\build\native\Windows.Devices.Midi2.targets'))" />
</Target>
</Project>
4 changes: 2 additions & 2 deletions samples/cpp-winrt/api-enum-endpoints/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.240111.5" targetFramework="native" />
<package id="Windows.Devices.Midi2" version="1.0.0-preview.5-0185" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" />
<package id="Windows.Devices.Midi2" version="1.0.0-preview.6-0190" targetFramework="native" />
</packages>
Loading

0 comments on commit a6272ba

Please sign in to comment.