Closed rualark closed 5 years ago
Everything seems ok in initial config: Instruments = "Flute,Flute,Oboe,Clarinet,Clarinet,Bassoon,Horn,Horn,Trumpet,Timbales,Cymbals american,Violins section,Violins section,Violins II section,Violins II section,Violas section,Violas section,Cellos section,Contrabasses section" # Injected by Marie-Helene Choquette at 2019-03-29 04:07:03
But next config shows problem: Instruments = "Flute,Flute,Oboe,Clarinet,Clarinet,Bassoon,Horn,Horn,Trumpet,Timbales,Cymbals american,Violins section,Violins section,Violins II section,Violins II section,Violas section,Violas section,Cellos section,Contrabasses section" # Injected by Marie-Helene Choquette at 2019-03-29 04:07:03 "//21": Volume = "0" # Injected by Marie-Helene Choquette at 2019-03-29 04:36:03 "//20": Volume = "0" # Injected by Marie-Helene Choquette at 2019-03-29 04:36:03 "Contrabasses section/Arco/19": Volume = "88" # Injected by Marie-Helene Choquette at 2019-03-29 04:36:03 "Violas section/Arco/16": Volume = "88" # Injected by Marie-Helene Choquette at 2019-03-29 04:36:03 "Trumpet/Normal/9": Volume = "113" # Injected by Marie-Helene Choquette at 2019-03-29 04:36:03
Actually, there are only 19 instruments, but user changes volume for instruments 20 and 21
Yet there seems to be some instrument 21:
Which is actually empty even at 0 dB render:
This is also proven correct by midi file explorer:
So this problem seems to happen because of empty tracks. What happens if there are empty tracks in between?
Empty example shows that first and last empty tracks are omitted:
But later they are added at the bottom:
So, first tracks are lost, while last tracks are sent to default instrument:
Solutions:
Usually empty tracks are not needed, but in some situations it is convenient to show them, so that instrument mapping becomes universal
The source of this problem lies in two different MIDI import algorithms in PHP and C++
Last track can actually contain unneeded information