-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from microsoft/pete-dev
Prep for dev sdk preview release 2
- Loading branch information
Showing
85 changed files
with
777 additions
and
1,001 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
get-started/midi-developers/app-developers/docs/building-midi-sdk.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Building the MIDI SDK for yourself | ||
|
||
The Windows MIDI Services SDK is built using C++/WinRT. WinRT, a requirement for modern APIs on Windows, enables desktop applications, regardless of language, to be able to use APIs, SDKs, etc. that we create. The older tools, C++/CX, are arguably simpler to implement in, but because they include proprietary extensions to C++, we decided to go with standards-based C++/WinRT instead. | ||
|
||
Normally, you'll just one of the SDK packages. However, if you wish to build it for yourself, this document explains how. | ||
|
||
## Prerequisites | ||
|
||
To build the SDK you need to use Visual Studio 2022 and C++/WinRT | ||
|
||
* Visual Studio 2022 if you are using Visual Studio | ||
* Windows SDK 10.0.20348 (Install with Visual Studio) | ||
* Windows 10 22H2, or preferably, the latest version of Windows 11. Our development machines are all running Windows 11. | ||
* C++ 17 (C++ 20 may work, C++ 14 will not) | ||
* Boost 1.82 or higher installed in %BOOST_ROOT% (and that environment variable set, of course) | ||
* The same environment variable as $(BOOST_ROOT) needs to be in your VC++ include location for all build configurations. | ||
* C++/WinRT will be installed via NuGet | ||
|
||
## Folder Structure | ||
|
||
Here's the structure on my developer PC. | ||
|
||
`github\microsoft\midi` is the root of the repo. Inside that, the src, get-started, etc. folders from GitHub. | ||
|
||
`github\microsoft\midi\publish` is a folder that doesn't appear in the repo, but is referenced by the NuGet build. This is where the NuGet packages end up | ||
|
||
`github\microsoft\midi\src\app-dev-sdk\_build` is the build target location for SDK projects. This is where the NuGet packaging steps expect to find the binaries for packaging. | ||
|
||
## Building | ||
|
||
The midi-sdk solution is the main solution for building, well, the MIDI SDK. It includes the correct `runsettings` for tests, and the `Directory.Build.props` files for the build layout. | ||
|
||
For the native projects, note that 32 Bit Arm and x86 (32 bit) architectures are not supported by this project. You may build for x64, Arm64, (and in the future, Arm64EC). We are intentionally not building for 32 bit architectures here. | ||
|
||
NuGet packages are set to pick up only Release output, not Debug. To get it all going, do a batch build of the supported architectures. | ||
|
||
## Tests | ||
|
||
To run the Catch2 unit tests, you'll need the Catch2 Test Adapter VSIX installed. It's called `Test Adapter for Catch2` and is available in the Visual Studio Marketplace. | ||
|
||
Open the Test Explorer and then build the full solution if tests do not appear in it. You can then execute tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
get-started/midi-developers/app-developers/docs/general-info.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Documentation | ||
|
||
API and other documentation which will eventually be used in either the Microsoft.com docs portal, or in a github site. Format is markdown. Work on the docs has not really started. We will lean heavily on the samples to help wth explanations. | ||
|
||
## Some basics | ||
|
||
The API, SDK, tools, service, drivers, and more are being developed with some guidelines about how apps could/should interact with MIDI on Windows. In no specific order or organization, here's a high-level look at what we plan to do here. In most cases, the MIDI API provides raw, and not easily used information, but the MIDI SDK provides everything an application needs to use the API in a way compatible with the MIDI Association MIDI 2.0 Implementation Guide. | ||
|
||
Both the MIDI API and the SDK are Windows Runtime (WinRT) components. | ||
|
||
* [Using WinRT Components from Desktop Applications](https://blogs.windows.com/windowsdeveloper/2019/04/30/enhancing-non-packaged-desktop-apps-using-windows-runtime-components/) | ||
|
||
### Enumeration | ||
|
||
MIDI 2.0 enumeration involves both physically connected devices discoverable through PnP, as well as in-protocol information. | ||
|
||
#### Enumerate UMP Endpoints | ||
|
||
Windows.Devices.Enumeration provides the classes required to enumerate MIDI devices, and to watch for add/removal of devices, as it. We're building upon that and use the SDK to interpret the enumerated information as well as provide additional information about the devices. | ||
|
||
#### Get Group Block or Function Block information for a UMP Endpoint | ||
|
||
Function blocks could be requested through in-protocol UMP messages. Our intent is that applications not do this themselves, but that they use an SDK call to request this information. That gives us flexibility in how we can provide this information for older devices, and also reduce the number of Function Block information request calls. | ||
|
||
Group Block information is provided by the USB driver, and passed through the API to the SDK. | ||
|
||
### Names and Formatting | ||
|
||
MIDI 2.0 naming of entities is more complex than it was with MIDI 1.0. Names can be sourced from different places through both enumeration and in-protocol messages. We would like to keep names consistent across applications and Windows. To that end, the SDK includes code to provide formatted, and when appropriate, localized names for entities. | ||
|
||
#### Format Function Block, Group Block, UMP Endpoint names | ||
|
||
The SDK will provide properties with this information formatted per the implementation guide. | ||
|
||
#### Format Group and Channel names | ||
|
||
The SDK has calls to enumerate Groups and Channels using data provided by MIDI 2.0 and MIDI CI. The results are formatted as per the MIDI 2.0 implementation guide and with the correct number transition (0-15 indexes changed to 1-16 for display, Channel names listed when available, Function Block names included with the group, etc.) | ||
|
||
### USB MIDI 2.0 UMP Endpoints | ||
|
||
#### Support more than one UMP Endpoint on a MIDI 2.0 USB device | ||
|
||
We recommend you use a separate MIDI interface for each UMP Endpoint exposed by a USB device. This makes it easier to correctly association group blocks and with the resulting UMP Endpoints. Our driver does not support multiple UMP Endpoints on a single interface. | ||
|
||
#### Use both Function Blocks and Group Blocks | ||
|
||
The MIDI Association implementation guide has information on using both function blocks and group blocks together. These need to be logically consistent and not overlap in incompatible ways. This is especially important for how macOS uses these entities, so we don't want to have them represented differently on the operating systems. |
Oops, something went wrong.