I have a hard time figuring out exactly what happens with the 0Rxy command. To test I created a two layered velocity switched instrument, now I’m trying to figure out when the low level sample wil trigger…

Example: I have a C-4 R43 (volume blank) in my track. My guess from reading the manual would be this:

“Retrigger note every 3 ticks with a volume of -8”

Since I havent touched ZK id expect ticks/line to be 12. To make sure I inserted a ZK0C (set ticks/line to 12), which doesn’t change the result.

So this should retrigger 4 times (12/3 = 3) with volumes

80, 78, 70 and 68 (hex) or 128, 120, 112 and 104 (dec)

However the lowest layer only gets triggered on 40 (hex) or 64 (dec)

If I add a volume ot 80 to the note the result is the same.

However if I add a volume of 79 to the note the lower layer gets triggered at 3A (hex) or (58)

I simply don’t get it. Am I misreading the manual, is the manual wrong or is it a bug in renoise?

I have a note (pattern 0 in xrns) with volume 0x79 = 121. With ticks/line=6 and a retrigger command of R43 I get a retrigger at 0x59 = 89, but 121 - (121/4) = 90.75, which nomatter where and how I round can’t become 89

Next (pattern 1 in xrns) volume 0x79 = 121, ticks/line = 0xC = 12, retrigger command still R43. I get a retrigger at 0x1A = 26, but 121 - (121/4) - (121/4) - (121/4) = 30.25, still no logic (to me) where to round to get 26 from this…

The volume additions/subtractions are not actually scaled based on the note’s initial volume — it’s just a fixed amount based on max volume / x, where x is the divisor set in the retrigger command.

So if you’re retriggering with volume -1/4, then the volume step is: 127 / 4 = 31.75

The amount 31.75 is then subtracted from the note volume with each successive retrigger.

For example:

121 (0x79)

31.75 = 89.25 (0x59)

31.75 = 57.5 (0x38)

31.75 = 25.75 (0x1a)
(Note volumes are actually internally represented and processed as floating point values from 0.0-1.0, then scaled back up to 0-127 and rounded to the nearest whole number whenever needed, but the end result is ultimately the same as what I’ve shown above.)