hand drawn samples tuning question

Will any hand drawn sample drawn into the sample editor window be perfectly in tune if I stick to the default 168 samples length when clicking ‘create’? (pressing the A4 key on my keyboard will play my hand drawn sample at the A4 pitch 440 Hz perfectly in tune?)

if so, why 168 samples?

EDIT: Just tested this with Gtune VST tuner which was suggested by Carbonthief, the result was 441.47Hz with all hand drawn samples at 168 samples in length.

set finetune to -7

you can use any sample length you want 1,2,4,64(I suggest32 or 64)you’ll have just tune it afterwards and then, everything you draw in it by hand will remain in tune

why 168 samples?

168 samples at 44100 samplerate is (roughly) the duration of a single waveform cycle tuned to middle C.

Middle C is ~261.626 Hz

44100 / 261.626 = 168.56

If you’re working at 48000 samplerate then it would be 183.46 samples, and at 96000 it would be 366.93 samples.

Using 366.93 samples (rounded up to 367) at 96000 samplerate is actually quite a nice one to work with, because you can get pretty a low margin of error in the tuning. Basically, when rounding 366.93 up to 367, you are only 0.07 samples out of tune from the ideal cycle length. In practise, you don’t even really have to compensate for this error by adjusting the sample finetune property, as it will likely never be audible during any normal situations — only when specifically looking/listening for it during boring technical tests :slight_smile:

It’s a pity that 44000 isn’t a “real” samplerate, because then we could use exactly 100 samples for a perfectly tuned A 440Hz, or 200 samples for 220 Hz, or 400 samples for 110 Hz, and so on. Technically, you can hack this by creating a 44000 Hz sample in an external editor such as Wavosaur, and Renoise will happily load it, but it’s still a bit awkward. Ah well… can’t win them all!

I usually won’t hand-draw, but often create short loops out of wavecycles from recorded material. Now tuning is always a hassle. What is the default playback key/rate for renoise samples? I guess you can’t calculate with the samplerate you’re using with your soundcard, because then all sample instruments would be out of tune when you change rate for the same project. Is it always 44.1 for middle c for a 44.1 sample? Sorry if it’s in the docs, I’m too lazy to read now.

Other than that it should be easy to calculate close to perfect tuning from wavecycle loop lengths to note offset & cent finetune. You just need to know the parameters (middle c rate/the individual sample rate). Maybe it would be a cool idea to have a pre-baked table, or better a little tool, to get tuning for wavecycles perfect without having to brain it out or tune by ears or the spectrograph. Extremely perfect tuning shouldn’t be necesarry (yeah, you know how much instruments like guitars can drift from “perfect” tuning in time or by different pressure on the strings/frets, the neck, or by different attack strengths, without sounding off-tune at all?), other than for having 2 wavecycles layered when no phasing difference should happen, but then you’d usually just use same loop lengths + the very same tuning.

Not exactly what is being asked for but this might be handy - http://www.renoise.com/tools/easy-tune

@dblue: thanks for that awesome and in depth explanation. 96000 samplerate with 367 samples length comes very close to perfect tuning according to the gtune VST tuner.

I also managed to get 100% perfect tuning (on any hand-drawn single cycle waveform) with these settings: samplerate 44100Hz (16bit mono), number of samples 128, transpose -5st, finetune 30…A4 was registered as 440.00HZ in the tuner, A3 at 220.00Hz, A2 at 110.00Hz, very nice.