Drumkit meta-data

edited January 11 in OP-1
Has anyone here had any success understanding the Drum-kit AIFF meta data?

Specifically I'm trying to work out how TE have coded the sample start and end times. I am trying to convert from sample frames to whatever format they use. To test this I have created a sample exactly 1000 frames long and generated an AIFF using the xfer tool.. In the meta data it shows the end point values as 4049865.. How do you get one from the other?

Comments

  • I had some success in working with the start and end points in the drum meta data. Let me dig out my code and share what the deal is. (Probably tomorrow as I'm driving tonight).
  • edited January 11
    Thanks @yoof.. I did a search and found some source code on Github (https://github.com/padenot/libop1/blob/master/src/op1_drum_impl.cpp)

    From that I work out the formula to be:

    0x7FFFFFFE / (44100*2*12) * frame * 2

    Seems to give correct results although not entirely sure why this works


  • Nice one :)

    The right hand side is this:

    44100 (samples per second) * 16 bit (2 bytes per sample point) * 12 (seconds in the drum sampler) * frame number * 2 (for stereo)

    The left hand side is 1 less than a binary number with thirty one 1's. Not sure why that number is chosen... could be the max positive number that it's possible to represent by one of the datatypes in whatever language the op-1 is written in.
  • Cool, it was the left side that was confusing me most, I'm guessing its probably derived from examining a drum kit generated on the op-1 where a end point is set at the furthest extreme of a 12 second sample..

    Either way, it works so I'm happy :) 
Sign In or Register to comment.