If the title caught your interest, you probably have a piece of hardware with a built-in sequencer that you'd like to synchronize with Reaper. For me, it's FutureRetro Revolution - a TB303 clone, where the internal sequencer is an essential part of the deal. Unfortunately, when using external sync from Reaper, it lags noticeably enough to kill all groove, and this led me on a quest for proper MIDI sync solution.
Reaper's option "shift output to MIDI device" didn't help - apparently, the shift time is limited to audio buffer size. My audio card has maximum buffer size of 8192 samples, which is not enough to compensate for a 10 msec lag. Even if it were possible, this would result in all audio being delayed by the same amount, which makes playing much less enjoyable.
Next I considered hardware solutions - InnerClock SynGen and the ExpertSleepers suite of modules and plugins. SyncGen is close to perfect, but very expensive - on par with what I paid for the Revolution! The ES suite is better in that it provides not only MIDI clock, but 5 MIDI outputs with sample-accurate timing. This isn't cheap either, and to use it you need a modular case, two ES modules (one of which is currently out of stock) and their plugin; besides, you must work at 48 Khz.
Back to square one. Problem with Reaper is that when playback starts, it sends MIDI Start immediately, and the device has no time to catch up. If we could give it a count-in (like the drummer counting "1,2,3,4" to other band members), it would have the time to compensate for the lag and start in sync.
So I implemented this idea as JS plugin, and it works.
Plugin page in Reaper stash:
https://stash.reaper.fm/v/21479/adjus...20MIDI%20clock
Direct download:
https://stash.reaper.fm/21479/adjustable%20MIDI%20clock
Important: Make sure to uncheck "Send clock/SPP to this device" in preferences, or your hardware will get two conflicting clocks and probably become very confused (I didn't try it
)
Parameters:
slider1: count-in (0,1 or 2 bars).
slider2: additional shift of the MIDI Start message (-10..+10 msec).
slider3: shifts the MIDI clock messages (pulses) back or forward, in percent of a pulse duration.
slider4: clock rate multiplier: normal, half-time or double time. This was added for completeness, and because it was trivial to do. I considered adding odd multipliers too (e.g. 2/3 or 3/2 clock are just as easy to do), but I'm not sure if that's really useful.
I have achieved nearly perfect sync with the Revolution and MPC1000, using slider2=0 and slider3 at about -90%. Interestingly, I found that tempo-based shift works better at different tempos than time-based one.
Please let me know if you find this useful!
Suggestions for improvements are welcome too.