Inputting notes is triggering external hardware. Is there a way to prevent this?

Started by atarirob, October 21, 2022, 23:10:45

Previous topic - Next topic

atarirob

Okay, this is going to take a little explaining so I really appreciate everyone who reads this and tries to understand the issue.

Whats happening is I am attempting to set up MPT as my 'main brain', i.e., I want it as the main source of MIDI Timecode in my setup that sends clock/sequence data to my hardware gear, as well as being an incredible integrated sequencer/sampler (which it really is, can't believe it took me this long to learn how to use it!!).

I've inserted several 'MIDI Input Output' plugins and have them sending MIDI data to the corresponding MIDI channel of that of my hardware synths/drum machines (I have set the MIDI channel of each plugin in the 'Instument' it automatically generates corresponding to each MIDI ch. of my hardware gear,).

- This work flawlessly, I can send MIDI note data to the hardware and they sync perfectly to MPT's MIDI clock.

However - this is where it gets tricky: I am trying to use my Elektron Machinedrum, which has it's own (very unique) sequencer that I would like to use with OpenMPT sending it clock.

It still syncs to MPT's MIDI clock, and plays when I hit play on MPT, however, when I pause OpenMPT and I try to play any note on any channel or intrument within MPT, this will trigger the Machinedrum to start playing, as if I have hit play. I can hit stop on the Machinedrum, and then play notes as usual in OpenMPT without it triggering, but can't find a way to stop this from inititally happening.

This is occuring in record mode and non-record mode.

Abbreviated: I have gear with pattern sequencers synced to OpenMPT, however OpenMPT will trigger the hardware gear when any note on the keyboard is pressed, even when a completely different instrument and channel is selected in both record mode and non-record mode.

I have double checked all my MIDI settings on the Machinedrum - there is absolutely no 'trigger pattern with MIDI note' set up on it - I have completely disabled that feature and it is still happening. This also happens with my Analog Four and TB-303 sequences.

Any help on this is really appreciated! I am well aware there are many workarounds like - just sampling the patterns or using OpenMPT to sequence them but this would be wicked to get up and running, I'd really love to have OpenMPT be my main brain in my setup, I absolutely love using it.

Thank you!

EDIT: Audio/MIDI interface is a Steinberg UR242, MIDI Out is going into a MOTU MTP (hah, yeah I know) 2 MIDI patchbay, and then into the Machinedrum. I have also tried it with the MIDI Out from the UR242 going directly to my Machinedrum, same thing happens.

Saga Musix

Whenever OpenMPT resumes playback, it will send a MIDI Start message (FA), and of course MIDI ticks will also keep being sent. So from the perspective of the MIDI device, there is no difference between playing a pattern and entering notes in a pattern.
As a workaround for the time being, you could of course uncheck the "send timing messages" checkbox in the plugin while editing, but doing that everytime you want to edit patterns is cumbersome of course. But I guess we might need a separate setting for sequencer-like MIDI instruments. MIDI ticks should probably always be sent because you may want to drive e.g. arpeggiators even when previewing notes in a pattern. Maybe we can just avoid sending MIDI Start/Stop messages when playback is stopped in general, this could already be good enough as a fix?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

atarirob

Thank you for the quick reply! :D

I see. That was my guess and it makes total sense for MPT to work this way.

That's okay, like you said I can always uncheck the box that sends clock in the Plugin viewer, or just sample my external hardware patterns and arrange them as an Instrument in MPT which is much more economical and efficient in the long run, but cumbersome to have to keep opening a DAW and recording them. Another fix (for anyone else experiencing this rather esoteric issue) is of course just to sequence your hardware solely via MIDI through MPT. Just enter an empty pattern on your device, keep 'send timing messages' active in MPT (for syncing LFO's, delays, arps, etc.) and do all the sequencing with the tracker.

Just curious about the last sentence: "Maybe we can just avoid sending MIDI Start/Stop messages when playback is stopped in general, this could already be good enough as a fix?"

Is that something I can setup myself? Or is that just a potential fix that sprung to mind that would need to be hard coded in to be implemented? I've tested it thoroughly and it is happening even when record and play is disabled. Simply tapping any key linked to MIDI a note on the keyboard will trigger it.

Like I said, it would honestly be a dream come true to get this working for me, MPT is absolutely rock solid in every way with MIDI...just this one little issue that is stopping it from being 100% perfect!

Thanks again!

Saga Musix

Quote from: atarirob on October 22, 2022, 11:43:01
Is that something I can setup myself? Or is that just a potential fix that sprung to mind that would need to be hard coded in to be implemented? I've tested it thoroughly and it is happening even when record and play is disabled. Simply tapping any key linked to MIDI a note on the keyboard will trigger it.
This is a fix that would have to be implemented in OpenMPT. Nobody ever asked for the current behaviour, it's just what I implemented because I thought it makes sense, so changing the behaviour to not send a MIDI start message in this situtation should be fairly non-controversial.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

manx

Quote from: Saga Musix on October 22, 2022, 13:28:20
Quote from: atarirob on October 22, 2022, 11:43:01
Is that something I can setup myself? Or is that just a potential fix that sprung to mind that would need to be hard coded in to be implemented? I've tested it thoroughly and it is happening even when record and play is disabled. Simply tapping any key linked to MIDI a note on the keyboard will trigger it.
This is a fix that would have to be implemented in OpenMPT. Nobody ever asked for the current behaviour, it's just what I implemented because I thought it makes sense, so changing the behaviour to not send a MIDI start message in this situtation should be fairly non-controversial.

