[gmpi] Re: Topic 6: Time representation

  • From: George Yohng <george@xxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Tue, 29 Apr 2003 18:28:14 +0300

Hello,

The idea of sample-based absolute timestamp and periodical
syncronization events (for exact adjustments) seems to be quite sane. If
plugin doesn't need MIDI clock syncronization, then one just ignores
SYNC events.

While audio synchronization is necessary for many common types of
plugins (e.g., chorus or modulated reverb).

void processDataWhatever(int64 samplestamp, ... );


(excerpt from my internal wrapper sourcecode, you could find it useful)


enum {
   OSP_SYNC_EXT = 1862340480 // divides by most of numbers that could be
                             // used as a part of measure
};

struct osp_aux_sync : public _osp_aux
{
   // if flag is set, then there is data for
   enum {MBT=1, EXT=2, A=4, B=8, KEY=16};
   int flags;

   int m, // measures
       b, // beats
       t; // 1/960 of beat

int extb, // absolute number of beat,

       ext;   // offset within beat
              // (in EXT units (1/OSP_SYNC_EXT))

   int mA,mB; // for A/B meter (for example, waltz is 3/4)
              // A also means beats in measure

   int key;   // base tune key,
              // &0x1000 for minor, &0xFF%12 - for relative key
};


Thanks, George.



----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: