[LAU] Auto-fitting loops [WAS:] Qtractor 0.1.3 (frugal damsel) released!

Atte André Jensen atte.jensen at gmail.com
Sun May 4 04:57:09 EDT 2008


Rui Nuno Capela wrote:

> when you import (or drop) a new audio file into the qtractor time-line, 
> it's always assumed that the new clip is in tempo with the current 
> session.

I don't know if you're at all into blue/csound, but I did an instrument 
called BeatPlayer, which automatically fits loops to the tempo of a 
tune. You can check it out in blue share (if you have blue running).

Anyways the idea is pretty simple:

1) For this to work the loops you want to auto-fit must be truncated to 
1, 2, 4, 8 etch bars (1/2 and 1/4 etc is ok too). Also I have a tempo 
threshold which I set to 160, meaning the beats must be between 80 and 
160 BPM (most of my beats are). Thoughout I'll asume 4/4 meter.

2) Supposed you have a 1 bar beat at 80BPM, sampled at 44.1, this will 
be 60/80 * 4 * 44100 = 132300 samples long. Two bars will be 264600 
samples, four bars 529200. This means that any 44100 beat fitting 1) and 
beeing between 132300 and 264600 samples long will be one bar, and if 
it's between 264600 and 529200 samples it will be two bars, etc.

3) Using 2) you can guess the number of bars (1/4, 1/2, 1, 2, 4, 8, etc) 
and based on that and the length (and samplerate) you can calculate the 
original BPM, and then you can figure out how much the beat needs to be 
"transposed" or "stretched" fo fit the current tempo.

It's really a quite simple idea and it works very well.

Maybe something along these lines could be integrated into your program, 
it sounds like it's what people are asking for...

Just my .02 :-)

-- 
peace, love & harmony
Atte

http://atte.dk       | http://myspace.com/attejensen
http://anagrammer.dk | http://modlys.dk



More information about the Linux-audio-user mailing list