Calculating Sample Length

Post Reply
User avatar
monoben
Posts: 110
Joined: Wed Feb 26, 2014 11:09 am

Calculating Sample Length

Post by monoben » Mon Mar 09, 2020 6:13 pm

Hi guys, you know the sampler? Well is there a way one can calculate how many samples = how many pattern lines? I’d very much like to be able to create a new sample that will take for example 16 lines to complete when played at C5.

Maybe this could be a feature request, to add to “Length (number of samples)” maybe also there could be just simply “Length (number of lines)”?

a1matt
Posts: 27
Joined: Wed Dec 28, 2016 7:39 pm

Re: Calculating Sample Length

Post by a1matt » Wed Mar 11, 2020 12:38 am

There are some useful sample calculators on the deepsound website that might help with this.

https://mp3.deepsound.net/eng/samples_calculs.php

Maybe 'To find notes length in samples with tempo and sampling rate' will get you part of the way there. At least you will know the number of samples you are shooting for.

User avatar
monoben
Posts: 110
Joined: Wed Feb 26, 2014 11:09 am

Re: Calculating Sample Length

Post by monoben » Wed Mar 11, 2020 2:18 am

Wow there are some serious tools on that site. Thanks for this! Now if I can work out the BPM of my project then I’ll be able to work this out. I’m sure I’ve seen a post on here somewhere about calculating BPM...

Thanks again!

User avatar
Keres
Posts: 263
Joined: Mon Mar 21, 2016 9:41 am
Location: N. Tulsa Ok.
Contact:

Re: Calculating Sample Length

Post by Keres » Wed Mar 11, 2020 6:09 am

When you use the sampler, you can drop the cursor anywhere on the sample and see the offset position in both 9xxx and 7xxxx commands. Go to the sample edit window, click on the position and it will display the offset position in the lower corner.

User avatar
NightRadio
Site Admin
Posts: 3295
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Re: Calculating Sample Length

Post by NightRadio » Wed Mar 11, 2020 9:13 am

how many samples = how many pattern lines?
Line = Sample / ( SampleRate * TPL * 60 / BPM / 24 )
Sample = Line * ( SampleRate * TPL * 60 / BPM / 24 )
SamplesPerLine = SampleRate * TPL * 60 / BPM / 24

SampleRate - base sample rate of the sample, playing a base note (C5 by default)

User avatar
monoben
Posts: 110
Joined: Wed Feb 26, 2014 11:09 am

Re: Calculating Sample Length

Post by monoben » Wed Mar 11, 2020 8:44 pm

Thanks NightRadio! This works great. Forever more all my samples will be exactly the correct length.

User avatar
Keres
Posts: 263
Joined: Mon Mar 21, 2016 9:41 am
Location: N. Tulsa Ok.
Contact:

Re: Calculating Sample Length

Post by Keres » Wed Mar 18, 2020 10:48 am

WOW! cool, thanks Nightradio!

sometimes what i do to make sure a long sample lines up with 2000=25% 4000=50% 6000=75% with the 7xxxx command, is that i load the sample into the sampler, then sync it to the desired BPM in a pattern, then diskwrite only that pattern.

Post Reply