Please familiarise yourself with the forum, including policy on feature requests, rules & guidelines
MPC kit to Deluge Kit converter
dafonk
Beta Tester Posts: 13
Hi,
I'm working on a project to convert the MPC Kit (.xpm) to Deluge Kit (.XML). It's done in Excel.
It's working fine expect that I have a problem to find the exact "endSamplePos" for each sample.
I'm wondering what is the relation between the Size of the sample file and this "endSamplePos" value ?
Does anybody have an idea ?
Thank you for youe help.
Comments
I believe it's the actual sample number.
Let's say you have a wav file that's one second long and recorded at 44.1kHz. The startSamplePos would be 0, and the endSamplePos would be 44,100 since 44.1khz samples 44,100 times per second.
Thank you. But I think it's the lenght of the sample but I don't know the ratio used.
If you take a short number the sample will be cut.
Not sure what you mean by ratio. The value is not in terms of length in time, but the discrete sample number in the wav file.
So, given a 44.1kHz audio file whose length (in terms of time) is 2.5 seconds - then the
endSamplePos
would be 110,250. Recording at 44.1kHz means that you're taking 44,100 samples per second, which you then multiply by the length of the track in seconds.I put together a JavaScript sample for you to take a look at to see if this helps - or to see if I'm wrong here. https://stackblitz.com/edit/js-tx4m27?file=index.js
Given the audio file (represented as a base64 encoded string in the samples.js file), The length is about 6 seconds, and it's sampled at 48kHz - therefore the number of samples in the audio file is 287,155. Forgive any off-by-one errors, but if the first sample is at position 0, then the end position of the file would be at 287154 (the number of samples minus 1).
Hopefully that help.
Thank you very much !
it's working I'll upload the Excel gile if anyone is interested.
I wouldn’t mind taking a look!
I'd like a copy of this file if it's still available.