View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001546||OpenMPT||User Interface||public||2022-01-09 04:58||2022-01-27 20:41|
|Reporter||Lachesis||Assigned To||Saga Musix|
|Product Version||OpenMPT 1.30.01.00 / libopenmpt 0.6.0 (upgrade first)|
|Summary||0001546: Minor raw sample export/import issues.|
Putting several minor issues/complaints regarding raw samples here because they aren't really worth their own individual reports.
My use case for raw samples is mainly testing very old junk so this issue is about as low priority as it gets...
|Tags||No tags attached.|
|Has the bug occurred in previous versions?||Yes|
|Tested code revision (in case you know it)|
I think I should explain one thing upfront which might clear up some of the confusion: OpenMPT tries to be smart (maybe too smart?) about which sample format it offers by default in the dialog, which is not always the one chosen in the configuration dialog: After loading a file, OpenMPT will deduce the format to use from its filename, but only (until now) if it ends in .wav or .flac (as of r16474 it also takes S3I into account). I'd be hesistant to add .raw to that logic because I think that most people, after loading a raw sample, wouldn't want to keep the sample in raw format, but rather convert it to WAV and FLAC, so that they can keep the middle-C frequency, loop points, etc... I totally get your use case but I think that defaulting to RAW format in this case would be dangerous (many people don't even realize how they could change the format from the dropdown in the Save As dialog...). Note that this logic no longer applies if a sample has been saved once, as then OpenMPT knows its new filename.
r16474 does two more things: It adds .sam to the list of raw sample extensions, and adds S3I to the list of default formats in the config dialog.
This is essentially a bit of a workaround for some of Windows' own smartness when it comes to deducing the correct filename. IIRC when you manually enter a filename but leave out the file extension, Windows will not always add the correct file extension when hitting the Save button, if the filename looks like something that already has a valid file extension. This again can cause a lot of confusion because now your sample that you just saved doesn't show up in the sample browser because it uses a bogus file extension.
I'm open to suggestions how this could be improved but I wouldn't want to hurt the default behaviour for users without this specific usecase.
OK, that makes sense. I didn't try explicitly adding any of the raw extensions to the filename or sample name before, but they also all default to FLAC as you mentioned. I don't have any ideas here aside from maybe a config option to opt-in to keeping the raw format for raw or unrecognized extensions.
Side note: ".wav" selects FLAC, but "a.wav" selects WAV. Off-by-one?
I agree that nothing here is worth changing if doing so would affect general users (worst case I'll just cope and occasionally whine about it). A couple of thoughts that aren't necessarily mutually exclusive:
File name tokenization (a reimplementation of splitpath) treats ".wav" as the filename and not the extension in that case, that's why.
I'll look into that, seems like the most sensible option for me.
I'm dumb, this already exists. Still used to the general lack of options MPT 1.16 had...
You know, I think I have an idea. As we already have a way to force loading samples as raw, maybe adding another option to force saving samples as raw might do it - at least for individual samples (or would it be useful for you to have "Save All as Raw" as well?). So just like there's a dropdown menu item to load raw samples, I'd add one to the save icon. That would solve the whole extension mess. What do you think?
|2022-01-09 04:58||Lachesis||New Issue|
|2022-01-09 14:24||Saga Musix||Assigned To||=> Saga Musix|
|2022-01-09 14:24||Saga Musix||Status||new => assigned|
|2022-01-09 14:59||Saga Musix||Note Added: 0004982|
|2022-01-26 03:19||Lachesis||Note Added: 0005014|
|2022-01-26 21:36||Saga Musix||Note Added: 0005016|
|2022-01-27 02:28||Lachesis||Note Added: 0005018|
|2022-01-27 20:41||Saga Musix||Note Added: 0005021|