Trouble setting up samples for a piano

Started by Aryzen, May 19, 2015, 03:27:39

Previous topic - Next topic

Aryzen

So, I've created samples for a slightly bit-crushed piano (GBA style) to use with OpenMPT.

I have one sample for every octave, from C-0 to C-8.

When I assign the samples to their respective range in an instrument, there is a strange gap between every octave. As in, from B-4 to C-5, there is a significant change...

What have I done wrong? I have attached the XM file in which I'm working with. Perhaps that would make it clearer what my problem was?

Also, I do wonder why the transpose defaults to F#7... It sounds correct, but it doesn't make sense...

((Actually, C-0 sample keeps disappearing... If I save and reload, that sample disappears...))

Here is the link. It is on OneDrive, due to its file size.

Saga Musix

Well, you made the mistake of assuming that OpenMPT magically knows what octave your sample is tuned at. Hence, when you go up one octave, you choose the next sample, which already plays at a higher octave, so in the end it plays two octaves higher! To compensate for this, you have to transpose samples in the higher octaves down by as many octaves as they differ from C-5 (e.g. the C-6 sample has to be transposed down one octave, the C-4 sample has to be transposed up one octave, etc.)
It is also not very clever (read: natural-sounding) to change the sample at C-5, C-6, C-7... because that means that your samples will only ever get pitched up. If you choose the split points at F#5, F#6, F#7... instead, the samples will get pitched up and down equally, meaning that their playback frequency does not deviate from the original frequency as much.

QuoteAlso, I do wonder why the transpose defaults to F#7... It sounds correct, but it doesn't make sense...
Because a sample at 44100 Hz is a F#7 when comparing it relatively to the default C-5 frequency of 8363 Hz. If this is too weird for you, you should use the IT format instead, which uses a sane tuning mode with a middle-C frequency...
Quote((Actually, C-0 sample keeps disappearing... If I save and reload, that sample disappears...))
...and the IT format will also get rid of this "problem": The lowest octave (C-0...B-0) is not available in the XM format at all, and samples which are not assigned to an instrument are lost in the XM format, hence the sample won't be saved in the file. In the IT format you have none of these problems, since samples are not bound 1:1 to instruments.
» 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.

Aryzen

In my defense, I did not assume that OpenMPT would 'magically' do that. I thought it was like the other sampling software I use, in which by default, it would know what the sample octave is, depending on where I assign it on the keyboard. Guess I didn't learn anything, starting off from using these modern, overly simplified samplers...

QuoteIt is also not very clever (read: natural-sounding) to change the sample at C-5, C-6, C-7... because that means that your samples will only ever get pitched up. If you choose the split points at F#5, F#6, F#7... instead, the samples will get pitched up and down equally, meaning that their playback frequency does not deviate from the original frequency as much.
And it appears that I know very little about sound... That's what I get for focusing more on visual arts than anything else.
So, if my sample splits at F#, the change would not be so jarring?  Also, does this apply to the .IT format as well?

OK....

Very many thanks for the help... Really. It was very descriptive, and helped me better understand not only about OpenMPT, but also tracking, and samples in general!


((This is the most useful response I've gotten from any forum for any software... Certainly beats the Unreal Engine forums.))


Saga Musix

Quote from: Aryzen on May 20, 2015, 04:23:20
So, if my sample splits at F#, the change would not be so jarring?  Also, does this apply to the .IT format as well?
Yes, that applies to all formats. In the IT format you can also change the key assignment in the sample map (the first column which is not editable in the XM format) to avoid pitching the samples themselves up and down, but I would not recommend doing that (except for things like drum kits, where you can easily map all notes to C-5 for example) since it will break portamento effects when sliding between two notes belonging to a different sample of the same instrument (not that this would matter in the case of a multisampled piano, but for simplicity it's better to just stick to the same technique everywhere).
Note that one sample per octave is still pretty "lo-fi" for a natural-sounding piano, so there will still be some jarring changes from E to F# at every octave, but they will not as horrible as when the split point is at C.
» 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.

Aryzen

QuoteNote that one sample per octave is still pretty "lo-fi" for a natural-sounding piano

Wasn't going for a natural sounding piano...

I was making a game, and I was sick and tired of the crappy standard analogue synths that people pass for 'retro', and I wanted to make an accurate representation of the GBAs soundcard. Down to the bitrate for the Direct Sound system, and the number of and limitations of each channel...


Would F# be the best place for a split? Or I there better?


Thanks again!

Saga Musix

The best split point is always precisely between the two base notes of the two samples. So if you have two samples whose nominal playback frequency is played at C-5 and C-6 respectively, the optimal split point is at F#5 because that's exactly halfway. If you go for more samples, e.g. C-5 F#5 C-6 etc, the split points would be at D (or D#) and A (or A#) in every octave.
» 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.