Files
regulus79 658ce003d9 Fix Midi Import of Multi-track File and CC Automation (#8383)
Previously, importing midi files containing multiple tracks was not supported. All of the notes got merged onto a single track.

Except, LMMS actually does support multi-track midi import, it just ignores the track index when placing the notes, and simply puts them in tracks based on their midi channel instead. LMMS does not support setting the channel of an individual note, so separating the loaded midi events onto separate tracks based on their channel does make sense.

But we don't have to choose one or the other! This PR makes it so that the notes in midi files are split into different tracks based on both their midi channel and midi track. This allows midi files which contain multiple tracks to be loaded normally, and hopefully even multi-channel multi-track midi files.

Additionally, some midi files contain a wealth of information regarding midi CC automation. Currently, we only handle pitch, panning, volume, and bank automation when importing midi files, but this PR also makes it so that the knobs in the instrument track CC rack are also automated.

NOTE: Regarding the CC automations, some CC numbers correspond to things like panning and volume, which are real knobs in lmms. In the case that one of these CC's are automated, it creates an automation track for that specific lmms knob. Otherwise, it automates the knob in the instrument track's midi CC rack.
2026-05-14 13:23:23 -04:00
..