View Issue Details
|OpenMPT 1.31.04.00 / libopenmpt 0.7.3 (current stable)
|0001742: When a module is appended to another module, samples mapped to multiple instruments are duplicated
A small issue that can be a real headache when working with modules that use multiple envelopes for the same sample.
|No tags attached.
|Has the bug occurred in previous versions?
|Tested code revision (in case you know it)
Unfortunately this cannot really be solved easily because the code used for copying instruments from other modules is completely unaware of this. It would require a large rewrite (with added complexity) for little gain, especially when considering 0001744 as a potential alternative.
To be fair it would be nice if the copy instrument routine always checked for duplicates automatically. Occasionally I import an instrument only to realize one of its samples was already present in the module.
This can be a costly process (in the worst case, several GB of sample data would have to be scanned for identity), and it may not even always be what you wanted. For example you may absolutely want to create a second copy of an instrument in order to alter its samples. Always de-duplicating them doesn't sound like the right approach to me.
I meant to say this the other day, but that's a compelling point. I agree that the other issue I posted probably fixes this better.