View Issue Details

IDProjectCategoryView StatusLast Update
0000348OpenMPTGeneralpublic2013-03-17 17:37
Reporterharbinger Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Platformx86OSWindowsOS VersionXP
Summary0000348: Cleanup problems with more than one multisample instrument.
Description

When removing unused samples after cleanup, the samples are re-ordered when used by an instrument, which is fine, but the sample map section in the Instruments page and Sample Map dialog still shows the old sample numbers, and it affects the instrument trying to access samples that were reordered.
Also, sometimes, the number is not changed in the Instruments page, but it only seems to happen either right after startup, or when the Instruments page is displayed during cleanup (i couldn't isolate the behavior).

Steps To Reproduce

To test, load or create two separate multisample instruments which use different samples.
Enter a note calling the SECOND instrument in the Patterns page.
Run a cleanup, removing unused samples and instruments, and reorganizing the instruments when prompted.
Then check the Instruments page.
The sample map will shows the samples still assigned to the old samples. But when you check the Sample page, all the samples have been reordered. It's not a display drawing problem, because playing the instrument at the keys assigned will not play a sample.

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

Activities

Saga Musix

Saga Musix

2013-01-22 18:03

administrator   ~0001072

This should already be fixed in the latest test versions: http://sagagames.de/stuff/mptrack.exe

harbinger

harbinger

2013-01-30 21:44

reporter   ~0001086

I don't think the problem is fixed. What version of the "nightly" should i be using? -- Maybe that's the problem.

Sample waveforms are removed when deleting an Instrument from the Tree, but the slots remain. When i tested it with Cleanup, the Sample (slot) references were not changed in the Instruments Sample Map section.

Saga Musix

Saga Musix

2013-01-30 21:49

administrator   ~0001088

Please provide a minimal test case that reproduces the problem (minimal being a small file that demonstrates the problem when applying a clean-up right after loading the file, without any other steps inbetween), so that we are on the same level here.

harbinger

harbinger

2013-02-02 20:35

reporter   ~0001092

Last edited: 2013-02-02 20:37

Here's what i did:

  1. I created a new MPTM track under version 1.21.01.08, went to the Instruments tab, clicked on the "Import Instrument" icon, and chose two multisampled instruments.
  2. When they were loaded, i went to the Patterns page, and created one note with the SECOND instrument.
  3. I then ran Cleanup under the Edit menu, and set the following checkboxes:
    Patterns - remove unused
    Samples - remove unused
    Instruments - remove unused
    Plugins - remove unused
  4. I hit OK and the following prompts appeared:
    "Remove samples associated with an instrument if they are unused?" YES -- i think so
    (This is a bit unclear -- does this mean sample [slot]s if they are never called in any pattern, or in any instrument, if the instrument is unused?)
    "Open MPT detected 16 samples referenced by an instrument but not used in the song. Do you want to remove them?" YES -- i think so
    (Here, is it asking me if it should remove unused samples for an instrument that has notes in any pattern, or is this the sample slots for the unused instrument? Normally i would not want to remove any samples mapped to an instrument even if those samples don't have a chance to get played in a pettern -- i want to preserve all the samples for any used instruments, but rather discard all the samples (and slots) for any instruments i did not call.)

In this test, everything worked okay. All of instrument 2's sample slots were preserved, the samples slots were re-arranged, AND the sample map was re-organized to reflect the new sample indexes.
The problem here is the wording of Cleanup's prompts. Perhaps an extension to the prompt dialogs should tell the user what will happen if they press Yes or No.

For the second test, i did the same thing up to # 3. Before running cleanup, however, i manually deleted (with the contextual menu) the first Instrument in the Tree pane. I was prompted for the following:

"Remove Instrument 1?" YES
"Remove samples associated with an instrument if they are unused?" YES -- i think so

The sample waveforms were removed but the sample slots and all their settings remained. Instrument slot #1 was blanked but the slot remained.

When i ran cleanup (the same as above), i got the following prompts:
"Remove samples associated with an instrument if they are unused?" YES -- i think so
"Reorganize the remaining samples?" -- YES
"OpenMPT detected 6 samples referenced by an instrument but not used in the song. Do you want to remove them?" YES -- i think so

Very different results!
None of the sample slots were removed just simply erased of the waveforms. Even the filenames of the original samples weren't erased or reset (actually that may be a good idea). The only waveform that remained was the one mapped to the instrument with its note in the pattern. That shouldn't have happened -- the instrument should have been preserved; i just wanted to clean up the slots.
The Instrument WAS reindexed to 1, but the Sample Map list continued to show the old, un-re-arranged sample index numbers (but of course the only one that would play was the one for the note already present in a pattern.)
It appears the OpenMPT detection prompt is using the same words as the first test for a different meaning in the second test. In the first test, it was reminding the user that some of the sample slots were assigned to an uncalled Instrument, and wants to know if these slots should be discarded. In the second test, it was informing the user that there are samples assigned to an Instrument in which they are never called because the Instrument never uses them (by calling the notes mapped to them). While i admit there may be a time when you want to trim down filesize and reduce uncalled samples in a mapped Instrument, i think this deserves a different prompt or method. Normally i want to keep the Instrument's samples even if they are never called, especially for later revisiting or editing the track.

Saga Musix

Saga Musix

2013-02-03 00:53

administrator   ~0001094

<blockquote>
(This is a bit unclear -- does this mean sample [slot]s if they are never called in any pattern, or in any instrument, if the instrument is unused?)</blockquote>
The message has been clarified to say "Remove samples associated with unused instruments?".

<blockquote>Here, is it asking me if it should remove unused samples for an instrument that has notes in any pattern, or is this the sample slots for the unused instrument?</blockquote>
Is it that ambigious? I for one find it pretty clear, since it does exactly what it does: It removes samples that are associated to an instrument, but not used, i.e. not referenced in the pattern. How is that not clear enough?

I still don't think there is anything wrong. You say that the sample slots were re-arranged in your first try - that sounds like you enabled the "Rearrange samples" checkbox, but disabled it in the second run. Can you confirm this? Sample slots are never rearranged unless this box is explicitely checked. Deleting unused samples without checking this box will always leave their unused sample slots intact, it merely deletes the sample data. If that's not happening, please provide the test case by means of an actual tracker file, so that we can be sure that we are talking about the same thing (that is what I meant by a "test case" in the first place, not a length text that I have to understand first).

harbinger

harbinger

2013-02-08 20:05

reporter   ~0001095

"Open MPT detected 16 samples referenced by an instrument but not used in the song. Do you want to remove them?"

It seems like that an instrument could be called in a song, but because it's multisampled, any samples not played by the instrument (because the samples' notes weren't called) would be included with those samples belonging to instruments that were NEVER called. And we are being asked if we want all these samples deleted?

Also, there should be a clearer distinction between samples (the waveforms themselves) and sample slots. These two terms are treated synonymously with the word "samples," but removing a "sample" does not necessarily remove a sample slot.

I did not check "Rearrange Samples" in either test. By detailing which checkboxes i set, i wanted to make it clear what i was and was not setting...

The crux of the problem here seems to be what happens when you delete an Instrument from the Tree, and then try to clean up, versus what happens when you just run "Cleanup" without doing anything in the Tree's Instrument List.

I decided to not include the test cases because i knew i could explain it more clearly than what the resulting files would show. But if you want them, maybe you can see something that wasn't clearly explained here. Good luck with that.

I'll upload them the next time i'm online...

Saga Musix

Saga Musix

2013-02-09 02:22

administrator   ~0001096

<blockquote>It seems like that an instrument could be called in a song, but because it's multisampled, any samples not played by the instrument (because the samples' notes weren't called) would be included with those samples belonging to instruments that were NEVER called. And we are being asked if we want all these samples deleted?</blockquote>
Yes? I don't see how this could be made much clearer. 16 samples, not used in the song. But apparently referenced by an instrument, so they are useless and could be deleted. Which part of that isn't clear?

<blockquote>

I decided to not include the test cases because i knew i could explain it more clearly than what the resulting files would show.</blockquote>

Obviously that was not the case - I still don't see any issues here.

Saga Musix

Saga Musix

2013-03-12 20:00

administrator   ~0001124

Any news on this and your test case?

harbinger

harbinger

2013-03-17 17:33

reporter   ~0001136

Sorry, just got a new FT job, and i'm not in a composing phase right now. If you feel you've fixed the main problem, feel free to mark it as resolved. If in the future i still find this issue being a problem, i'll bring it up again. Thanks for tackling it and applying your fixes... 8)

Saga Musix

Saga Musix

2013-03-17 17:37

administrator   ~0001137

Alright, feel free to add any other comments or examples to this issue.

Issue History

Date Modified Username Field Change
2013-01-22 14:37 harbinger New Issue
2013-01-22 18:03 Saga Musix Note Added: 0001072
2013-01-22 18:03 Saga Musix Status new => feedback
2013-01-30 21:44 harbinger Note Added: 0001086
2013-01-30 21:44 harbinger Status feedback => new
2013-01-30 21:49 Saga Musix Note Added: 0001088
2013-02-02 20:35 harbinger Note Added: 0001092
2013-02-02 20:37 harbinger Note Edited: 0001092
2013-02-03 00:53 Saga Musix Note Added: 0001094
2013-02-03 00:53 Saga Musix Assigned To => Saga Musix
2013-02-03 00:53 Saga Musix Status new => feedback
2013-02-08 20:05 harbinger Note Added: 0001095
2013-02-08 20:05 harbinger Status feedback => assigned
2013-02-09 02:22 Saga Musix Note Added: 0001096
2013-02-15 17:19 Saga Musix Status assigned => feedback
2013-03-12 20:00 Saga Musix Note Added: 0001124
2013-03-17 17:33 harbinger Note Added: 0001136
2013-03-17 17:33 harbinger Status feedback => assigned
2013-03-17 17:37 Saga Musix Note Added: 0001137
2013-03-17 17:37 Saga Musix Status assigned => resolved
2013-03-17 17:37 Saga Musix Resolution open => no change required