MidiMon update: 1.50
Lauren Etc. (8147) 52 posts |
Hi all, I’ve put together a new release of MidiMon, the USB-enabled MIDI utility, and it’s up on GitHub: https://github.com/laurenrad/MidiMon/releases/tag/v1.50 I’ve taken various feedback into account from the previous release1, and highlights include:
If you get a chance to test it and have any additional notes, let me know, although I’ll be working on other projects for a bit. Thanks! |
Rick Murray (539) 13850 posts |
Hiya!
Oh, it looks like a recent(ish?) change to the MIDI module has broken something. Turning the keyboard on and off four times has it registered as one device and four ports. That’s wrong. It should be reusing the port that the VID/PID was previously associated with.
All in all, nice work. |
Lauren Etc. (8147) 52 posts |
Correct? Nope. Easy? Very. Postmortem is what you’d expect, and provided by werr (of RISC_OSLib) with any “fatal” error. What I should have done though is flag it and go to cleanup. Shouldn’t be a massively big deal though, at the moment from what I can think of. Something to consider for next time.
SO… and this isn’t exclusive to yours, but something I meant to bring up in the last post, but I’m not getting MIDI_DeviceConnectedEvent or MIDI_DeviceDisconnectedEvent from either module, nor the module initialise/dying service calls. All I get is, from yours, MIDI_ErrorEvent when I disconnect a device and nothing from the other one. What’s worse, I currently have no reliable way to differentiate between the two modules if you were to change these, as Peter put compatibility stubs in for any USB-MIDI specific calls before I put this release together1. So these are some things that may have to worked out somehow going forward… it would be really nice to know when things are getting plugged/unplugged, but I couldn’t work it out at the moment.
According to the 0.09 documentation, MIDI_TxNoteOn will return -1 in R1 on exit if an error occurred. I haven’t tested this, the note was just reminding myself other modules didn’t support it.
Oops, sorry about that, thank you for the redirection link.
Thank you! 1 Maybe there could be a new SWI that identifies your module with a description of “Please nobody else implement this???” Or maybe there already is one I could use, but I didn’t find one right away. It does attempt to detect anything conforming to what’s documented in Acorn MIDI guide and work with it, but for obvious reasons I haven’t tested this. |
Rick Murray (539) 13850 posts |
;) Good answer.
Strange. Device callback handler →
Is there some sort of restriction on calling GenerateEvent twice in a row?
You should be. As the module starts up, it issues service call &58 reason 0.
Parse the module help string? Mine says “USB MIDI” after the date. It may say some other stuff (like it currently says “USB MIDI [test build 3/d]”) but the “USB MIDI” part will always be there as it differentiates it from the Acorn MIDI.
Fair enough. ;)
It doesn’t, that’s a typo in the doc. :( If the device is invalid, it’s R0 that’s set to -1 as the following description says. Sorry.
Okay, MIDI_USBInfo does the following:
How about adding this:
This way, if Peter adds his chosen ID word, then it’ll be possible to easily tell them apart. |
Rick Murray (539) 13850 posts |
I won’t be releasing an updated module just yet. I’ve discovered an issue (thanks to testing your program) in that it seems as if when the device is turned off and on again, it gets assigned the same device ID, but a new port is created for it. This difference cropped up when the concept of devices and ports was split apart (as modern MIDI devices can support multiple ports and cables on one device). I’ve sent an email to Ian to notify him about this problem. I don’t want to fiddle with that part of the code as none of my devices support this level of complexity, but I think some of his do – so I don’t want to unknowingly break anything. He also provided a fix for the “Device not found” (moving when the handles are closed) so if that has been annoying you at shutdown, there’s a fix on the way. ;) |