Skip to content

Conversation

@messmerd
Copy link
Member

@messmerd messmerd commented Aug 26, 2025

This PR replaces #5516, which was 5 years old and whose original fork/branch have since been deleted.

I tried to be careful when rebasing and fixing the conflicts, but there is a chance I made a mistake, so testing is needed.

TODO:
I made minimal changes to the original PR while rebasing, so I plan to do a round of modernization and style fixes to get this more presentable. After that, someone else is free to take over this PR.

Closes #5198
Closes #5287

- Map each instrument track to a different incremental MIDI channel (skipping channel 10)
- Map pattern tracks to channel 10 with patch 0, using repeated pattern from pattern editor
- Support Sf2 Player patches
- General refactoring
@RiedleroD
Copy link
Contributor

thanks for keeping the PR alive <3 been eagerly awaiting this since 2021

@c-eid
Copy link

c-eid commented Aug 28, 2025

Worked with about 10 midi files with this build. Worked amazing no issues other than volume and pitch not exporting. Good work reviving this.

@bratpeki
Copy link
Member

Is this "one file per track"? (With a little work) that solves every MIDI export issue, I feel like!

@c-eid
Copy link

c-eid commented Dec 12, 2025

Is this "one file per track"? (With a little work) that solves every MIDI export issue, I feel like!

No this puts all the current tracks in separate midi channels. In the same midi file. Before it would dump all in the first channel

@bratpeki
Copy link
Member

No this puts all the current tracks in separate midi channels. In the same midi file. Before it would dump all in the first channel

Oh, okay, so direct continuation of the last PR, okay!
The issue for projects with over 16 tracks still persists.

@c-eid
Copy link

c-eid commented Dec 12, 2025

No this puts all the current tracks in separate midi channels. In the same midi file. Before it would dump all in the first channel

Oh, okay, so direct continuation of the last PR, okay! The issue for projects with over 16 tracks still persists.

I've heard this sentiment a lot about why it's not being pushed. We could just dump the rest of the channels in the first one like the old one if it goes over 16. It's a improvement over the old system and that's all that matters

@bratpeki
Copy link
Member

It's an improvement over the old system and that's all that matters

A reasonable sentiment, sure. I think the reason it's not being pushed is that the process of reviewing and testing is time-consuming, and if the plan is nullifying what the PR does later anyway, that means there would be twice as much reviewing and testing and someone has to work on this PR knowing that it'll get nuked.

We could

What do you mean by "could"? Is the case for over 16 tracks not handled now? I wouldn't consider it an edge case, I currently have 31 tracks which are just instruments in my latest project, LOL.

@c-eid
Copy link

c-eid commented Dec 13, 2025

I think the ideal solution is to simply gray out the MIDI export. I'd say it is an edge case that someone who is actually using more than 16 channels wants to export as midi. Most people using that option simply want to use lmms as a midi editor. Separate track exporting should be exported elsewhere and should not replace this functionality.

@c-eid
Copy link

c-eid commented Dec 13, 2025

Nothing about this PR should be nuked ever. This is functionality that should be an lmms, and any other export ideas such as separate files per track should be an addition as they are trade-offs not better alternatives.

@Monospace-V
Copy link
Member

I think the ideal solution is to simply gray out the MIDI export. I'd say it is an edge case that someone who is actually using more than 16 channels wants to export as midi. Most people using that option simply want to use lmms as a midi editor.

It is less common that a user wants to export midi compared to how commonly a user has >16 tracks.

A common use case for export as midi is import into another program. MIDI is the primary standard for making projects cross-compatible, and there's nothing wrong with supporting it as a DAW.

I would still imagine an ideal solution is making it possible instead of greying out this option for a substantial number of projects based on what we assume they are and should be using LMMS for.

I have trouble considering that people who use lesser tracks are more likely to be engaging with the concept of MIDI, that users who use LMMS more to the point of more tracks are using it as a MIDI editor, or that these more intensive users have less likelihood of trying to work with their projects in a different or more capable DAW.

I feel like MIDI export has more use cases than we expect at first glance. We cannot be absolutely sure what uses and projects people want to export midi for, or plan to avoid enhancements based on what users should be doing.

@c-eid
Copy link

c-eid commented Dec 13, 2025

It's not like we're avoiding any future enhancements. I believe midi export should be in the actual tracks if they're individual, it just doesn't make sense for the user to have only the options of export standard midi up to 16 channels, or each track is separate. They most likely only need a track exported if they don't want the whole song in which you can have in the gear drop down an export button maybe above the clear option that would only select that track and export it to a new file. In which that would be a separate PR. And we're acting like this supposed export enhancement PR is going to happen while this is the fourth year in which this has been open (redo of an older one). Obviously it's not coming anytime soon.

@c-eid
Copy link

c-eid commented Dec 13, 2025

The testing time is minimal compared to the a bunch of extra time that someone in 4 years will need to redo this PR once again to get it to work. And then we will be putting the same situation again. Had to spend the first time this had been pull requested then I'd feel differently about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MIDI export exports everything as piano, making things out of tune More control over MIDI export?

6 participants