Mapping the same sample with different parameters on sample map?

Started by eliasdaler, February 19, 2025, 02:01:49

Previous topic - Next topic

eliasdaler

Is it possible to map the same sample with different parameters on sample map for a given instrument?
I have an .sf2 file which maps the sample three times, but each note has different panning and root note associated with it.
When I import this .sf2 file into OpenMPT, this sample gets the same parameters on all the notes.

Is it possible to do this in OpenMPT somehow?

Saga Musix

Unfortunately there is no advanced multi-sampling functionality in any of the classic module formats OpenMPT supports. It may come as an extension to its own MPTM format in the future, but right now it's not possible. For attributes such as panning, you would be best off duplicating the instrument, or using panning commands in the pattern data. Or, if space is not a concern, create a few copies of the sample. OpenMPT will not do this when importing SF2 instruments because it's usually not how instruments are used in modules, and it would potentially create dozens of duplicate samples for some instruments when it wasn't really the intent to do so.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

eliasdaler

I see, thanks.

It's mainly a problem when trying to load existing .sf2's and modules which have weird instruments (e.g. which have different root notes for one sample), but I guess I can avoid doing this when making my own modules by using the appropriate notes, and panning commands should be good enough.

eliasdaler

@Saga Musix
Also a bit related question. When importing .sf2's, it seems like "root note" for a given sample changes its "C5" frequency (e.g. from 44.1kHz to something like 176.4 kHz)

Is there a way to get an original sample's frequency (44.1 kHz) after such import? (I guess it might be a limitation of .IT format when using sample tuning?)

Saga Musix

Quote from: eliasdaler on Yesterday at 18:15:13(I guess it might be a limitation of .IT format when using sample tuning?)
Yes and no; It's always a limitation in the XM format, where the sample map cannot be transposed. OpenMPT always imports SF2 / DLS instruments the same way though, no matter what the target format is. However, even though the IT format can transpose samples in the sample map, doing so can also be problematic when using Tone Portamento effects to slide between notes that are assigned to different samples; this can give unpredictable / unwated results when the sample map is transposed.

There are plans to have root note information available in the MPTM format at least; that way, we would be able to avoid the Tone Portamento issues, while also preserving the original sample rate of each sample on import. Probably not going to happen in OpenMPT 1.32, but hopefully at some point sooner rather than later.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

eliasdaler

I see, thanks!
I guess for now I'll just assume that all my samples are 44.1 Khz initially and use "c5speed" in .it format to determine the "root" node. (I'm writing my own .it/.mptm converter for playback on Sony PlayStation 1  ;D )