View Issue Details

IDProjectCategoryView StatusLast Update
0000942OpenMPTFeature Requestpublic2017-04-12 17:27
Reporterharbinger Assigned To 
Status newResolutionopen 
Platformx86OSWindowsOS VersionXP
Product VersionOpenMPT / libopenmpt 0.2-beta22 (upgrade first) 
Summary0000942: MPTM Command to change sample tempo during playback

I use a lot of acoustic samples (esp of guitar strums) in my productions, but sometimes i want to be able to alter the tempo of the SAMPLE (as opposed to the track tempo). I don't know if this can be done on the fly, but this would be a big step in trackers if we could have a channel command which alters the sample tempo (and/or speed/pitch) when needed. It would save me from having to go back into the studio and record another sample with the desired tempo change.
For example, if a guitar strum sequence playing a group of D-major chords, the channel command could slow down the sample without changing the pitch.
The object here would be to change the tempo of the sample (but not the pitch) WHILE it's playing.

Is it possible?
(Discard this if not. :( )

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


Saga Musix

Saga Musix

2017-04-10 16:51

administrator   ~0002973

As you should be aware, there is already a time stretcher available in the sample editor which essentially does what you want, but not in realtime. However,
1) We are not in control over the algorithm used by the time stretcher, as this is an external library. Any future update of the library might change the output of the time stretcher, meaning that if it could be used in a real-time scenario, modules would no longer sound the same.
2) the quality of un-patented time stretchers that are also compatible with OpenMPT's license (this excludes Rubberband) is rather low and not something I would actually consider to be worth using in a realtime effect.



2017-04-12 17:22

reporter   ~0002975

Yes, I'm having to use the TimeStretcher a lot, but when I need the same sample at different tempos, using multiple copies of basically the same sample (some longer than others) increases the file size, sometimes by a lot.

I understood the quality would be questionable, but if real-time time-stretching can be done at once (apart from the player), I've asked myself how difficult it would be to apply on demand. The player i think would have to store a temporary copy of the sample (the part after the command call), reconfigure it, then apply it at the right time.
The FR is only recorded for future devs who might want to tackle this challenge, when the technology and perhaps MPT's code is more amenable to such a function.

Saga Musix

Saga Musix

2017-04-12 17:27

administrator   ~0002976

The thing is that a perfect time stretcher is never going to exist - laws of physics prohibit that. There can only be really good approximations (Rubberband being one of them, as far as I'm aware), but the only serious, license-compatible library I am aware of that does time stretching is the one we use, and it doesn't sound particularly great to my ears.

Issue History

Date Modified Username Field Change
2017-04-10 16:46 harbinger New Issue
2017-04-10 16:51 Saga Musix Note Added: 0002973
2017-04-12 17:22 harbinger Note Added: 0002975
2017-04-12 17:27 Saga Musix Note Added: 0002976