自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
CTS 验证程序 MIDI 测试
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
以下测试用于验证乐器数字接口 (MIDI) 系统以及关联的 C 或 C++ API(针对原生 MIDI 测试)和 Java 语言 API(针对 JAVA MIDI 测试)是否按预期运行。此测试具有以下要求:
- 所需的外围设备:配有关联环回线的 MIDI 外围设备。
下面这些图显示了配有关联环回线的 MIDI 外围设备示例:
图 1. 配有 MIDI I/O 端口和 USB 音频接口的外围设备的正面
图 2. 配有 MIDI I/O 端口和 USB 音频接口的外围设备的背面
图 3. 标准 5 针 DIN MIDI 线
图 4. 蓝牙 MIDI 接口,例如 Yamaha MD-BT01 或 Roland WM-1
环回测试
所有环回测试都会通过测试外围设备发送一组 MIDI 消息,环回该数据,然后监视该设备的输入,以确保收到的数据与发送的数据相符。
在通过下列所有测试后,才能在相应应用中将其标记为已通过。
测试 USB MIDI 环回
- 在 USB 音频/MIDI 接口外围设备上,使用标准 5 针 DIN MIDI 线将 MIDI 输入连接到 MIDI 输出。
- 将 USB 音频/MIDI 接口外围设备连接到被测设备 (DUT)。当 DUT 识别出连接的外围设备后,测试屏幕会显示设备名称(输入和输出),并会让 Test USB MIDI Interface 按钮变得可用。
- 点按 Test USB MIDI Interface。
- 等待测试完成,然后在测试屏幕上查看报告的结果。
测试虚拟 MIDI 环回
此测试不需要使用外部硬件。
- 点按 Test Virtual MIDI Interface。
- 等待测试完成,然后在测试屏幕上查看报告的结果。
测试蓝牙 MIDI 环回
- 从 Play 商店下载并安装 MIDI BLE Connect 应用。
- 在 USB 音频/MIDI 接口外围设备上,将蓝牙 MIDI 接口连接到 USB 音频/MIDI 接口外围设备背面的 MIDI 输入和输出连接器。蓝牙 MIDI 接口上的连接器具有特定的方向性:
- 蓝牙 MIDI 接口上的输入插头必须连接到 USB 音频/MIDI 接口上的输入插孔。
- 蓝牙 MIDI 接口上的输出插头必须连接到 USB 音频/MIDI 接口上的输出插孔。
- 将 USB 音频/MIDI 接口外围设备连接到 DUT。
- 运行 MIDI BLE Connect 应用。通过扫描找到连接到 USB 外围设备的蓝牙 MIDI 设备。选择此蓝牙 MIDI 设备。
- 当 DUT 识别出连接的外围设备后,测试屏幕会显示设备名称(输入和输出),并会让 Bluetooth USB MIDI Interface 按钮变得可用。
- 点按 Bluetooth USB MIDI Interface。
- 等待测试完成,然后在测试屏幕上查看报告的结果。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-05-08。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-05-08。"],[],[],null,["# CTS Verifier MIDI tests\n\nThe following tests verify that the Musical Instrument Digital Interface (MIDI)\nsystem and the associated C or C++ API (for the Native MIDI Test) and the Java\nlanguage API (for the JAVA MIDI Test) function as expected.\n| **Warning:** This page has separate \"Required peripherals\" and \"Test Bluetooth MIDI loopback\" sections (one section each for Android 16 or higher and Android 15 or lower).\n\nFollow the steps in the section for your specific Android version.\n\nRequired peripherals (Android 16 or higher)\n-------------------------------------------\n\nBefore running the CTS-V MIDI tests, you must have these peripherals:\n\n- A USB MIDI with associated loopback cables, such as [Presonus Audio Box 96](https://www.presonus.com/en-US/interfaces/usb-audio-interfaces/audiobox-series/2777700105.html) with a standard 5-pin DIN MIDI cable\n- A Bluetooth MIDI with associated cables, such as [CME WIDI Jack](https://www.cme-pro.com/product/widi-jack/?srsltid=AfmBOorhxPmDHZbqJBDJ47HcMfoAoKYyDGp2wmtFSz3Fm3qA5DfkLHlw) with a [2.5 mm MIDI TRS cable](https://www.cme-pro.com/product/widi-accessory-25trs25-cable/?srsltid=AfmBOoqXgnzXs3QjWkf8gF-vOWbs00xv33LUlNu4VzDAqxRbzaAJh8S-)\n\nExamples of MIDI peripherals with associated loopback cables are shown in the\nfollowing figures:\n\n**Figure 1.** The front of a USB audio interface with MIDI I/O ports.\n\n**Figure 2.** The back of a USB audio interface with MIDI I/O ports.\n\n**Figure 3.** A standard 5-pin DIN MIDI cable.\n\n**Figure 4.** A Bluetooth MIDI interface with 5-pin DIN.\n\n**Figure 5.** A Bluetooth MIDI interface with loopback.\n\nRequired peripherals (Android 15 or lower)\n------------------------------------------\n\nBefore running the CTS-V MIDI tests, you must have a MIDI peripheral with\nassociated loopback cables. Examples of MIDI peripherals with associated\nloopback cables are shown in the following figures:\n\n**Figure 6.** The front of a USB audio interface with MIDI I/O ports.\n\n**Figure 7.** The back of a USB audio interface with MIDI I/O ports.\n\n**Figure 8.** A standard 5-pin DIN MIDI cable.\n\n**Figure 9.** A Bluetooth MIDI interface, such as a Yamaha MD-BT01 or a Roland WM-1.\n\nLoopback tests\n--------------\n\nAll the loopback tests send a set of MIDI messages out through the test\nperipheral, loop back that data, and then monitor the input of that device to\ncheck that the data received matches the data that was sent.\n\nAll of the following tests must pass before you mark them as passed in the app.\n\n### Test USB MIDI loopback\n\n1. On the USB Audio/MIDI interface peripheral, connect the MIDI input to the MIDI output with a standard, 5-pin DIN MIDI cable.\n2. Connect the USB Audio/MIDI interface peripheral to the device under test DUT. When the DUT recognizes the connected peripheral, the test screen displays the device names (input and output) and makes the **Test USB MIDI Interface** button available.\n3. Tap **Test USB MIDI Interface**.\n4. Wait for the test to complete, then view the reported results on the test screen.\n\n### Test virtual MIDI loopback\n\nNo external hardware is required for this test.\n\n1. Tap **Test Virtual MIDI Interface**.\n2. Wait for the test to complete, then view the reported results on the test screen.\n\nTest Bluetooth MIDI loopback (Android 16 or higher)\n---------------------------------------------------\n\nThe following steps describe how to test Bluetooth MIDI loopback on\nAndroid 16 or higher:\n\n1. Download and install the [MIDI BLE Connect](https://play.google.com/store/apps/details?id=com.mobileer.example.midibtlepairing) app from Google Play.\n2. (optional) If your Bluetooth peripheral supports loopback, for example, the CME WIDI Jack in Figure 5, skip this step. Otherwise, follow these steps:\n 1. On the USB Audio/MIDI interface peripheral, connect the Bluetooth MIDI interface to the MIDI input and output connectors on the back of the USB Audio/MIDI interface. The 5-pin DIN connectors on the Bluetooth MIDI interface have specific directionality:\n - The INPUT plug on the Bluetooth MIDI interface must connect to the INPUT jack on the USB Audio/MIDI interface.\n - The OUTPUT plug on the Bluetooth MIDI interface must connect to the OUTPUT jack on the USB Audio/MIDI interface.\n 2. Connect the USB Audio/MIDI interface peripheral to the DUT.\n3. Run the MIDI BLE Connect app. Scan for the Bluetooth MIDI device. Select this Bluetooth MIDI device.\n4. When the DUT recognizes the connected peripheral, the test screen displays the device names (input and output) and makes the **Test Bluetooth MIDI\n Interface** button available.\n5. Tap **Test Bluetooth MIDI Interface**.\n6. Wait for the test to complete, then view the reported results in the test.\n\nTest Bluetooth MIDI loopback (Android 15 or lower)\n--------------------------------------------------\n\nThe following steps describe how to test Bluetooth MIDI loopback on\nAndroid 15 or lower:\n\n1. Download and install the [MIDI BLE Connect](https://play.google.com/store/apps/details?id=com.mobileer.example.midibtlepairing) app from Google Play.\n2. On the USB Audio/MIDI interface peripheral, connect the Bluetooth MIDI interface to the MIDI input and output connectors on the back of the USB Audio/MIDI interface. The connectors on the Bluetooth MIDI interface have specific directionality:\n - The INPUT plug on the Bluetooth MIDI interface must connect to the INPUT jack on the USB Audio/MIDI interface.\n - The OUTPUT plug on the Bluetooth MIDI interface must connect to the OUTPUT jack on the USB Audio/MIDI interface.\n3. Connect the USB Audio/MIDI interface peripheral to the DUT.\n4. Run the MIDI BLE Connect app. Scan for the Bluetooth MIDI device connected to the USB peripheral. Select this Bluetooth MIDI device.\n5. When the DUT recognizes the connected peripheral, the test screen displays the device names (input and output) and makes the **Bluetooth USB MIDI\n Interface** button available.\n6. Tap **Bluetooth USB MIDI Interface**.\n7. Wait for the test to complete, then view the reported results in the test screen."]]