Detect type 1 (multi-track) MIDI files.#132
Merged
Merged
Conversation
Also increases the base-octave one up, since all test files (Duke Nukem 3D and Doom) ended up the very low bass area. Fixes bug adplug#40
Malvineous
previously requested changes
Feb 20, 2022
* Move General MIDI type 0 vs type 1 detection into load instead of rewind * Remove two debug printfs that are a bit redudant. * Single track loading from "LucasArts AdLib MIDI" files where accidently blocked
Member
Yes you're right, I can confirm this, but since it breaks LAA playback, it needs to be investigated separately. Please create an issue for it. |
Comment on lines
+978
to
+982
| while ((curtrack == 0) || | ||
| ((midi_type == 1) && (curtrack < 16))) | ||
| { | ||
| /* MIDI type 0 (and LucasArts AdLib MIDI) stores all the MIDI channels in a single track, | ||
| * while MIDI type 1 splits each channel into separate tracks */ |
Member
There was a problem hiding this comment.
Well actually MIDI type-1 may have more than 16 tracks, and some of them may share one channel, like drum tracks (one track per drum type, but they all use channel 10 anyway).
Looks like this MID player is yet limited to 16 channels, so I'm ok with this.
binarymaster
requested changes
Dec 11, 2022
Adam's review has been addressed.
binarymaster
approved these changes
Dec 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also increases the base-octave one up, since all test files (Duke Nukem 3D and Doom) ended up the very low bass area.
Fixes bug adplug #40