18 #define thisTTClass Max
19 #define thisTTClassName "max"
20 #define thisTTClassTags "clock, max"
22 #define thisClockVersion "0.1"
23 #define thisClockAuthor "Theo de la Hogue"
24 #define thisClockStretchable NO
26 extern "C" TT_EXTENSION_EXPORT
TTErr TTLoadJamomaExtension_Max(
void)
46 object_free((t_object*)clock);
60 if (mDuration <= 0.) {
66 (mCallback)(mBaton, mPosition, mDate);
69 sendNotification(
TTSymbol(
"ClockRunningChanged"), mRunning);
75 numGrains = mDuration / mGranularity;
76 stepSize = 1.0 / numGrains;
82 (mCallback)(mBaton, mPosition, mDate);
85 sendNotification(
TTSymbol(
"ClockRunningChanged"), mRunning);
89 setclock_fdelay(NULL, clock, mGranularity);
102 sendNotification(
TTSymbol(
"ClockRunningChanged"), mRunning);
123 if (mRunning || !mPaused) {
125 #ifdef SHEDULER_DEBUG
126 cout <<
"Max::Tick -- numGrain = " << numGrains << endl;
133 if (numGrains <= 0.) {
140 (mCallback)(mBaton, mPosition, mDate);
143 sendNotification(
TTSymbol(
"ClockRunningChanged"), mRunning);
148 mPosition += stepSize;
149 mDate = mDuration * mPosition;
151 (mCallback)(mBaton, mPosition, mDate);
157 setclock_fdelay(NULL, clock, mGranularity);
#define addAttribute(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom getter...
void MaxClockCallback(Max *aMaxClock)
Called by the Max queue, and provided to the qelem – needs to have a C interface.
void append(const T &anElementValueToAppend)
Insert a single TTElement at the end.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
void clear()
Clear all values from the vector, leaving with size of 0.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
[doxygenAppendixC_copyExample]