0S effect messes with attack / timing?

I’ve noticed that often times when I render a selection to a sample, and then use a 0S command to offset it, I lose a bit of the attack at that offset…

I’ve attached two example xrns files here. Each one is a “new song (no template)”

losing attack.xrns demonstrates the behavior I experience. I’ve rendered a 4-beat kick loop. If I play from offset 0S40 then it clearly misses the attack… but if I select that same exact offset in the sample editor and play the selected area using return, then I clearly hear the attack. Why is the 0S command losing the attack?

inversion test.xrns is a test I did with inverting phase on samples… I created a four-bar kick loop using “dh_kick_sub_toppy” from the factory kicks folder. I converted it to mono (left channel only). Then I rendered the loop, converted the rendered sample to mono (left channel only) and inverted the phase. When I play it alongside the original, unrendered loop, it’s silent as expected… interestingly though, with block loop on, after it’s looped a few times, I occasionally hear a little attack sound. I have a third track which is playing my rendered loop using the sample offset command… and while I would expect it to be silent as well, I can clearly hear all the attacks.

This is using Renoise 3.0.1 on OS X 10.9.5.

I have three questions…

  1. Why does using the 0S offset command lose the attack of my kick drum?

  2. Why does a phase-inverted sample played alongside the original pattern cancel out for the first iteration of a block loop (as expected) but then appears to get out of sync in later iterations, thus producing some sound (not expected)?

  3. Why does a phase-inverted sample played using 0S offset command alongside the original pattern not cancel out completely?

edit: well this is strange… I downloaded losing attack.xrns from here to test it out and make a small modification to it… and it crashes my renoise! confused

  1. Why does using the 0S offset command lose the attack of my kick drum?
  2. Why does a phase-inverted sample played using 0S offset command alongside the original pattern not cancel out completely?

The sample offset command Sxx applies a small amount of volume ramping (fading in), in order to avoid really nasty clicks when offsetting to random positions within the sample. (This ramping is also partly responsible for the phase inversion problem in question 3, since each “side” is no longer perfectly symmetrical due to the fading being applied.)

Unfortunately, in your example where you have an incredibly precisely timed loop and a super short/subtle attack portion on the kick sound, the ramping is creating a dulling effect on the attack. If you were chopping up a noisy, live breakbeat instead, then the ramping is usually much less obvious, and often much more beneficial.

If you plan to work with loops and cut them up this precisely, then I would recommend using slice markers instead, since they will give you the instant attack you’re looking for — just as if you’d manually pressed play in the sample editor.

  1. Why does a phase-inverted sample played alongside the original pattern cancel out for the first iteration of a block loop (as expected) but then appears to get out of sync in later iterations, thus producing some sound (not expected)?

This is due to the fact that you’re using a BPM which does not give an exact integer amount of samples per beat.

For example:
(44100 Hz / 79 BPM) * 60 = 33493.671 samples per beat.

Internally, the audio engine will accumulate these fractional amounts, and then eventually everything will shift by 1 sample frame due to rounding the fractional amount to the nearest whole integer.

If you change your song to 80 BPM instead — or any other BPM which divides into a whole number of samples per beat — and then re-render your loop and perform the test again, you’ll see that the block loop phase problem disappears.

Thanks for the explanation! At least I’m not going crazy :slight_smile:

Is there any chance that the fade could be applied only when the fade option is set on the sample properties?

I’m still trying to get to my elusive “whole song on a single instrument” approach… and if I could put an entire break on a single key and address its component parts via Sxx then that would be really nifty.

I suppose drums will be the most affected by this, everything else can survive (and probably benefit from) the quick fade. So I could chop the sample and just use a few more sample slots for drums in this case…

Anyway, there’s the existing fade option in the sample properties… it would be cool if the Sxx fade applied only when that option was set, or if there were an option next to it that applied to Sxx commands specifically.