no resolve for MidiPort::realtime_locate at loop end#968
no resolve for MidiPort::realtime_locate at loop end#968jsundqvist wants to merge 1 commit intoArdour:masterfrom
Conversation
|
Could you say more about this? Your commit means that there are now cases that will not resolve on-notes, which will lead to them being stuck. How does this change avoid that? |
|
or in other words: Why should loop-end not resolve note? |
|
It turns out that note resolve at loop end is already handled (correctly) by This is what's causing the choking of my TD-27 drum module on the first bar of the loop, and is an incorrect way to resolve notes unless we are also stopping playback, which is probably why the parameter I verified using Simple Synth that a note extending outside of the loop is resolved at loop end just as before my change. |
|
Do you have some citation regarding the use of ALL_NOTES_OFF being "incorrect" ? |
The MIDI Mode Message Control Change #123, "All Notes Off," is designed to immediately stop all sounding notes on a particular MIDI channel. While useful for preventing "stuck notes," it can sometimes lead to unexpected behavior or side effects, especially with older or less robust MIDI implementations. Here are some common side effects and issues associated with MIDI CC #123:
Workarounds and Solutions:
In summary, while "All Notes Off" (CC #123) serves a critical purpose in preventing stuck notes, its common side effects stem from inconsistent implementation and its broad nature, which can sometimes lead to unintended silencing of sounds. |
|
While some of the points made are fair, I do not accept citations from LLMs as evidence. We could potentially add an option to never send All Notes Off (and also All Sound Off). |
|
I can't believe I have to wrestle you to get things fixed. Anyway, here's some more LLM jibberish for you: The notion of "unnecessary transmission" for MIDI CC #123 (All Notes Off) stems from the original intent and limitations of the MIDI specification, as well as practical issues observed by musicians and developers over time. Here's a breakdown of the sources and reasoning behind this bullet point: MIDI Specification and Intended Use:
Historical Implementation and "Stuck Notes":
Modern DAW/Sequencer Behavior and Best Practices:
In essence, "unnecessary transmission" refers to situations where CC #123 is sent more frequently or in contexts beyond its original "panic" or "reset" intent, often by older hardware designs or by software implementations that don't fully adhere to best practices for modern MIDI sequencing. The ideal is to only send it when genuinely needed to clear stuck notes, rather than as a routine part of a MIDI stream. |
|
Or, let's put it like this: I have a hardware device from a well-known (albeit not perfect) manufacturer that is behaving in an unwanted manner because of Ardour. What "evidence" do you have that the current implementation is correct, and is not causing unwanted side-effects? |
|
Here is the actual MIDI Manufacturer's Association specification for MIDI 1.0 "Messages 123 through 127 also function as All Notes Off messages. They will turn off all voices controlled by the assigned Basic Channel. These messages should not be sent periodically but only for a specific purpose. In no case shall they be used in lieu of Note Off commands to turn off notes which have previously been turned on. Any All Note Off command (123-127) may be ignored by a receiver with no possibility of notes staying on, since any Note On command must have a corresponding specific Note Off command". MIDI 1.0 Detailed Specification 4.2, page 20 So, Ardour's MidiStateTracker takes care of sending the Note Off commands required, but Ardour additionally sends an All Notes Off command as a "belt and braces" approach. One can certainly make the argument that this is redundant, but as usual the MMA spec was not tightly worded enough to get completely consistent behavior on the part of either senders or receivers. Your TD-27 module is also in the gray zone, failing to ignore the All Notes Off command effectively, even though a Note Off is sent for every Note On. There are hardware modules that fail to turn all notes off based on individual Note Off commands under a variety of circumstances (e.g. following MIDI Clock from the sender, and receiving Note Off commands after an apparent locate, or before the apparent locate, or both; or because there are too many Note Off command with the same timestamp (clearly, not in compliance with the spec, but they exist). Hence Ardour's "belt and braces" approach: send all the required individual Note Off commands and an All Notes Off command to make sure that what we intend to happen definitely happens. I favor making the All Notes Off command a preference item, though a complete implementation would do this on a per-track or even per-port basis, depending on what is connected to the port and/or what plugin(s) are in the track. |
|
Also, re: "I can't believe I have to wrestle you to get things fixed." I don't know why you'd be certain that this is so cut-and-dried obvious that no discussion is necessary. I'd like to see this issue (i..e "certain synth modules misbehave when Ardour sends an All Notes Off command at loop end") get fixed, but experience over 25 years suggests that such issues frequently have more dimensions to them that is immediately apparent to the eye, and I would prefer not to break other "certain synth modules" in an attempt to fix it. |
I was going to suggest that (global pref, which can be overridden at track level), or initially just a per-track option, available from the track header (we already have related MIDI Patch Restore option there, to help with some synths). What I don't understand is how this change is made on a per-port level, and not in the signal flow itself. Surely it would be better handled at the Source, here |
|
@x42 the parameter was introduced by @pauldavisthefirst in Dec, 2019 (febaa1f) but only used in DiskReader: In Jan, 2020 Plugin was changed to take this parameter into account, also by @pauldavisthefirst (5948d14): I think it's great, but I don't know any better. Why would you rather handle it in |
The user has no relationship with the project, and batch approved all PR. Troll/Spam
fixes midi notes being cut short at loop start due to
resolve_notescall afterrealtime_relocatefrom loop end.tested and verified working with hardware on 8.12.