Jump to content


Photo

New Tool (2.7): Set Pattern Length From Sample


  • Please log in to reply
8 replies to this topic

#1 dblue

dblue

    Dodgy Geezer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5543 posts
  • Gender:Male
  • Location:Berlin
  • Interests:Code. Music. Graphics.

Posted 15 March 2011 - 01:26

Set Pattern Length From Sample v1.02: (2.7, 2.8)
Attached File  org.illformed.SetPatternLengthFromSample.xrnx   2.02KB   337 downloads

Set Pattern Length From Sample v1.03: (3.0)
Attached File  org.illformed.SetPatternLengthFromSample.xrnx   1.47KB   180 downloads

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.


Notes:
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.
  • Ledger, Conner_Bw, Djeroek and 5 others like this

#2 cat hero

cat hero

    Super Advanced Member

  • Normal Members
  • PipPipPipPip
  • 127 posts
  • Gender:Not Telling
  • Interests:music

Posted 15 March 2011 - 05:19

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

#3 Cee tama

Cee tama

    Member

  • Normal Members
  • PipPip
  • 32 posts

Posted 15 March 2011 - 08:39

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?

#4 00.1

00.1

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1343 posts
  • Gender:Male

Posted 15 March 2011 - 08:53

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?

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

Windows 10
Toshiba Satellite L875D
AMD A8-4500M APU with Radon™ HD Graphics 1.90 Ghz
6.00 GB RAM
64bit Operating System, x64-based processor


#5 Suva

Suva

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Moderator
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 2642 posts
  • Gender:Male
  • Location:Tallinn, Estonia

Posted 15 March 2011 - 09:21

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


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

#6 Paula Daunt

Paula Daunt

    New Member

  • Normal Members
  • Pip
  • 3 posts
  • Gender:Female
  • Location:Berlin, Germany

Posted 12 August 2014 - 11:51

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



#7 slippycurb

slippycurb

    Big Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPip
  • 513 posts
  • Gender:Male
  • Location:Ireland Co Galway
  • Interests:My interests change from day to day, but i always like eggs.

Posted 12 August 2014 - 12:44

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.....


"No one would have believed, in the last years of the nineteenth century, that this world was being watched keenly and closely by intelligences greater than man's and yet as mortal as his own;"


SuckOnThisElectronicEgg


https://www.facebook...ristiansvslions

#8 dblue

dblue

    Dodgy Geezer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5543 posts
  • Gender:Male
  • Location:Berlin
  • Interests:Code. Music. Graphics.

Posted 12 August 2014 - 13:00

Yep. Renoise will not auto-upgrade the API version in this case, since I'm using renoise.song().selected_sample 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? :)
  • slippycurb likes this

#9 triple zero

triple zero

    Member

  • Normal Members
  • PipPip
  • 50 posts

Posted 05 September 2014 - 23:07

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? :-)