midi2-dev / midi2.0workbench Goto Github PK
View Code? Open in Web Editor NEWMIDI 2.0 Testing Tool
License: MIT License
MIDI 2.0 Testing Tool
License: MIT License
I am trying to get MIDI2.0Workbench to see if it is usable for diagnosing any interoperability issues. Sadly it is currently impossible, because the tools goes into weird "infinite loop" that keeps sending Get Property Data request to the connected device.
It keeps logging the requests and reqponses forever, which makes it impossible to even inspect the messages.
For the same reason, we cannot really debug what is going on with the actual property data, regardless of which property it is, because every time it receives the response, the tool refreshes the property details on the "Resource Data" page and resets the property selection status.
Confirmed with MIDI2.0Workbench 1d293d9, my own MICI-CI tool (atsushieno/ktmidi as of ef03b56), and JUCE CapabilityInquiryDemo (as of 0637f78).
I have been implementing MIDI-CI from full scratch, and it now interoperates with MIDI 2.0 Workbench to some extent. Through the development I noticed that MIDI 2.0 Workbench incorrectly rejects x- named properties.
I have X-name1
and x-name2
properties on my device. MIDI 2.0 Workbench reports a Warning with related to x-name2
like:
Do not set x-name2 canSet Property in ResourceList
resulting in reporting it an error as well:
x-name2 is not a valid defined Resource.
Note that X-name1
is regarded as manufacturer-specific resource and canSet
(as full
or partial
) does not trigger any validation error.
The Common Rules for Property Exchange v1.1 (M2-103-UM_v1-1) specification, at section 4.1.4, specifies:
Manufacturers may wish to include their own specific information inside MMA/AMEI defined Resources (see Section 6).
This shall be accomplished by including a manufacturer-specific Property with a name prefixed with "x-". Manufacturer-specific properties shall conform to all other format rules defined by Property Exchange specifications.
It treats x-
as a manufacturer resource, so this should "also" be allowed.
When launching MIDI Workbench, selecting Debug, Tools, etc can cause window to show up on different screen than the Workbench main window. This could be just a Mac thing, not tested on other platforms.
It would be handy if the screen can be launched in same screen context as the main window.
As discussed on Microsoft Discord about a custom MIDi 2.0 device that showed zeros for the GTB in Workbench. There was some doubt about the device. Due to lack of any peer device, tried a Linux USB MIDI 2.0 gadget.
A. How to reproduce:
B. A tool to read the GTB descriptors with libusb returns a correct GTB for the gadget:
C. Conclusion : would think there is an issue in Workbench.
Ubuntu with Linux kernel 6.5 is on nodejs 18, the reop need Node 16, Tying to install 16
The installation instruction refer to yarn but actually yarnpkg is needed.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 16
nvm use 16
git clone https://github.com/midi2-dev/MIDI2.0Workbench.git
cd MIDI*
sudo apt-get install yarnpkg
yanrpkg
When trying to build, the error pasted below is thrown.
CC
and CXX
env vars)yarn
Some includes seem to be missing e.g. for BString
as well.
error /home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.11.6 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/home/florian/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/florian/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/florian/.cache/node-gyp/16.15.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/florian/.cache/node-gyp/16.15.1',
gyp info spawn args '-Dnode_gyp_dir=/home/florian/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/florian/.cache/node-gyp/16.15.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2/build'
CXX(target) Release/obj.target/ALSA/alsabindings.o
../alsabindings.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE get_UMP_Endpoints(Nan::NAN_METHOD_ARGS_TYPE)’:
../alsabindings.cc:210:49: error: invalid conversion from ‘int’ to ‘const snd_seq_client_info_t*’ {aka ‘const _snd_seq_client_info*’} [-fpermissive]
210 | int card = snd_seq_client_info_get_card(client);
| ^~~~~~
| |
| int
In file included from /usr/include/alsa/asoundlib.h:64,
from ../alsabindings.cc:4:
/usr/include/alsa/seq.h:153:63: note: initializing argument 1 of ‘int snd_seq_client_info_get_card(const snd_seq_client_info_t*)’
153 | int snd_seq_client_info_get_card(const snd_seq_client_info_t *info);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../alsabindings.cc:212:13: error: ‘BString’ was not declared in this scope
212 | BString hwname = BString::format("hw:%d", card);
| ^~~~~~~
../alsabindings.cc:214:48: error: ‘hwname’ was not declared in this scope; did you mean ‘tzname’?
214 | snd_ctl_open(&card_control_handle, hwname.toUTF8(), 0);
| ^~~~~~
| tzname
../alsabindings.cc:216:20: error: expected ‘;’ before ‘location’
216 | BString location(getLocation(card, card_info));
| ^~~~~~~~~
| ;
../alsabindings.cc:217:20: error: expected ‘;’ before ‘manufacturer’
217 | BString manufacturer(getManufacturer(location));
| ^~~~~~~~~~~~~
| ;
../alsabindings.cc:218:78: error: ‘manufacturer’ was not declared in this scope
218 | Nan::Set(port,Nan::New("manufacturer").ToLocalChecked(),Nan::New(manufacturer.toUTF8()));
| ^~~~~~~~~~~~
../alsabindings.cc:202:13: warning: unused variable ‘errEP’ [-Wunused-variable]
202 | int errEP = snd_seq_get_ump_endpoint_info(seq, client, ep);
| ^~~~~
../alsabindings.cc:262:14: warning: unused variable ‘err’ [-Wunused-variable]
262 | int err = snd_seq_connect_from(seq, localPort, client, portNum);
| ^~~
../alsabindings.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE sendUMP(Nan::NAN_METHOD_ARGS_TYPE)’:
../alsabindings.cc:392:9: warning: unused variable ‘senRes’ [-Wunused-variable]
392 | int senRes = snd_seq_ump_event_output(seq, &ev);
| ^~~~~~
In file included from ../../nan/nan.h:62,
from ../alsabindings.cc:1:
../alsabindings.cc: At global scope:
/home/florian/.cache/node-gyp/16.15.1/include/node/node.h:847:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
847 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/florian/.cache/node-gyp/16.15.1/include/node/node.h:881:3: note: in expansion of macro ‘NODE_MODULE_X’
881 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../alsabindings.cc:417:1: note: in expansion of macro ‘NODE_MODULE’
417 | NODE_MODULE(ALSA, Initialize)
| ^~~~~~~~~~~
make: *** [ALSA.target.mk:115: Release/obj.target/ALSA/alsabindings.o] Error 1
make: Leaving directory '/home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/florian/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 6.6.8-arch1-1
gyp ERR! command "/home/florian/.nvm/versions/node/v16.15.1/bin/node" "/home/florian/.nvm/versions/node/v16.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/florian/build/MIDI2.0Workbench/node_modules/usb_midi_2
Hi!
I'm getting a C compile error off the back of my initial yarn
command: (note I redacted some of the paths so as not to leak details of my filesystem).
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp info find Python using Python version 3.9.6 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v21.1.0/node-v21.1.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v21.1.0/node-v21.1.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v21.1.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v21.1.0/SHASUMS256.txt
gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
gyp info spawn args [
gyp info spawn args 'yarn/global/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args 'MIDI2.0Workbench/node_modules/midi/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'yarn/global/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'node-gyp/21.1.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=node-gyp/21.1.0',
gyp info spawn args '-Dnode_gyp_dir=yarn/global/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node-gyp/21.1.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=MIDI2.0Workbench/node_modules/midi',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
fatal error: 'stdlib.h' file not found
#include_next <stdlib.h>
^~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/midi/vendor/rtmidi/RtMidi.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous>
gyp ERR! System Darwin 22.6.0
gyp ERR! command "node" "node-gyp" "rebuild"
gyp ERR! cwd MIDI2.0Workbench/node_modules/midi
13-inch, M1, 2020
macOS 13.6 (Ventura)
Xcode 14.3.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.