Tec: Change A Samples Sample Rate?

is it possible to change a samples sample rate with the API?

By copying it to another sample-slot.
renoise.song().instruments[].samples[].sample_buffer:create_sample_data(
sample_rate, bit_depth, num_channels, num_frames)
-> [boolean - success]

But i don’t know if copying data from a 16-bit 22khz sample would be automatically converted to 32-bit 44Khz or that it is just pasted as is and plays the sample with the new configurations (which means four times as high and four times as fast).I haven’t tried that.

I’ve tried that or something like that and it makes the sample just play at a different pitch.
The script i’m working on uses that behaviour as a means to change a samples pitch but then i want to resample it to the original sample rate.

Then we would really need a few extra methods in the API. One set to simply change the rate and bit depth but don’t touch the sample (it is a lot less hassle than having to copy the sample first) and one set that does convert the sample to the target parameters.