Manual build
This article describes how you can manually build the library from sources. Just follow the steps below:
- Select the branch you want to build sources from (master or develop).
- Download sources with any method you want:
- via
Code→Download ZIPbutton on GitHub, then extract archive; or git clone https://github.com/melanchall/drywetmidi.git; or- somehow else.
- via
- Download native binaries required to work with MIDI devices and default playback:
- for master branch take DryWetMIDI.<release_number>-bin-native.zip archive from Releases (<release_number> is the number of the library release you want to build);
- for develop branch go to https://dev.azure.com/Melanchall/DryWetMIDI/_build/latest?definitionId=6&branchName=develop and download DryWetMIDI.<release_number>-bin-native.zip from
Artifacts→Binaries.
- Extract the archive and place extracted files near
<your_local_folder_with_repository>\DryWetMidi\Melanchall.DryWetMidi.csproj. - Build the solution
<your_local_folder_with_repository>\Melanchall.DryWetMidi.sln.
For build you can use any tool you want: dotnet CLI, Visual Studio, Rider and so on. The library uses "new" csproj format so your build tools should be modern enough.
master branch contains code that the library releases built on. develop one is for current development so if you need the latest code, use this branch.
Build configuration
There are four build configurations available:
Debug– for development, debugging and testing. The library is not optimized and contains all debug information. Traces are generated.Release– for production. The library is optimized and does not contain debug information. It's the configuration used to build official releases. Traces are disabled.ReleaseTest– for running tests in release mode. The library is optimized and does not contains debug information. Additional tests are enabled in this configuration. Use it to run tests without generating additional files on your machine. Traces are disabled.ReleaseTestFull– for running tests in release mode with gathering additional information (playback traces, for example). The library is optimized and does not contain debug information. Traces are generated.
Traces
When you build the library in Debug or ReleaseTestFull configuration and run tests that use playback functionality, the following happens:
PlaybackTracesfolder is created in the temp folder of your machine (you can get the path to it by callingPath.GetTempPath()method);- inside the folder log files are created that contain information about playback events (when playback started, when it stopped, what events were sent to the output device and when they were sent, etc.);
- inside the folder png files are created that contain timelines of playback events along with MIDI clock ticks times and delays.