New Tool (2.7): Set Pattern Length From Sample

(dblue) #1

Set Pattern Length From Sample v1.02: (2.7, 2.8)
1807 org.illformed.SetPatternLengthFromSample.xrnx

See this thread for more information on the origins of this tool.

Usage :
Select a pattern, select a sample, then launch the tool via context menu or key binding:
Pattern Editor > Pattern > Set Pattern Length From Sample

The tool has 3 functions:

1) Set Pattern Length:
Take the current song BPM and calculate the number of pattern lines needed to play the whole sample at that BPM. If your sample does not precisely fit into a whole number of pattern lines at the current BPM, then the timing may be off by a fraction of a pattern line. Your song BPM will not be adjusted.

2) Set Pattern Length and BPM:
Take the current song BPM and calculate the number of pattern lines needed to play the whole sample at that BPM. Your BPM may also be adjusted by a small amount, in order to precisely fit everything together. If your starting BPM is 120, for example, then your final BPM may be some fractional amount like 120.3 or 120.7 BPM, depending on the sample length.

3) Set BPM:
Take the current pattern length and calculate the BPM required to fit the sample into that whole pattern.

The tool does not make any attempt to analyse the content of the sample in order to calculate its tempo or number of beats, etc. It simply takes the sample duration in seconds, and tries to calculate a pattern length and/or BPM required to fit that duration as closely as possible. Your song’s BPM and LPB is important here because it will be used as the basis for calculating the number of patterns lines required for the sample to fit into a whole pattern.

If your sample is really long, then it may exceed the maximum pattern length of 512 lines. The tool will simply clamp the values if this happens, and does not try to do anything clever like spanning multiple patterns.

A Shortcut To Selecting A Block And Making It A Pattern Of Its Own
Crop Patternlength(S) To Length In Time Of Selected Sample
Crop Patternlength(S) To Length In Time Of Selected Sample
(cat hero) #2

sweet, always wanted something like this as i work with samples mostly. thanks dude, i’ll grab this

(Cee tama) #3

i’ve downloaded and put the xrnx file into the preferences folder of renoise but the tool is still not seen in the tool bar or browser.

any suggestions?

(00.1) #4

After download, I usually just drag and drop the xrnx file onto Renoise.

(Suva) #5

Yep, this is what you should do. Drag & Drop the xrnx on Renoise window.

(Paula Daunt) #6

It would be awesome to have an updated version that works with the current version of Renoise :w00t:

(slippycurb) #7

perhaps not the best way, but if you open the manifest.xml from inside the scripting terminal and change the api version to 4 it should work…

(dblue) #8

Yep. Renoise will not auto-upgrade the API version in this case, since I’m using and a bunch of crap changed relating to the instrument properties.

However, you can simply edit the manifest.xml as slippycurb suggests, and change the ApiVersion to 4.

Nevertheless, I’ve attached an updated version of the tool that’ll work in Renoise 3.0.

Didn’t think many people were even using this weird thing. I’d be curious to hear what some of you are using it for? :slight_smile:

(triple zero) #9

I guess I’d use it for syncing recorded and/or sampled sounds. It’s sort of like a sync-to-bpm function for instruments, except globally and inverted.

It saves on having to fire up the calculator? :slight_smile: