struct Clock

Time of a MidiEvent. More...

Full nameTSE3::Clock
Definition#include <Midi.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Public Members


Detailed Description

The Clock class describes a time at which an MidiCommand or other Event may be transmitted/recieved. It is used primarily by the MidiEvent class.

The time is a signed integer value of pulses, where a pulse is a division of a quarter note (crotchet) as defined by the Clock::PPQN variable.

This is a value type.

See also: MidiEvent, PPQN

static const int PPQN

PPQN

 Clock (int pulses = 0)

Clock

Construct a Clock with the given number of Pulses.

Parameters:
pulsesNumber of pulses.

 Clock (const Clock &m)

Clock

int  beat ()

beat

[const]

Convenience method to obtain the number of whole quarter notes.

Returns: Number of whole quarter notes.

See also: pulse

int  pulse ()

pulse

[const]

Convenince method to obtain the number of pulses not part of a whole quarter note.

Returns: Number of remaining pulses.

See also: beat

int pulses

pulses

Clock  convert (Clock time, int otherPPQN)

convert

[static]

Convert a time from one PPQN resolution to this one.

Parameters:
timeClock in other PPQN resolution
otherPPQNThe other PPQN resolution

Returns: The Clock value in this PPQN resolution

operator  int ()

int

[const]

const Clock  operator+ (const Clock &c)

operator+

const Clock  operator+ (int i)

operator+

Clock  operator+= (const Clock &c)

operator+=

const Clock  operator- (const Clock &c)

operator-

const Clock  operator- (int i)

operator-

Clock  operator-= (const Clock &c)

operator-=

const Clock  operator* (const Clock &c)

operator*

const Clock  operator* (int i)

operator*

Clock  operator*= (const Clock &c)

operator*=

Clock  operator*= (int i)

operator*=

const Clock  operator/ (const Clock &c)

operator/

const Clock  operator/ (int i)

operator/

Clock  operator/= (const Clock &c)

operator/=

Clock  operator/= (int i)

operator/=

const Clock  operator% (const Clock &c)

operator%

const Clock  operator% (int i)

operator%

Clock  operator%= (const Clock &c)

operator%=

Clock  operator%= (int i)

operator%=