Author Topic: Syncing MIDI Input / Output to Reaper  (Read 884 times)

Offline sonofpoog

  • Shy artist
  • Posts: 3
  • Operating System: Windows 8
Syncing MIDI Input / Output to Reaper
« on: March 01, 2022, 03:54:15 »
hey there

tonight i've been setting up modplug to work in conjunction with reaper, as my workflow has me sequencing in modplug and exporting out the stems for arrangement in reaper. i originally set out to find a way to output individual instruments from modplug as audio into reaper in their own separate tracks, but i don't think this is feasible as far as i know.

so instead i created 8 virtual MIDI devices with loopMIDI (https://www.tobias-erichsen.de/software/loopmidi.html) and use MIDI Input / Output on the channels in modplug accordingly. it works as expected, i can sequence in modplug and record the audio over in reaper into their own channels; however the syncing of the notes is not accurate at all. is this just to be expected with midi or is there some hidden feature in the MIDI Input / Output plugin that will sync the two? or perhaps there's someone with reaper knowledge who has had better luck with this. i can't find much about it online. i guess i could go back to just rendering out individual stems, but that kind of defeats the purpose of trying to expedite my workflow. any thoughts are appreciated!

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,507
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Syncing MIDI Input / Output to Reaper
« Reply #1 on: March 01, 2022, 09:12:50 »
Generally you should try to keep the update period in OpenMPT's sound settings as low as possibile for jitter-free MIDI output - 5ms or lower. OpenMPT's MIDI output is unfortunately not jitter-free in its current design, as audio is always processed in chunks (defined by the latency and update period) and if one such chunk contains more than one tracker tick (which is quite likely to be the case), the MIDI output of those two ticks might be grouped together and be sent at the same time.
I haven't tried it, but maybe Tobybear's MIDIBag would work better for you, as it would avoid having to go through the real-time MIDI loopback ports: In OpenMPT, you would create VST2NET instances (sending data to localhost), and in Reaper you would add NET2VST instances to reverse the process.
» 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.

Offline sonofpoog

  • Shy artist
  • Posts: 3
  • Operating System: Windows 8
Re: Syncing MIDI Input / Output to Reaper
« Reply #2 on: March 01, 2022, 22:16:29 »
Generally you should try to keep the update period in OpenMPT's sound settings as low as possibile for jitter-free MIDI output - 5ms or lower. OpenMPT's MIDI output is unfortunately not jitter-free in its current design, as audio is always processed in chunks (defined by the latency and update period) and if one such chunk contains more than one tracker tick (which is quite likely to be the case), the MIDI output of those two ticks might be grouped together and be sent at the same time.
I haven't tried it, but maybe Tobybear's MIDIBag would work better for you, as it would avoid having to go through the real-time MIDI loopback ports: In OpenMPT, you would create VST2NET instances (sending data to localhost), and in Reaper you would add NET2VST instances to reverse the process.

i was searching for MIDIBag all night last night and couldn't find it archived anywhere, awesome. i'm having a go with it, VST2NET on a channel in modplug and NET2VST on a channel with a sampler in reaper, and i can only seem to trigger the sample with the MIDI keyboard in modplug as opposed to sequencing a pattern. i'm not sure if i'm missing a routing option or something in modplug or if this is a reaper-specific issue so i'll keep this here in case anyone has some feedback and i'll update if i figure it out (:

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,507
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Syncing MIDI Input / Output to Reaper
« Reply #3 on: March 01, 2022, 22:18:14 »
VST2NET registers as a regular effect rather than an instrument plugin, so you will explicitly have to set up an instrument using that plugin and specify a MIDI channel it should send to. Does it work if you do that?
» 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.

Offline sonofpoog

  • Shy artist
  • Posts: 3
  • Operating System: Windows 8
Re: Syncing MIDI Input / Output to Reaper
« Reply #4 on: March 02, 2022, 00:59:09 »
it does indeed work that way! however i'm having the same issue regarding the sync even with the period increment decreased in the soundcard settings. thanks so much for helping set up, i'll continue to tinker further.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,507
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Syncing MIDI Input / Output to Reaper
« Reply #5 on: March 02, 2022, 09:14:16 »
Okay, that hints at VST2NET not containing any extra timing information then, I thought that it might be a bit more advanced than a realtime MIDI loopback. But in that case, the same restrictions as for MIDI loopbacks will apply.
» 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.

Offline tristidigezh

  • Shy artist
  • Posts: 3
Re: Syncing MIDI Input / Output to Reaper
« Reply #6 on: March 13, 2022, 13:25:33 »
Hey, not sure if this is what youre looking for but I use the built in ReaRoute from Reaper and select the ReaRoute Asio Driver within the MPT client.
It's not MIDI, but you could do your work in MPT and then send it to wav or whatever.

I should add you can play VST's on MPT while recording in Reaper at the same time. It also has "Hardware Timing" when you choose the ReaRoute Driver inside of the Soundcards tab in MPT.

« Last Edit: March 13, 2022, 13:29:40 by tristidigezh »
Brein eo ar restr-mañ pe savet fall