Latency adjustment

The place to suggest and discuss potential new features on the device

Moderator: MidronomeTeam

Post Reply
mynameisdanno
Posts: 11
Joined: 06 Mar 2022, 18:32

Latency adjustment

Post by mynameisdanno »

I know the current hardware design won't allow for dedicated knobs for real-time adjustment of per-output latency, but I would like to recommend at least providing menu-configurable latency adjustments per output. I have found that some popular gear (most often, effects pedals) have some inherent latency that needs to be compensated for when sync'd to MIDI clock. The Boss SL-20 is one example, and I've found the Eventide H9 on certain "chopper" type presets to need adjustment as well.

A range of +/- 100ms range should be adequate to adjust for this type of issue.

The Multiclock implementation for negative offsets (wait a bar after the internal clock starts running before beginning to send clock to outputs with appropriate offset applied) works fine, since local modifications to the space-time continuum are probably off the table.
Simon
Posts: 181
Joined: 09 Jan 2022, 22:08

Re: Latency adjustment

Post by Simon »

Nice to hear Daniel and thank you for writing! :)

Are you also the one who gave me that whole list on Facebook about how many usages you have of the per-output latency adjustment? :D

I'm gonna be very open about this - there are two issues with implementing this:
1) First because of the way the MIDI Clock is sent it's actually a lot of code work - that means time to code, time to test, more troubles down the line.
(just FYI the reason the MIDI Clock is implemented in a non-standard way is how I could obtain such a low jitter)
2) The settings interface is very limited, it's basically just a knob you can turn and press, and a 3-digit LED display. So there are no possibilities for menus and like. And the list of settings is already getting very long.

So, with that in mind, what would you say to having a simple setting, a value in milliseconds (0 by default, probably 150 max) which will be a latency added on MIDI Output #2? If you need to have negative offset simply use MIDI Output #1 (which compared to Output #2 will have negative offset).

If that works, what about the audio click and the CV/Analog/DIN outputs? The easiest is for them to stay where they are, with Output #1, but I guess you would want them to be moved as well, so the setting is basically negative latency on MIDI Output #1.

Let me know :D
mynameisdanno
Posts: 11
Joined: 06 Mar 2022, 18:32

Re: Latency adjustment

Post by mynameisdanno »

Yes, that was me with the long list on Facebook!

Your solution of only providing for offset on only one of the MIDI outputs seems like a fairly elegant one. It minimizes the added complexity to the interface design, as well as implementation and testing. I also think it's "good enough" because:
1) one hopes you won't have more than one misbehaving device in your rig.
2) My only experience with devices needing negative offset to line up properly has been with ones that take MIDI clock. I think parsing MIDI clock is where some of these programmers get a little out of their depth, or don't do enough testing, and fail to minimize or internally compensate for the resulting latency (not naming names, but guitar pedal makers are the main culprits in my experience).
3) I am not a big modular guy, but I would think that devices that clock to CV/Analog/DIN sync are hopefully a little more likely to be "bang on", so not having the ability to dial in offset there should be fine.

Unfortunately, the type of offset I need to dial in most frequently is negative offset. Typically I'm trying to compensate for a device that has some internal latency, in order to bring it back into time with the metronome that everyone's playing to, or to compensate for a synth patch or tremolo-type effect with a soft attack envelope, where I want the notes to begin sounding sooner to partially compensate. These are scenarios where the MIDI clock needs to be slightly ahead of the metronome.

If you can't easily implement negative MIDI clock offset with respect to the metronome in this revision, it's probably not worth the complexity of including offset adjustment at all; positive offset is much less likely to be needed, in my experience. In fact, I'm not sure that I've ever needed positive offset with respect to the click for any reason, though I can see that someone going for a "Dilla time" feel might want to have something consistently late on the grid.

An alternate approach to getting negative offset would be to just implement an adjustable delay on the metronome audio output. Depending on what software/hardware you've implemented this thing in, this might be easier to implement. It would essentially result in a negative latency on all outputs, rather than only one of them, but many of your customers will only be trying to sync up a single device (that's most often all I'm trying to do). Of course, the truly determined can always just put a delay effect on the metronome output, set it to 100% wet, single repeat, and dial in the delay time to taste!
Simon
Posts: 181
Joined: 09 Jan 2022, 22:08

Re: Latency adjustment

Post by Simon »

Ha ha good point about putting a delay on the metronome - did not think of that :D

I understand about the delay, and yes I guess most people would want a negative offset.

I'll experiment implementing a simple setting then, which will be a negative offset on one MIDI Port.
I'll keep this thread updated ;)
lrbouchard
Posts: 1
Joined: 16 Mar 2022, 14:42

Re: Latency adjustment

Post by lrbouchard »

Hi,

About the metronome delay, here is an other use : when I am looping guitar with a looper, I always click the record buttons some ms before my attack of the strings to be sur to get it. When using midi clock, the vast majority of midi sync guitar looper start recording right on the midi beat, so if the click is too tight on the midi beat, it is possible that the looper starts recoding some ms after the attack, loosing it. I did some test with an other midi clock with metronome and a 50ms delay was perfect in my setup.
n4Sphere
Posts: 65
Joined: 16 Mar 2022, 23:21

Re: Latency adjustment

Post by n4Sphere »

i started to get some hardware over the last year and midi is just a a miracle. ableton as a host does not work for me. so i was really looking at the erm multiclock and what i saw and heard when changing the latency with the knobs was really effective. there is one knob and some leds. it could work. maybe also with a simple shift function by holding play oder mute. i dont‘ know if negative or positive latency is needed, but having a tight midi clock where i can adjust the latency on output 2 would be beneficial.

cheers.
Simon
Posts: 181
Joined: 09 Jan 2022, 22:08

Re: Latency adjustment

Post by Simon »

Awesome, guys, thanks for writing.

@n4Sphere: will the solution written above fit for you? There will be no knob to change it directly, i.e. the only way to adjust will be in the settings. The idea being that you set it once so it fits your needs, and that's it.
n4Sphere
Posts: 65
Joined: 16 Mar 2022, 23:21

Re: Latency adjustment

Post by n4Sphere »

everything what makes this unit more versatile works for me :)
Post Reply