Author Topic: Any way to export as MIDI with loop markers?  (Read 607 times)

Offline KingWolf

  • Shy artist
  • Posts: 9
  • Gender: Male
    • RMSoftware Development
  • Operating System: Windows 10 Professional
Any way to export as MIDI with loop markers?
« on: August 15, 2021, 00:38:16 »
Hello, I've composed something with a position jump (B01) to create a loopable sequence. However, when exporting as MIDI, this is lost. Is there a way I can include a midi macro that sets loop start and loop end messages? Any advice is appreciated.

Cheers!

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,125
    • http://lpchip.nl
  • Operating System: Windows 10 Pro x64
Re: Any way to export as MIDI with loop markers?
« Reply #1 on: August 15, 2021, 10:15:28 »
I don't think this is supported in MIDI. But keep in mind, OpenMPT is a module tracker, not a midi editor. Export to midi should only be used in very rare occasions where you need to export some notes for another program, not a whole song.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline KingWolf

  • Shy artist
  • Posts: 9
  • Gender: Male
    • RMSoftware Development
  • Operating System: Windows 10 Professional
Re: Any way to export as MIDI with loop markers?
« Reply #2 on: August 15, 2021, 13:08:34 »
I don't think this is supported in MIDI. But keep in mind, OpenMPT is a module tracker, not a midi editor. Export to midi should only be used in very rare occasions where you need to export some notes for another program, not a whole song.

Ah ok, that's understandable, I was able to export it without the control set pattern to get the desired loop. I understand OpenMPT is not intended for use with midi, but man... it is pretty good at it lol, especially for xmp-midi

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,349
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Any way to export as MIDI with loop markers?
« Reply #3 on: August 15, 2021, 17:14:28 »
OpenMPT could support this in theory, but it's not trivially doable (otherwise it would probably already exist).  There are several non-standard ways of specifying loop markers in MIDI, but what they have in common is that a loop start marker has to be inserted at the loop start, which is not trivially doable in OpenMPT's MIDI export - OpenMPT only knows that there will be a loop once it has arrived at the loop end, and the command found at the loop end also determines where the loop start is. So by the time OpenMPT would have to write a loop start marker into the MIDI file, it doesn't even know yet that there will be a loop.

However, I think what we could be doing is write pattern names to MIDI files as cue points, and then you could name the pattern that should server as the loop start as "loopStart" - this is one of the unofficial ways to define the loop start in a MIDI file. I'm not sure if it also strictly requires a "loopEnd" marker - you'd have to add that marker past the last played pattern, I think.
» 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 Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,349
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Any way to export as MIDI with loop markers?
« Reply #4 on: August 15, 2021, 18:32:10 »
After having a closer look, the loop start information as already available in the MIDI export at the right point in time, so the next OpenMPT update will write "loopStart" and "loopEnd" cue markers, which are supported by xmp-midi.
» 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 KingWolf

  • Shy artist
  • Posts: 9
  • Gender: Male
    • RMSoftware Development
  • Operating System: Windows 10 Professional
Re: Any way to export as MIDI with loop markers?
« Reply #5 on: August 15, 2021, 20:35:53 »
After having a closer look, the loop start information as already available in the MIDI export at the right point in time, so the next OpenMPT update will write "loopStart" and "loopEnd" cue markers, which are supported by xmp-midi.

Ooh excellent to hear! ;D Many thanks