Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,13 @@
"type": "string",
"enum": [
"BuildAndPublishAll",
"T_BuildAndPackageElectronProjection",
"T_BuildAndPackAllAppSDKs",
"T_BuildAppSdkRuntimeAndToolsInstaller",
"T_BuildAppSDKToolsAndTests",
"T_BuildConsoleApp",
"T_BuildCppSamples",
"T_BuildCSharpSamples",
"T_BuildPowerShellProjection",
"T_BuildSettingsApp",
"T_BuildUserToolsSharedComponents",
"T_CopySharedDesignAssets",
"T_BuildServiceAndPlugins",
"T_BuildServiceAndPluginsInstaller",
"T_CreateVersionIncludes",
"T_Prerequisites",
"T_ZipPowershellDevUtilities",
"T_ZipSamples"
"T_ZipServicePdbs",
"T_ZipWdmaud2"
]
},
"Verbosity": {
Expand Down
6 changes: 3 additions & 3 deletions build/staging/version/BundleInfo.wxi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Include>
<?define SetupVersionName="SDK Release Candidate 1 Arm64" ?>
<?define SetupVersionNumber="1.0.14-rc.1.213" ?>
<?define MidiSdkAndToolsVersion="1.0.14-rc.1.213" ?>
<?define SetupVersionName="Service Preview 14 Arm64" ?>
<?define SetupVersionNumber="1.0.15-preview.14.73" ?>
<?define MidiSdkAndToolsVersion="1.0.15-preview.14.73" ?>
</Include>
16 changes: 8 additions & 8 deletions build/staging/version/WindowsMidiServicesVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ public static class MidiNuGetBuildInformation
{
public const bool IsPreview = true;
public const string Source = "GitHub Preview";
public const string BuildDate = "2026-01-18";
public const string Name = "SDK Release Candidate 1";
public const string BuildFullVersion = "1.0.14-rc.1.213";
public const string BuildDate = "2026-01-19";
public const string Name = "Service Preview 14";
public const string BuildFullVersion = "1.0.15-preview.14.73";
public const ushort VersionMajor = 1;
public const ushort VersionMinor = 0;
public const ushort VersionPatch = 14;
public const ushort VersionBuildNumber = 213;
public const string Preview = "rc.1.213";
public const string AssemblyFullVersion = "1.0.14.213";
public const string FileFullVersion = "1.0.14.213";
public const ushort VersionPatch = 15;
public const ushort VersionBuildNumber = 73;
public const string Preview = "preview.14.73";
public const string AssemblyFullVersion = "1.0.15.73";
public const string FileFullVersion = "1.0.15.73";
}
}
14 changes: 7 additions & 7 deletions build/staging/version/WindowsMidiServicesVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_IS_PREVIEW true
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_SOURCE L"GitHub Preview"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_DATE L"2026-01-18"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_NAME L"SDK Release Candidate 1"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_FULL L"1.0.14-rc.1.213"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_DATE L"2026-01-19"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_NAME L"Service Preview 14"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_FULL L"1.0.15-preview.14.73"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_MAJOR 1
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_MINOR 0
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_PATCH 14
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_BUILD_NUMBER 213
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_PREVIEW L"rc.1.213"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_FILE L"1.0.14.213"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_PATCH 15
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_BUILD_NUMBER 73
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_PREVIEW L"preview.14.73"
#define WINDOWS_MIDI_SERVICES_NUGET_BUILD_VERSION_FILE L"1.0.15.73"

#endif
38 changes: 38 additions & 0 deletions src/api/Test/Midi2.SharedIncludes.unittests/UmpIteratorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,42 @@ void UmpIteratorTests::TestCopyWordsToVector()
VERIFY_ARE_EQUAL(words[i], destination[i]);
}

}


