Sample Tuning Calculator (2.8)

This is a very simple tool to aid in tuning samples and other sample work, updated for 2.8 with some small additions I have made for personal use. Select a portion of a sample (usually a single cycle), or make no selection to use the entire sample, then context menu Process -> Calculate Tuning… The tool will then output the following.
3322 sampletuncalc.png

Option to input the number of cycles selected, defaults to 1. Number of sample frames selected. The frequency of the selection. The time in ms for the sample to play, i.e. period. The nearest note (suggested basenote) in scientific pitch notation (C4). The frequency of the nearest note and the number of samples required, at the current sample rate, to achieve that frequency. Finetuning in cents to reach the nearest note. Finetuning steps in Renoise (1.28*Cents) to reach the nearest note. The transpose value from C4, which is an alternative to changing the basenote. Finally, the midi value of the current selection.

Any feedback or suggestions would be appreciated. Thanks to kazakore for his suggestions and the idea of determining fine tuning and the transpose values.

2.8
3321 com.JupiterXLI.SampleTuningCalc.xrnx

Older version
2.7
2296 com.JupiterXLI.SampleTuningCalc.xrnx

to give the full picture, here’s a link to where this tool started out: https://forum.renoise.com/t/renoise-cheat-sheet/30749

Thanks for the tool! The A4 C#5 stuff is what I needed :)

Thanks a lot! :)

As I said before the only thing I would suggest adding would be the transpose value, as well as base note, for people who want to set it in Instrument Settings.

I believe this is a simple 60-MIDINoteValue.

Thanks for making this a packaged tool :)

jep +1 for the transpose value view… :)

I’ve updated the tool but I don’t think I really understand what you mean. The tool now provides transpose values relative to the currently set base note, for both layers of the instrument. Is that what you wanted?

Just to the default C4, but yeah if it does it to the currently selected base-note that is even better!

When tuning samples I like to do it in the Instrument Settings section, especially as the Keyzones are done per layer, not per sample. Plus the fact my music theory sucks so it’s a lot easy for me to think of chords from a base note of C than from which arbitrary it may end up as being, if I am wanting to layer sounds that way.

There is a bug though and I can’t tell you if it’s with your tool or with Renoise’s API. It’s related to determination of Base Note.

Create an Instrument.
Give it two layers.
Give each a different Base Note.
No matter which layer you have selected Base Note will be reported as that of the first layer.

OK I could live with that, if it was always the first layer’s base note. But going further.

Add a second sample.
Create a layer for it.
Change base note.
Run your tool.
It takes the base note for keyzone1 (which is the second as counts from 0) which is using sample 00.

Done a couple of further testings and it always seems that it assumes sample number = layer number and uses the base note from that.

:lol: Oh you just wanted it as alternative to changing the base note. I was thinking it was some weird thing where you wanted the selected base note to be tuned to the frequency of the sample, eg. C4 sounding like D2, so that the instrument itself would transposed, like a trumpet.

Thanks, yeah it’s my tool I’ll take all of the newer stuff out. My guess is that the problem was with the way I was accessing the note on/off layers, which was the only way I could find to access the currently set base note. I’ll put in the 60 - Midi transposer that you suggested. Anyway, I’ll look at it again tomorrow.

This is such an awesome tool, thanks again!
free bump ;)

Small update for 2.8.

smart tool!
thanks

I used to calculate amount of samples needed to acquire a certain notes with my pocket caluclator, and FINALLY there’s a tool that makes everything lot easier. Thanks a ton! Still I don’t understand what’s the difference between: Finetuning in Cents, and Finetuning steps Required. Can somebody explain?

If you really want to know: most synths and samplers enable finetuning in steps of 1/100th (hundredth?) of a semitone. So “finetune” +100 equals “transpose” +1. Hence the term ‘cents’. Renoise does it a little bit differently by having 128 steps to the semitone (a note). So you will in renoise probably use the ‘finetuning steps required’, but if you calculate the tune, to use it in another sampler, say Kontakt or NN-XT, you’ll use the ‘finetuning in cents’.

I’ve actually thought about modifying this slightly, so that multiple cycles could be highlighted and then the frequency worked out as an average of them, rather than it always assuming a single cycle is highlighted/present.

Not sure what you think of that idea JupiterXLI? (As in an idea for your tool as in honesty I doubt I’ll have time to attempt to incorporate it for a long time!) Wasn’t actually sure you were even still active around here as hadn’t seen you post in ages. It may make the tool slightly messier but if maybe it was added as a second option, with a field to enter number of cycles which is closed after user input and then your normal results page is displayed…

At the moment it only tells you the samples needed for the nearest note but I think your idea would be a lot more useful.

Yeah that sounds good. But I’d prefer not to have a separate popup. There’s probably some way to close and reopen the gui to update values, just have to figure out how.

Yeah you could always have a GUI you can open, enter the value and it stores it as a variable, then maybe have to menu entries. The current one (so you don’t get confused remembering you have entered a non-1 value) and Calculate For X Cycles.

Updated to include number of cycles option.