Weird clipping bug?

So I was exporting individual tracks, normalised with a headroom of 0 and one of the tracks had clipping. I checked the original audio samples and sure enough, they had clipping already there so that’s normal. I increased the headroom because I don’t want the new samples I’m creating to show as peaking in my mixer. Exported again and this is where it got weird. There was still some clipping. There was no way there should have been any. There is zero processing, no amplification, and yet on some of the samples (not all) the levels are peaking. It’s like there is secret headroom which has revealed extra parts of the samples I thought were already clipped… Had to export with a headroom of -3 to get no clipping (on individual tracks with no amplification). It’s super weird and I would be very happy to email someone the file for further investigation.

Do you mean clipping at master bus? If so, check if you disabled soft clipping master output option.

Then there also is a headroom setting in project settings, that you need to take care of.

It’s neither of those things. What is happening is: a sample on the time line has clipping within the actual audio of the sample. There is an amplification of zero (aka gain of 1) on the track. I’m exporting it with headroom on the project. The resulting waveform goes right to the top of the file aka clipping - despite the headroom (until I went up to -3 project headroom). No effects, no nothing. I’m just arranging samples. Im an experienced user and its genuinely strange. The only thing I can think of is the fault is with the original sample, like it has hidden data which is being interpreted strangely.

Resampling (interpolation) and playing multiple notes may cause this. If you play back the sample in it’s sample rate, unpitched - one after the other - it definitely should not happen.

If that’s not the problem could you share a little XRNS song with us which demonstrates the problem?

I guess it has something to do with the sample rate of the samples. They are from an old 90s sample CD and some of them are 22k, some 44k. Could that be causing it?