MichaelPilyavskiy / ReaScripts

Scripts for REAPER written by MichaelPilyavskiy (mpl)
128 stars 46 forks source link

RS5k manager: Undo for 'pad replace' doesn't revert sample #29

Closed IOphonics closed 1 year ago

IOphonics commented 1 year ago

When you change the current sample of a pad and then try to undo it, it only undoes the name but not the actual sample. You don't get back the sound you had before.

MichaelPilyavskiy commented 1 year ago

Is that fixed for 3.0beta53?

IOphonics commented 1 year ago

The problem remains. I still don't get my previous sound back. Looking at the names of the samples, now it seems that clicking 'undo' one time actually causes two undo steps to happen. So when you've gone through "Kick-1", "Kick-2" and then "Kick-3" and then you hit 'undo' you go back to "Kick-1". But as I said, the sound doesn't change.

MichaelPilyavskiy commented 1 year ago

I'm afraid undo problems are on REAPER side, I will inspect this problem deeply and contact Justin or create bug report.

MichaelPilyavskiy commented 1 year ago

Are you sure you speaking about sample drop on pad (DrumRack) ? Undo works here as expected. BUT I forgot to add undo for drop sample onto peaks area.

IOphonics commented 1 year ago

Yes, I am sure. I just tried it again, because most of the time I'm using your next, previous and random sample functions. But also when dragging a sample from the media explorer to a pad it does not work. It works when I drop it to an empy pad though. When I undo that, the pad is empty again and there's no sound. But dropping on an existing sample in the rack shows the issue described above.

MichaelPilyavskiy commented 1 year ago

I reproduced that with a debug session. In clear rack:

The difference is if I drop sample to clear pad, it creates RS5k instance, while for the seconds it just change file. So that seems a REAPER bug: https://forum.cockos.com/showthread.php?t=272617

If this would be solve or someone point how to correctly write Undo History, I`ll fix that.