Hope fully an easy question.
Jan 23, 2007 at 2:33pm
Hope fully an easy question.
Using the info object I can obtain the sampling rate and the length of a sample loaded. If this aforementioned sample is a beat loop how would I calculate the number of beats it contains?
z=number of beats=??
Thanks guys, I not great at maths at the best of times.
Jan 23, 2007 at 3:21pm
You need another parameter for that, namely the speed. If you have e.g. 120
Am 23.1.2007 15:33 Uhr schrieb “Rhys Perkins” unter
Jan 23, 2007 at 3:33pm
That info won’t tell you anything about what kind of sounds the sample has. It could be a drone, it could be silence, it could be 128 really fast spazzy beats. Beat detection is a very difficult thing to do accurately – but google “beat detection” and you’re sure to find some PhD abstracts or something.
If you know your loops are in 4/4 then just divide the total time by powers of 2 (2, 4, 8, 16, etc.) and you’ll know how long (in ms) a metric “chunk” will be. Then you can multiply that by 0, 1, 2, etc to find the start point of each chunk. Add those two together and you have the end of the chunk. You might be selecting 2 beats or just an 8th note depending on the loop and will have to play around with the divisor for each sample….or organize your samples according to number of beats so that you know ahead of time. ;)
Sometimes questions like this are easier to answer if people know what you ultimately want to do with the information. What are you trying to acheive?
Quote: Dr. Spankenstein wrote on Tue, 23 January 2007 06:33
Jan 23, 2007 at 3:56pm
I’m largely dealing with 4/4 jungle loops. Its a case of using them with a 16 step sequencer and dividing and having each step as a semiquaver equivalent of the whole loop.
So if I know a file has 8 beats in it then it will take 32 steps to go from beginning to end of the file and can be divided up accordingly with the option of certain beats in the loop being played back/skipped.
This number can also help to determine the number of steps in demisemiquaver division and hemidemisemiquaver division modes.
The original bpm speed of the file is not important as the bpm speed of the master metronome is used to calculate the number of beats as that is what speed the file will playback at.
Thanks again guys.
Jan 23, 2007 at 4:01pm
Actually come to think of it. There must be a way of determining the original bpm of a track just knowing the length and the sample rate?
Jan 23, 2007 at 5:09pm
Not really – the sample rate is irrelevant here; and so is the length
If you know length and bpm you can determine number of beats in sample.
You have to have at least that much data – maybe you could use
On 23 Jan 2007, at 16:01, Rhys Perkins wrote:
Jan 25, 2007 at 6:53am
Jan 25, 2007 at 9:44am
unless you do some kind of peak detection analysis on the file, you need to know how many bars the loop is and what time signature it uses.
then you can cut it up and reshuffle it with all the little junglist soldiers present and correct
Jan 25, 2007 at 9:45am
unless its got swing in the recording, in which case i would recommend chopping it up by hand or with recycle.
Jan 27, 2007 at 6:02am
For this example, imagine you’ve got a drum loop sample that’s 2 measures
What you need to do is use a mathematical process known as Unit Conversion
1. Figure out what kind of units you’re working with.
In this case, you’re starting with beats per second, or beats/second. How do
2. Figure out what kind of unit you want it to end up as.
You want to find out the beats per minute, or beats/minute.
3. Multiply the original unit by the conversion factor.
In this case, there are 60 seconds in 1 minute, so the conversion factor is
60 seconds and 1 minute are equivalent, so you’re not going to change the
To sum up:
8 beats/3 seconds * 60 seconds/1 minute = (8*60)/3 beats/minute = 160
Jan 27, 2007 at 12:15pm
So in theory if I could detect these beats using the fft object and some kind of way of detecting the quick transients then I could accept any kind of file in and have it cut up in the right way and then apply the Unit Conversion process to the detected beats?
I’m guessing again that this doesnt apply when there is a heavy swing groove applied to the original beat?
Jan 29, 2007 at 12:55pm
Rhys Perkins wrote:
> I’m guessing again that this doesnt apply when there is a heavy swing
Why not, actually this would be the only way to detect a swing and slice
You must be logged in to reply to this topic.