I agree that sending "MIDI Start" when the OpenMPT playback starts for only previewing a note does not make much sense.

We do not have clear terminology in this area in OpenMPT though, and the code, even when not considering MIDI, is somewhat confusing and intermangled between "preview" (OpenMPT: not continuously playing a pattern, MIDI: not playing a sequence) and "playing a pattern" (MIDI: playing a sequence). Another common term in this area would be "transport running" vs "not transport running".

just dumping some random thoughts on the matter

Saga Musix

As of r18027, OpenMPT will no longer send MIDI Start/Stop messages when previewing notes, or when using the Pattern Step feature. Seems to work fine with a Roland R-8 so hopefully it should work for you as well.

You will be able to download this test version in a few hours from https://builds.openmpt.org/builds/ if you want to give it a try.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

atarirob

Quote from: Saga Musix on October 22, 2022, 13:57:16
As of r18027, OpenMPT will no longer send MIDI Start/Stop messages when previewing notes, or when using the Pattern Step feature. Seems to work fine with a Roland R-8 so hopefully it should work for you as well.

You will be able to download this test version in a few hours from https://builds.openmpt.org/builds/ if you want to give it a try.

Thank you so much, I can't believe you have implemented it so quickly!! I can't wait to give it a try and set it up...Will report back if I find any bugs! :D

atarirob

Quote from: Saga Musix on October 22, 2022, 13:57:16
As of r18027, OpenMPT will no longer send MIDI Start/Stop messages when previewing notes, or when using the Pattern Step feature. Seems to work fine with a Roland R-8 so hopefully it should work for you as well.

You will be able to download this test version in a few hours from https://builds.openmpt.org/builds/ if you want to give it a try.

Unfortuantely I can't see the new version up yet...its been about 7 hours now, does it typically take this long or am I looking in the wrong place?
Apologies for my impatience, just really excited to use this version!

Saga Musix

Sometimes it takes a little longer, as a lot of different things are being built automatically. You can now find r18033 here, which also includes the change: https://builds.openmpt.org/builds/auto/openmpt/pkg.win/1.31/
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

atarirob

Quote from: Saga Musix on October 22, 2022, 22:00:23
Sometimes it takes a little longer, as a lot of different things are being built automatically. You can now find r18033 here, which also includes the change: https://builds.openmpt.org/builds/auto/openmpt/pkg.win/1.31/

Ah, sweet. Thank you! Just spent my morning setting it up and testing it out, works flawlessly of course! Tested the MIDI functionality as well as I could, tried notes, seqeuncing MIDI macros and recording CC's via a controller into MPT and they all work perfectly, none of them trigger the hardware to start.

Just as an aside, I'm stunned how rock solid MPT's clock is. I rarely get deviations above 0.2 bpm with the hardware.

Again, thank you so much for implementing this for me! Really incredible how quickly you were able to fix this, just because it was bothering 1 single person...what a great community! :D

Saga Musix

Great to hear that it's working for you!
QuoteJust as an aside, I'm stunned how rock solid MPT's clock is. I rarely get deviations above 0.2 bpm with the hardware.
There's not much "secret sauce" to it. In fact, it entirely depends on the update period configured in OpenMPT's sound card settings. The lower the period, the better the accuracy will be. And of course it also depends on the jitter of the MIDI output device, which can be particularly troublesome with some USB2 MIDI devices, but I guess MOTU is doing a good job there. ;)
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

atarirob

Quote from: Saga Musix on October 23, 2022, 12:35:07
Great to hear that it's working for you!
QuoteJust as an aside, I'm stunned how rock solid MPT's clock is. I rarely get deviations above 0.2 bpm with the hardware.
There's not much "secret sauce" to it. In fact, it entirely depends on the update period configured in OpenMPT's sound card settings. The lower the period, the better the accuracy will be. And of course it also depends on the jitter of the MIDI output device, which can be particularly troublesome with some USB2 MIDI devices, but I guess MOTU is doing a good job there. ;)

Oh come on, you missed the opportunity to tell me that its all the work of masterful programming with a hint of arcane magic ;)

Really though, I've only been using MPT for the past 3 weeks-ish, but every bit of it seems impeccably optimised. I was trying to set up Reaper as my sequencer for a while before I moved to MPT and I was lucky if each measure was within +/- 1 or 2 whole beats-per-minute of the actual tempo, same story with every DAW I've tried.

The soundcard I'm using is actually a well old Steinberg UR242 which then goes into the MOTU MTPII (from 1987 lol) to route the signal to all the hardware, so I was fully expecting there to be latency of at least 10-15ms and for the clock to be jittery, but MPT is rock solid and I can crank the latency all the way down to 2ms(!!!) without any audio glitching/clicks&pops. Really happy to have found MPT, I'm totally new to trackers but everything feels so natural and most importantly it is super fun to use. Now...I have no excuse not to go make some tunes ;D


Saga Musix

FYI, this behaviour change was now backported to the latest OpenMPT 1.30 release (1.30.09.00).
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.