void UmpIteratorTests::TestGetMessageWordsByIndex()
{
std::vector<uint32_t> destination{};

uint32_t words[] =
{
0x20000001,
0x40000001, 0x01234567,
0xF0000001, 0x18675309, 0x01010101, 0x02020202,
0x40000001, 0x01234567,
0x10000001,
0x00000000,
};

std::vector<uint32_t> readWords{};

UmpBufferIterator bufferIterator(words, ARRAYSIZE(words));
for (auto it = bufferIterator.begin(); it < bufferIterator.end(); ++it)
{
uint8_t currentMessageWordCount = it.CurrentMessageWordCount();

for (uint8_t i = 0; i < currentMessageWordCount; i++)
{
readWords.push_back(it.GetCurrentMessageWord(i));
}
}

VERIFY_ARE_EQUAL(ARRAYSIZE(words), readWords.size());

// now, check values
for (uint32_t i = 0; i < ARRAYSIZE(words); i++)
{
VERIFY_ARE_EQUAL(words[i], readWords[i]);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class UmpIteratorTests
TEST_METHOD(TestValidateCompleteBufferHasCompleteUmps);
TEST_METHOD(TestGetMessageType);
TEST_METHOD(TestCopyWordsToVector);
TEST_METHOD(TestGetMessageWordsByIndex);



private:
Expand Down
199 changes: 194 additions & 5 deletions src/api/Test/Midi2.Transform.unittests/MidiUMPToBSTransformTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
_Use_decl_annotations_
void MidiUMPToBSTransformTests::InternalTestMessages(
std::vector<uint32_t> const words,
std::vector<uint8_t> const expectedBytes
std::vector<uint8_t> const expectedBytes,
std::vector<uint8_t> const expectedGroups
)
{
wil::com_ptr_nothrow<IMidiTransform> transformLib;
Expand Down Expand Up @@ -48,13 +49,38 @@ void MidiUMPToBSTransformTests::InternalTestMessages(

// set the callback

m_MidiInCallback = [&](PVOID payload, UINT payloadSize, LONGLONG /*payloadPosition*/, LONGLONG)
byte lastGroupIndex{ 127 }; // an invalid group index
int32_t currentGroupArrayIndex{ -1 };

m_MidiInCallback = [&](PVOID payload, UINT payloadSize, LONGLONG /*payloadPosition*/, LONGLONG context)
{
//std::cout << "callback" << std::endl;

auto receivedBytes = static_cast<uint8_t*>(payload);

std::cout << "message received:" << std::endl;
std::cout << "message received for group " << context << ":" << std::endl;

// validate the group index
if (expectedGroups.size() > 0)
{
// group index has changed
if (lastGroupIndex != context)
{
currentGroupArrayIndex++;

// make sure we're not out of range on the group indexes
if (currentGroupArrayIndex >= expectedGroups.size())
{
std::cout << "More group indexes reported than expected" << std::endl;
VERIFY_FAIL();
}

lastGroupIndex = expectedGroups[currentGroupArrayIndex];
}

VERIFY_ARE_EQUAL(context, lastGroupIndex);
}


for (uint32_t i = 0; i < payloadSize; i++)
{
Expand All @@ -68,8 +94,9 @@ void MidiUMPToBSTransformTests::InternalTestMessages(
else
{
std::cout
<< "rec: 0x"
<< std::setfill('0') << std::setw(2) << std::hex << (uint16_t)receivedBytes[i]
<< "(" << std::setfill('0') << std::setw(2) << std::hex << (uint16_t)(expectedBytes[expectedBytesIndex]) << ") ";
<< " (exp: 0x" << std::setfill('0') << std::setw(2) << std::hex << (uint16_t)(expectedBytes[expectedBytesIndex]) << ") ";


VERIFY_ARE_EQUAL(expectedBytes[expectedBytesIndex], receivedBytes[i]);
Expand Down Expand Up @@ -178,5 +205,167 @@ void MidiUMPToBSTransformTests::TestChannelVoiceMessages()
0xCF, 0x1F,
};

InternalTestMessages(input, expectedOutput);
std::vector<uint8_t> expectedGroups =
{
0
};

InternalTestMessages(input, expectedOutput, expectedGroups);
}

void MidiUMPToBSTransformTests::TestMixedGroupMessages()
{
std::vector<uint32_t> input =
{
0x20E01230,
0x20E11231,
0x22E21232,
0x22E31233,
0x20E41234,
0x20E51235,
0x22E61236,
0x22E71237,
0x24E81238,
0x24E91239,
0x22EA123A,
0x22EB123B,
0x29EC123C,
0x20ED123D,
0x29EE123E,
0x21EF123F,
};

std::vector<uint8_t> expectedOutput =
{
0xE0, 0x12, 0x30,
0xE1, 0x12, 0x31,

0xE2, 0x12, 0x32,
0xE3, 0x12, 0x33,

0xE4, 0x12, 0x34,
0xE5, 0x12, 0x35,

0xE6, 0x12, 0x36,
0xE7, 0x12, 0x37,

0xE8, 0x12, 0x38,
0xE9, 0x12, 0x39,

0xEA, 0x12, 0x3A,
0xEB, 0x12, 0x3B,

0xEC, 0x12, 0x3C,

0xED, 0x12, 0x3D,

0xEE, 0x12, 0x3E,

0xEF, 0x12, 0x3F,
};


// only needs to contain the index when the group index changes
std::vector<uint8_t> expectedGroups =
{
0,
2,
0,
2,
4,
2,
9,
0,
9,
1
};

InternalTestMessages(input, expectedOutput, expectedGroups);
}



void MidiUMPToBSTransformTests::ValidateGithubIssue822()
{

// figure out the 14 bit value from the 32 bit value

uint32_t data32_1 = 0x10000000;
uint16_t fourteenBit1 = (uint16_t)(data32_1 >> 18);
uint8_t fourteenBit1MSB = (uint8_t)((fourteenBit1 >> 7) & 0x7F);
uint8_t fourteenBit1LSB = (uint8_t)(fourteenBit1 & 0x7F);

uint32_t data32_2 = 0x90000000;
uint16_t fourteenBit2 = (uint16_t)(data32_2 >> 18);
uint8_t fourteenBit2MSB = (uint8_t)((fourteenBit2 >> 7) & 0x7F);
uint8_t fourteenBit2LSB = (uint8_t)(fourteenBit2 & 0x7F);


std::vector<uint32_t> input =
{
0x40201020, data32_1, // group 0 MSB 10, LSB 20, Data 1
0x43201020, data32_2, // group 3 with same RPN MSB 10, LSB 20

0x40201020, data32_1, // group 0 MSB 10, LSB 20
0x40201020, data32_2, // group 0 with same RPN MSB 10, and LSB 20

0x40201020, data32_1, // group 0 MSB 10, LSB 20
0x43201121, data32_2, // group 3 MSB 11, LSB 21

0x43201121, data32_1, // group 3 MSB 11, LSB 21
};


std::vector<uint8_t> expectedOutput =
{
// group 0
0xb0, 0x65, 0x10, // NRPN MSB
0xb0, 0x64, 0x20, // NRPN LSB
0xb0, 0x06, fourteenBit1MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit1LSB, // NRPN data 2 (fine adjustment / LSB)

// group 3
0xb0, 0x65, 0x10, // NRPN MSB
0xb0, 0x64, 0x20, // NRPN LSB
0xb0, 0x06, fourteenBit2MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit2LSB, // NRPN data 2 (fine adjustment / LSB)

// group 0
0xb0, 0x65, 0x10, // NRPN MSB
0xb0, 0x64, 0x20, // NRPN LSB
0xb0, 0x06, fourteenBit1MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit1LSB, // NRPN data 2 (fine adjustment / LSB)

// group 0 again with same MSB/LSB for NRPN, so just data comes through
0xb0, 0x06, fourteenBit2MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit2LSB, // NRPN data 2 (fine adjustment / LSB)

// group 0 again
0xb0, 0x06, fourteenBit1MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit1LSB, // NRPN data 2 (fine adjustment / LSB)

// group 3, but different NRPN LSB/MSB
0xb0, 0x65, 0x11, // NRPN MSB
0xb0, 0x64, 0x21, // NRPN LSB
0xb0, 0x06, fourteenBit2MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit2LSB, // NRPN data 2 (fine adjustment / LSB)

// group 3 again, same NRPN LSB/MSB
0xb0, 0x06, fourteenBit1MSB, // NRPN data 1 (value / MSB)
0xb0, 0x26, fourteenBit1LSB, // NRPN data 2 (fine adjustment / LSB)

};


// only needs to contain the index when the group index changes
std::vector<uint8_t> expectedGroups =
{
0,
3,
0,
3,
};

InternalTestMessages(input, expectedOutput, expectedGroups);

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ class MidiUMPToBSTransformTests
//TEST_METHOD_CLEANUP(TestCleanup);

TEST_METHOD(TestChannelVoiceMessages);
TEST_METHOD(TestMixedGroupMessages);
TEST_METHOD(ValidateGithubIssue822);

void InternalTestMessages(
_In_ std::vector<uint32_t> words,
_In_ std::vector<uint8_t> const expectedBytes);
_In_ std::vector<uint8_t> const expectedBytes,
_In_ std::vector<uint8_t> const expectedGroups);

STDMETHOD(Callback)(_In_ MessageOptionFlags, _In_ PVOID Data, _In_ UINT Size, _In_ LONGLONG Position, LONGLONG Context)
{
Expand Down
Loading