ModPlug Central

OpenMPT => Help and Questions => Topic started by: MEATTAIL on April 30, 2023, 16:16:42

Title: How do I change the tempo of a sample without affecting the pitch?
Post by: MEATTAIL on April 30, 2023, 16:16:42
Hey! First post here, I just have a really quick question: how do I adjust the speed of a sample without affecting its pitch? I don't see a setting to do so in the samples section.

OpenMPT_a5IKLPpUoG.png
Title: Re: How do I change the tempo of a sample without affecting the pitch?
Post by: Saga Musix on April 30, 2023, 16:26:21
Welcome to the forums. This is generally not how samplers work. To be precise, the problem of separating pitch and tempo is mathematically impossible to achieve perfectly. There are approximations but they will never sound perfect. If you only need a handful of different pitches, you can try using the time stretch or pitch shifting features seen in the right section of your screenshot and process the sample "offline". They will either change the duration without changing the pitch, or change the pitch without altering the duration. Both processes will have different kind of artifacts (pitch shift typically results in "underwater sound", time stretching results in repeated transients), which may or may not be acceptable depending on the individual sample.
Title: Re: How do I change the tempo of a sample without affecting the pitch?
Post by: LPChip on May 02, 2023, 06:26:06
An alternate approach is to set a loop point in the sample. It will still play the sample faster or slower and change the pitch at the same time, but because it loops, you can make something short last a lot longer.

For example, with a piano sound, you place a loop after the initial hit and sustain the next section of the tail. Instead of it fading out, it now loops that sound continuously. Combine that with an instrument to control the volume during the loop and you effectively recreate the piano sound, but are actually capable of playing different notes. Of course, the moment you go too high or too low, that initial hit sound will sound off. To combat this, you can use multiple samples and use one instrument to choose which sample you use for what key.

That is basically 1-0-1 sampling and how its always been done. One MPT instrument with many samples to recreate a realistic version of a real instrument.

Also, if you are working with a breakbeat sample, and you want to make it slower without having the problem of sounding weird, you would generally cut the sample into many small pieces. Every hit in the sample is split to a new sample, and you play all samples in order in the pattern at the right pitch/speed, but with gaps in between.