Sample memory improvements

Not sure if this should be here or in scripting tech, but I believe it’s a veracious bug. It has something to do with the sample_buffer:prepare_sample_data_changes() and sample_buffer:finalize_sample_data_changes() functions… In my experience these do work brilliantly for undo and redo. But if I use Sloper on any sample and then do a right click on either the sample or the instrument (doesn’t matter which one) and use duplicate, the “duplicated” sample will have the non-faded original sample. Could it be that this behaviour is only seen on linux?

Another annoying example (sorry) was when I sliced a break in 16 pieces with Shift-Z (SliceNExact), then I removed a slice marker, but the one before still had the loop markers at the original position… Is it meant to be that way?

You could perhaps also duplicate the “duplicate” routine.

If you do a ctrl-z again, do the loopmarkers come back or are they totally lost?