Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::Metronome Class Reference

Metronome tick object. More...

#include <Metronome.h>

Inheritance diagram for TSE3::Metronome:

Inheritance graph
[legend]
Collaboration diagram for TSE3::Metronome:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Metronome ()
virtual ~Metronome ()
int channel () const
void setChannel (int c)
int port () const
void setPort (int p)
int duration () const
void setDuration (int d)
int barNote () const
void setBarNote (int n)
int barVelocity () const
void setBarVelocity (int v)
int beatNote () const
void setBeatNote (int n)
int beatVelocity () const
void setBeatVelocity (int v)
bool status (int mode) const
void setStatus (int mode, bool s)
int beatsPerBar () const
void setBeatsPerBar (int bpb)
Clock barReference () const
void setBarReference (Clock br)
virtual PlayableIteratoriterator (Clock index)
virtual Clock lastClock () const

Friends

class MetronomeIterator

Detailed Description

Metronome tick object.

This class provides the functionality of a metronome.

The metronome remembers whether it should be produced in playing and recording modes, but it doesn't enforce this itself - it is the responsibility of the Transport playback routines.

There are two different metronome ticks that are produced, for bars and beats. They must have the same MIDI channel, port, and duration, but can have different notes and velocities.

To determine the point at which clocks bar ticks are produced, a bar reference exists.

Author:
Pete Goodliffe
Version:
3.00
See also:
Playable


Constructor & Destructor Documentation

TSE3::Metronome::Metronome  ) 
 

Constructs a Metronome with default tick.

virtual TSE3::Metronome::~Metronome  )  [virtual]
 


Member Function Documentation

int TSE3::Metronome::channel  )  const [inline]
 

Returns the metronome MIDI channel.

Returns:
Metronome MIDI channel
See also:
setChannel

void TSE3::Metronome::setChannel int  c  ) 
 

Sets the metronome MIDI channel.

Parameters:
c New metronome MIDI channel
See also:
channel

int TSE3::Metronome::port  )  const [inline]
 

Returns the metronome MIDI port.

Returns:
Metronome MIDI port
See also:
setPort

void TSE3::Metronome::setPort int  p  ) 
 

Sets the metronome MIDI port.

Parameters:
p New metronome MIDI port
See also:
port

int TSE3::Metronome::duration  )  const [inline]
 

Returns the metronome duration.

Returns:
Metronome tick duration
See also:
setDuration

void TSE3::Metronome::setDuration int  d  ) 
 

Sets the metronome duration.

Parameters:
p New metronome tick duration
See also:
duration

int TSE3::Metronome::barNote  )  const [inline]
 

Returns the metronome bar note. This is the note that is played on a metronome tick that occurs at the start of a bar.

Returns:
Metronome bar note
See also:
setBarNote

setBeatNote

setBarVelocity

void TSE3::Metronome::setBarNote int  n  ) 
 

Sets the metronome bar note.

Parameters:
n New metronome bar note
See also:
barNote

beatNote

barVelocity

int TSE3::Metronome::barVelocity  )  const [inline]
 

Returns the metronome bar velocity.

Returns:
Metronome bar velocity
See also:
setBarVelocity

setBeatVelocity

setBarNote

void TSE3::Metronome::setBarVelocity int  v  ) 
 

Sets the metronome bar velocity.

Parameters:
v New metronome bar velocity
See also:
barVelocity

beatVelocity

barNote

int TSE3::Metronome::beatNote  )  const [inline]
 

Returns the metronome beat note. This is the note that is played on a metronome tick that does not occur at the start of a bar.

Returns:
Metronome beat note
See also:
setBeatNote

setBarNote

setBeatVelocity

void TSE3::Metronome::setBeatNote int  n  ) 
 

Sets the metronome beat note.

Parameters:
n New metronome beat note
See also:
beatNote

barNote

beatVelocity

int TSE3::Metronome::beatVelocity  )  const [inline]
 

Returns the metronome beat velocity.

Returns:
Metronome beat velocity
See also:
setBeatVelocity

setBarVelocity

setBeatNote

void TSE3::Metronome::setBeatVelocity int  v  ) 
 

Sets the metronome bar velocity.

Parameters:
v New metronome bar velocity
See also:
beatrVelocity

barVelocity

beatNote

bool TSE3::Metronome::status int  mode  )  const [inline]
 

Returns the metronome playing status for a given Transport object status mode.

Parameters:
mode Transport object status mode
Returns:
Whether metronome is produced in this mode
See also:
setStatus

void TSE3::Metronome::setStatus int  mode,
bool  s
 

Sets the metronome playing status for a given transport mode.

Parameters:
mode Transport object status mode
s New metronome playing status
See also:
status

int TSE3::Metronome::beatsPerBar  )  const [inline]
 

Returns the metronome beats per bar value.

A normal TSE3 library user need not worry about this method.

The Transport object uses this value to tell the metronome the current time signtaure information. The value represents the number of quarter notes in a bar. It is used in conjuction with the barReference to determine which metronome ticks are 'bar' and which are 'beat'.

void TSE3::Metronome::setBeatsPerBar int  bpb  ) 
 

Sets the metronome beats per bar value.

A normal TSE3 library user need not worry about this method.

Clock TSE3::Metronome::barReference  )  const [inline]
 

Returns the metronome bar reference clock.

A normal TSE3 library user need not worry about this method.

This is the time value of some accented 'bar' note. This tells the Metronome object when to create a 'bat' tick and when to create a 'beat' tick when used in conjuction with the beatsPerBar method.

void TSE3::Metronome::setBarReference Clock  br  ) 
 

Sets the metronome bar reference clock.

A normal TSE3 library user need not worry about this method.

virtual PlayableIterator* TSE3::Metronome::iterator Clock  index  )  [virtual]
 

Implements TSE3::Playable.

virtual Clock TSE3::Metronome::lastClock  )  const [virtual]
 

Implements TSE3::Playable.


Friends And Related Function Documentation

friend class MetronomeIterator [friend]
 


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:46:23 2005 for TSE3 by doxygen 1.3.2