Note On/Off Lost on Virtual Input

Need help with Midiflow? Ask here!
Mof
Posts: 14
Joined: Sat Apr 18, 2020 2:42 am

Note On/Off Lost on Virtual Input

Post by Mof »

Hi,

Since this is a different issue to the Midiflow crashing on Virtual Inputs, I've opened up a different support thread.

It would appear that in both the current Midiflow on the App Store (2.2.18) and the Beta with the fix for crashing on Virtual Input (using iOS 14.4), that Midiflow is losing Note On and Note Off events on an incoming Virtual Input. While testing the Beta, I noticed that sometimes I was getting sticking notes and so turned on monitoring of notes and controllers in Midiflow to see that note off messages were just sometimes not appearing. Upon further investigation, it would seem that when a lot of note on/offs arrive in quick succession, that BOTH note ON and note OFF messages are being lost. I tested this as follows:

1. Setup Midiflow with AUM just as described in viewtopic.php?f=4&t=13632
2. Turn on the Monitor for Notes and Controllers in Midiflow
3. On the Midi Controller Keyboard, play a C chord (C-E-G) 3 times in very quick succession while observing the Midiflow monitor and see that the number of note on/note off midi messages are not equal. Sometimes there is one or more note on/off missing. You may need to repeat this step a few times depending on how quickly you play the chord 3 times. For me it would occur around 75% of the time. It also seems that the more notes being played increases the loss.

I have verified that the issue appears to be within Midiflow by monitoring the note on/off going in and out of AUM by doing the following:

A. Add 2 Midi Strips into AUM and in each create an empty AUv3 instance of Audeonic StreamByter (with no script loaded so it will just pass through the MIDI messages).
B. Using the MIDI router in AUM, send the input from the Hardware MIDI input to one of the StreamByter AUv3 Instances, then take the output from the same AUv3 instance and send it to the Midiflow Virtual Input.
C. Using the MIDI router in AUM, send the output from the Midiflow Virtual Output to the other StreamByter AUv3 Instances, then take the output from the same AUv3 instance and send it to the Hardware MIDI output.
D. On both StreamByter AUv3 instances, open the monitors so you can see the Midi in/out messages on each.

When repeating the 3 chords in succession, comparing the midi monitoring in the StreamByter AUv3 instances shows that the notes are indeed present in AUM and being sent to the Midiflow Vitual Input, but are not being processed/shown in the Midiflow App. Subsequently, they are also missing in the second StreamByter AUv3 instance taking input from the Midiflow App Virtual Output.

E. Link the StreamByter instances directly to each other (bypassing Midiflow) and repeat the 3 chords in succession. In this case, the notes never seem to go missing.

Without knowing how Midiflow works internally, on the surface, it looks a lot like there might be some sort of overflow on an event processing queue in Midiflow. The missing note on/offs always seem to be towards the end of the 3 chords played in succession. I.e. either Note Ons going missing in the 3rd of the chords being played or Note Offs going missing in the 3rd of the Chords ending also.

Once again, not sure how everything fits together, but it if it important, I do have around 8 or 10 Virtual Inputs and slightly less Virtual Outputs defined in Midiflow. I also have a few other Apps providing Virtual Inputs/Outputs as well as an iConnectivity Audio4+ with an iConntectivity MIDI4+ providing around 8 hardware MIDI in/outs to my iPad.

Prior to upgrading my iPad to iOS 14.4, I don't ever recall having this problem. Given the way notes are sticking because of missing Note Offs, this is currently not usable for performances.
Mof
Posts: 14
Joined: Sat Apr 18, 2020 2:42 am

Re: Note On/Off Lost on Virtual Input

Post by Mof »

Latest beta with missing note fix seems to work for cases where a Virtual Input is assigned to at most 1 route.

If a Virtual Input is used on more than 1 route, the missing note problem is still present.
Mof
Posts: 14
Joined: Sat Apr 18, 2020 2:42 am

Re: Note On/Off Lost on Virtual Input

Post by Mof »

Thank you for addressing this issue with the latest buffer increase in the 2.2.19 beta.

In regards to the buffers that were increased, is this a Virtual Input, Route, or Preset wide buffer and what are the expected limitations on number of routes/use of virtual inputs/simultaneous notes that can be configured and used?

Is perhaps the addition of a configuration setting for the buffer size something that might be useful for cases where a large preset is being used that might hit these limits? Perhaps even something that can be manually entered into a shared/imported preset file?
User avatar
Johannes
Site Admin
Posts: 138
Joined: Mon Mar 25, 2019 3:06 pm

Re: Note On/Off Lost on Virtual Input

Post by Johannes »

I think I was able to remove the buffer completely so that there is no limitation as you have mentioned. Please let me know if today's version works for you.
Mof
Posts: 14
Joined: Sat Apr 18, 2020 2:42 am

Re: Note On/Off Lost on Virtual Input

Post by Mof »

I have only been able to give it a quick test today, but so far so good and no stuck notes. I'll be giving it a more thorough test over the next few days, but prior to the buffer increase build, the issue would have appeared with the presets and combinations I was testing with this evening. So as I said, so far so good :) Thanks again for addressing the issue.
User avatar
Johannes
Site Admin
Posts: 138
Joined: Mon Mar 25, 2019 3:06 pm

Re: Note On/Off Lost on Virtual Input

Post by Johannes »

Hi, did you have time to make some more tests?