pedro.estrela
2020-09-30 15:33:52
Hi
Is there a rule to explicitly reset (close+open) a midi devices in Windows, in bome 1.8.4 ?
Alternatively, is there a way to schedule a restart of the whole midimanager?
what is my issue:
Unplugging the USB cable of my DDJ-1000 results in the leds becoming dead. This is completely repetable.
The MIDI_IN comes up dead as well, but then somebody (either the driver or the FW) gives it a reset. It then works fine automatically.
In this situation, the only workaround is to manually restart the midi_manager on the big red button.
Please see timeline below.
thank you
UNPLUG USB CABLE:
10706902 - MIDI IN [DDJ-1000]: <<<<<< bad log line? something "empty" seems received
10706906 - Closed MIDI OUTPUT 'DDJ-1000'
10706906 - MIDI OUTPUT 'DDJ-1000' unplugged. It is set to 'pending'.
10706906 - Vanished MIDI INPUT : DDJ-1000
10706906 - Vanished MIDI OUTPUT : DDJ-1000
10706907 - MIDI INPUT 'DDJ-1000' does not exist. It is set to 'pending'.
REPLUG USB CABLE:
10851470 - MIDI OUTPUT 'DDJ-1000' now successfully opened.
10851470 - MIDI OUTPUT 'DDJ-1000' now successfully opened.
10851470 - Opened MIDI OUTPUT 'DDJ-1000'
10851483 - MIDI INPUT 'DDJ-1000' now successfully opened.
10851483 - MIDI INPUT 'DDJ-1000' now successfully opened.
10851483 - Opened MIDI INPUT 'DDJ-1000'
10851483 - Discovered MIDI INPUT : DDJ-1000
10851483 - Discovered MIDI OUTPUT: DDJ-1000
10852938 - MIDI IN [DDJ-1000]:
10852945 - MIDI INPUT 'DDJ-1000' unexpectedly closed. It is set to 'pending'. <<<<< this is important!!
10862964 - MIDI INPUT 'DDJ-1000' now successfully opened.
10862964 - MIDI INPUT 'DDJ-1000' now successfully opened.
10862964 - Opened MIDI INPUT 'DDJ-1000'
(midi IN works)
(midi OUT doesn't work)
STOP MIDIMANAGER:
10966360 - MIDI OUT [DDJ-1000]: B0 78 00 (I don't know who sends this messages? the driver?)
10966360 - MIDI OUT [DDJ-1000]: B0 7B 00 (0x78 = CC 120; 0x7B = CC 123; all channels)
10966360 - MIDI OUT [DDJ-1000]: B1 78 00
10966360 - MIDI OUT [DDJ-1000]: B1 7B 00
10966360 - MIDI OUT [DDJ-1000]: B2 78 00
10966360 - MIDI OUT [DDJ-1000]: B2 7B 00
10966360 - MIDI OUT [DDJ-1000]: B3 78 00
10966360 - MIDI OUT [DDJ-1000]: B3 7B 00
10966360 - MIDI OUT [DDJ-1000]: B4 78 00
10966360 - MIDI OUT [DDJ-1000]: B4 7B 00
10966360 - MIDI OUT [DDJ-1000]: B5 78 00
10966360 - MIDI OUT [DDJ-1000]: B5 7B 00
10966360 - MIDI OUT [DDJ-1000]: B6 78 00
10966360 - MIDI OUT [DDJ-1000]: B6 7B 00
10966360 - MIDI OUT [DDJ-1000]: B7 78 00
10966360 - MIDI OUT [DDJ-1000]: B7 7B 00
10966360 - MIDI OUT [DDJ-1000]: B8 78 00
10966360 - MIDI OUT [DDJ-1000]: B8 7B 00
10966360 - MIDI OUT [DDJ-1000]: B9 78 00
10966360 - MIDI OUT [DDJ-1000]: B9 7B 00
10966360 - MIDI OUT [DDJ-1000]: BA 78 00
10966360 - MIDI OUT [DDJ-1000]: BA 7B 00
10966360 - MIDI OUT [DDJ-1000]: BB 78 00
10966360 - MIDI OUT [DDJ-1000]: BB 7B 00
10966360 - MIDI OUT [DDJ-1000]: BC 78 00
10966360 - MIDI OUT [DDJ-1000]: BC 7B 00
10966360 - MIDI OUT [DDJ-1000]: BD 78 00
10966360 - MIDI OUT [DDJ-1000]: BD 7B 00
10966360 - MIDI OUT [DDJ-1000]: BE 78 00
10966360 - MIDI OUT [DDJ-1000]: BE 7B 00
10966360 - MIDI OUT [DDJ-1000]: BF 78 00
10966360 - MIDI OUT [DDJ-1000]: BF 7B 00
10966365 - Closed MIDI INPUT 'DDJ-1000'
10966365 - Closed MIDI OUTPUT 'DDJ-1000'
10966365 - MIDIManager stopped.
START MIDI MANAGER:
11036472 - MIDIManager started.
11046472 - Opened MIDI OUTPUT 'DDJ-1000'
11046475 - Opened MIDI INPUT 'DDJ-1000'
(MIDI OUT works again)
Steve-Bome Forum Moderator
2020-09-30 20:06:01
OK, beginning in MT Pro 1.8.4 it will open and close ports in the following manner.
- At the project level if you open a port, it will always remain open as long as the project is running.
- If you do not enable a port a the project level yet enable them at the preset level. As you turn on a preset it will open the ports associated with that preset. If you turn it off, MT Pro will close the ports associated with that preset (unless another preset also has that port enabled).
So essentially you can use preset changes to open and close MIDI ports.
As far as the Windows System. You can only have 1 application using a given MIDI port (virtual or physical0 at a time, so if you disable a MIDI port in Bome and another application is attempting to open it, the other application will succeed and MT Pro will not be able to re-open that port (until the other application relinquishes control by closing the port.
This Windows limitation can be overcome by using virtual ports and the MIDI router to assign each application its own port. Another way to overcome this is to use Bome Network Pro and "unlimited virtual ports". And then use the MIDI router within Bome Network Pro to essentially do the same thing.
As far as the messages you are seeing. They are coming from MT Pro. Any time you hit the Stop Sign, MT Pro sends all notes off CC to all devices and all channels that MT Pro has open (to avoid hung notes). It also sends all sound off CC to all devices and MIDI channels which will usually reset the MIDI engine of any attached devices.
As far as handling a Panic situation (the stop sign) programatically. You can do the following.
- Set up a translator to trigger a repeating timer to iterate through the channels setting all notes off and all sound off.
- The repeating timer would need to be set up send the CC's to all ports defined within the outgoing action of that translator
- Have a second translator with a delay with outgoing action of "DisableProcessing" this is set under outgoing category in the drop-down called "Enable/Disable" processing. In this mode, nothing happens until you have another incoming trigger that has an outgoing action of "Enable Processing".
- Set up a translator for "Enable Processing" as described above after another delay
You can find an example attached.
Note, however since translator 0.6 opens MIDI ports BMT1 and BMT2, those outgoing ports will remain open even when switching presets since the translator overrides the settings of its parent preset which is always enabled.
Also you will not see the stop sign change color or to Go as you would when you press it manually.
I hope this helps!
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
Attachments:
pedro.estrela
2020-09-30 23:28:10
thanks for the clear answer. Again your support is fantastic. I\'m now able to MANUALLY restart devices at will (see anexed). This scheme keeps the terse verbosity of presets.
Final question: Currently I need to trigger this by a midi message; would it be posible to get a new incoming type for when the device goes down, i.e. on any of these log messages:
15868025 - Closed MIDI OUTPUT \'DDJ-1000\'
15868025 - MIDI OUTPUT \'DDJ-1000\' unplugged. It is set to \'pending\'.
15868026 - Vanished MIDI INPUT : DDJ-1000
15868026 - Vanished MIDI OUTPUT : DDJ-1000
15868026 - MIDI INPUT \'DDJ-1000\' does not exist. It is set to \'pending\'.
Attachments:
pedro.estrela
2020-09-30 23:28:47
comment
please see below, thanks. I cannot add my file to a comment
pedro.estrela
2020-10-01 00:49:40
comment
clarification: does the above method work with the built-in router? and with aliases?
Asking this because I still see the port open when I disable presets, and it only closes when I start deleting the presets themselves
Steve-Bome Forum Moderator
2020-10-01 01:13:59
comment
Hi Pedro,
At this time, there are no incoming triggers for Vanished MIDI connections. I believe this has been requested in the past, however. Unfortunately I do not have a time line for if and when this will be implemented.
Steve-Bome Forum Moderator
2020-10-01 04:27:36
comment
The MIDI router assumes the attached ports are always open. Aliases opening and closing follow the port the alias is assigned to.
pedro.estrela
2020-10-01 14:26:52
Hi
I\'m able to close the devices as you explained in a toy example, but not on my full mapping (anexed).
Please see this demo video:
https://youtu.be/UExHl890LmQ
One solution would be to programaticaly restart the midimanager. You explained above how to stop processing and reset external devices, but it doesn\'t restart the midi devices like clickin the big red button does.
thank you!
Attachments:
Steve-Bome Forum Moderator
2020-10-01 21:47:29
Hi Pedro,
It appears that if you have port routing selected at the translator level, the port remains open even if the parent preset is disabled. I'm discussing this with Florian. Also possible incoming triggers for missing or newly discovered MIDI ports. I'm still not clear why you want to enable and disable ports throughout your project. Most of my projects just open all that I want to use in the project and then I do my port routing at the preset (common) or translator (uncommon) level.
I assume you want to have an alternate behavior when a port disappears other than the project just to stop working because all devices are not there.
The test I did was to disable all presets to see if any ports were open. Any preset that had an enabled child translator that called out a specific port, stayed open even if the parent preset was disabled.
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
pedro.estrela
2020-10-01 22:36:35
comment
Allow me to explain again my request reason. I've made a short video to explain the issue: https://youtu.be/YLDnYtDsojs
---
My objective is to make mapping bullet-proof.
Where any component can be restarted at any time: a) the DDJ, b) the cable, c) BOME, d) Traktor.
When I restart BOME or Traktor, everything works fine.
When I restart the DDJ or swap the Cable, the leds and jog screens become dead.
Sending anything to the DDJ is just ignored by the driver.
Interestingly the reverse direction works fine: the buttons recover, so I can continue controlling traktor.
--
In this situation, to move forward I need to restart BOME in the big red button.
This restarts the device in both directions, which fixes the issue.
As such I would love to bome to a) detect and b) control devices programatically.
If I had such feature, when I see the device going down, I would schedule my own reset of the devices, or of the whole midimanager completely.
pedro.estrela
2020-10-01 22:37:41
comment
formatting is not helping :). This is the short video: https://youtu.be/YLDnYtDsojs
pedro.estrela
2020-10-04 18:51:06
Florian answered offline the exact conditions where devices are Open and Closed automatically. His text follows:
---
The MT Pro way is that a MIDI port is opened when it is \"used\" anywhere in the project, and closed otherwise.
The definition of \"used\" is somewhat arbitrary, but well defined:
1) checked in project MIDI ports
2) used in a MIDI Route (and that route is enabled. Currently, MT Pro does not allow you to disable routes)
3) checked in a preset\'s default MIDI ports AND that preset is enabled
4) checked in a Translator\'s in or out MIDI action (no matter if translator or its outer preset is enabled or disabled)
5) also, if any of the above applies to an alias assigned to that MIDI port