View Issue Details

IDProjectCategoryView StatusLast Update
0001628OpenMPTFile Format Supportpublic2022-09-11 15:19
Reporterstgiga Assigned ToSaga Musix  
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindowsOS Version11
Product VersionOpenMPT 1.30.06.00 / libopenmpt 0.6.5 (upgrade first) 
Target VersionOpenMPT 1.30.07.00 / libopenmpt 0.6.6 (upgrade first)Fixed in VersionOpenMPT 1.30.07.00 / libopenmpt 0.6.6 (upgrade first) 
Summary0001628: Soundfont instruments are not matched properly if bank LSB doesn't match
Description

On 1.30.06.00 and 1.31.x, as well as on older versions of 1.30, there is a bug where the Chip Noise (General MIDI Seashore but with MSB Bank Select 17, but to my knowledge it ALSO happens on the MSB 16 mapping of it. The MSB 17 patch on Roland SC-88Pro and 8850 [and possibly 88] is White Noise, while MSB 16 is Pink Noise.) of my JummBox SoundFont (https://musical-artifacts.com/artifacts/2338) gets imported as Seashore, completely ignoring the bank selects. However, OTHER patches in other MSB bank selects still function. In my MIDI of Doric Dream's FamiCommodore, the NyctophobiaV2 lead (mapped to MSB Bank Select 3 of 87 [Bass and Lead], that mapping being the Roland SC-8850 mapping for JUNO Rave, which I thought fit the theme) functions properly. Either OpenMPT's Import MIDI Library and Add Sound Bank is still fixated on the older version of the bank which didn't have Chip Noise (Ironically, you can drag the patches from the bank over the erroneous Seashore in those MIDIs, but this does not fix situations in which an SC-88Pro song uses both Seashore and White Noise, for which replacing the Seashore hits ALL uses of it.) This is a bug with the MIDI import.

Steps To Reproduce

1: In the MIDI Library, remove GM.DLS
2: Use Import MIDI Library and Add Sound Bank on the JummBox SoundFont
3: Import SomethingUnreal's Mii-Tan No Mahou de Popotan MIDI http://misaka.selfip.net/88pmidi/midi/MiitanMahou.zip, The MIDIs under "SC-88Pro/Nintendo/Mario Land", "SC-88Pro/Nintendo/Mario Land 2", "SC-88Pro/Nintendo/Tetris", "SC-88Pro/Nintendo/Tetris (NES)", "SC-88Pro/Nintendo/Kirby's Adventure", other similar MIDIs in the other "SC-88Pro/Nintendo"-contained folders, and the MIDIs in the "SC-88Pro/Silver Surfer" folder. All of these MIDIs besides the SomethingUnreal one are in the Sound Canvas MIDI Collection on Archive.org. You may have to extract them from any LZH archives they may be in (7Zip can do LZH).
4: Open the list of Samples and Instruments in the song. Instead of seeing Chip Noise, you will see Seashore.

Additional Information

Also, trying this MIDI in the link below the description of this video https://www.youtube.com/watch?v=yj8ti43XkOA (you need to LZH extract it too) has the same bug. For MIDI import, I use 1/96ths quantization and an import resolution of 16 ticks per row and a pattern size of 1024, for max detail.

TagsNo tags attached.
Has the bug occurred in previous versions?Yes
Tested code revision (in case you know it)

Activities

Saga Musix

Saga Musix

2022-08-30 17:43

administrator   ~0005291

I don't think SF2 import currently supports more than 128 banks - or rather, anything above bank 128 is simply mapped as a "drums" bank.

stgiga

stgiga

2022-08-30 17:55

reporter   ~0005292

I'm not referring to banks above 128. I'm referring to Bank 16 and Bank 17. And yes, the Bank 3 Nyctophobia import worked (among others). It's for these specific variations that it's failing on.

Technically SF2 can do MSB and LSB if you use all 16 bits of the wBank value, but no SF2 editor has support for that yet, and the bank I'm using doesn't do that. All that happened in the SF2 import is a booboo with MIDI import. The entire SF2 is read properly by the Add Sound Bank and Import MIDI Library, it's just that in this one small case it fails to import something that it otherwise would fail on. I've proven before that SF2 import is not GM-only.

Saga Musix

Saga Musix

2022-09-03 17:21

administrator   ~0005295

The problem here is that the MIDI file in question also sets a non-zero bank LSB, so OpenMPT cannot find the correct bank in the file. I suppose at least for SF2 files we could fall back to ignoring the LSB when trying to find a suitable instrument. Not sure if it would be the right thing to do with DLS banks.

stgiga

stgiga

2022-09-03 21:19

reporter   ~0005296

Considering that SF2 has wBank as a 16 bit ripe for expansion into MSB+LSB like me and a friend are working, that ignore setting should be a toggle. But otherwise that's a good idea.

Saga Musix

Saga Musix

2022-09-04 12:56

administrator   ~0005297

Do you mean that the upper 8 bits of the wBank value would be used for the LSB then (i.e. MSB and LSB are swapped)? If so, support for that would have to be added in OpenMPT first anyway.

Saga Musix

Saga Musix

2022-09-04 13:53

administrator   ~0005298

Implemented in r17809. Note that a perfect MSB+LSB match is still preferred over just a s MSB match.

Issue History

Date Modified Username Field Change
2022-08-30 17:35 stgiga New Issue
2022-08-30 17:43 Saga Musix Note Added: 0005291
2022-08-30 17:55 stgiga Note Added: 0005292
2022-09-03 17:21 Saga Musix Note Added: 0005295
2022-09-03 21:19 stgiga Note Added: 0005296
2022-09-04 12:56 Saga Musix Note Added: 0005297
2022-09-04 13:53 Saga Musix Assigned To => Saga Musix
2022-09-04 13:53 Saga Musix Status new => resolved
2022-09-04 13:53 Saga Musix Resolution open => fixed
2022-09-04 13:53 Saga Musix Fixed in Version => OpenMPT 1.30.07.00 / libopenmpt 0.6.6 (upgrade first)
2022-09-04 13:53 Saga Musix Target Version => OpenMPT 1.30.07.00 / libopenmpt 0.6.6 (upgrade first)
2022-09-04 13:53 Saga Musix Note Added: 0005298
2022-09-11 15:19 Saga Musix Summary SF2 import bugged on certain MSB Bank Select and Preset values => Soundfont instruments are not matched properly if bank LSB doesn't match