Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioUtil: Use of MIDI Channel 10 is incompatible with (at least some) MIDI synths and decoders #47

Open
sm-Fifteen opened this issue Nov 10, 2019 · 0 comments

Comments

@sm-Fifteen
Copy link

sm-Fifteen commented Nov 10, 2019

Some of the tracks I have exported appear to have missing instruments when attempting to play them back. Very noticeable on 7_B_MAP_GUILD_01 where channel 10 is mapped to intro trumpet track. Swapping channel 1 (the flute/whistle) with channel 10 causes that track to become audible but then track 1 becomes silent, so it's not a problem with the soundfont or the track data itself.

Having looked into it, this seems to be because of how track 10 is usually reserved for percussions, so instruments on those tracks are assumed to be in a separate soundbank which is not populated in the generated soundfont. That limitation is noted in the README for the -gm option, but it seems like most MIDI software (at least what I could get my hands on) will apply that rule regardless. Shouldn't ppmdu avoid using channel 10 whenever possible?

Tested with FluidSynth (on Linux), with the MIDI importer for OpenMPT and with a MIDI piano. Fluidsynth and OpenMPT would fail to load/find the associated samples and the MIDI piano did nothing.

EDIT: Just noticed that comment, looks like you tought of that too, but even as a solution for General MIDI it has enough issues that you'd want to phase it out eventually...

/*
RearrangeChannels
Try to free channel 10 if possible, and if not, set a track that has a 0x7F program change on chan 10.
Only for GM conversion. Should probably get phased out eventually, because its pretty bad at its job.
Not that swapping stuff from channel to channel is easy..
*/

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

No branches or pull requests

1 participant