00001 /* 00002 * @(#)util/Utilities.h 3.00 20 May 1999 00003 * 00004 * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org) 00005 * 00006 * This file is part of TSE3 - the Trax Sequencer Engine version 3.00. 00007 * 00008 * This library is modifiable/redistributable under the terms of the GNU 00009 * General Public License. 00010 * 00011 * You should have received a copy of the GNU General Public License along 00012 * with this program; see the file COPYING. If not, write to the Free Software 00013 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00014 * 00015 */ 00016 00017 #ifndef TSE3_UTIL_SNAP_H 00018 #define TSE3_UTIL_SNAP_H 00019 00020 #include "tse3/Midi.h" 00021 00022 namespace TSE3 00023 { 00024 class TimeSigTrack; 00025 00026 namespace Util 00027 { 00041 class Snap 00042 { 00043 public: 00044 00051 Snap(TSE3::TimeSigTrack *t) : tst(t), _snap(-1) {} 00052 00059 void setTimeSigTrack(TSE3::TimeSigTrack *t) { tst = t; } 00060 00067 TSE3::Clock snap() const { return _snap; } 00068 00074 void setSnap(TSE3::Clock s) { _snap = s; } 00075 00080 TSE3::Clock operator()(TSE3::Clock c) const; 00081 00082 private: 00083 00084 TSE3::TimeSigTrack *tst; 00085 TSE3::Clock _snap; 00086 }; 00087 } 00088 } 00089 00090 #endif