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

TSE3::Track Class Reference

Represents the concurrent musical sections of a Song. More...

#include <Track.h>

Inheritance diagram for TSE3::Track:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Track ()
virtual ~Track ()
const std::string & title () const
void setTitle (const std::string &s)
MidiFilterfilter ()
MidiParamsparams ()
DisplayParamsdisplayParams ()
Songparent () const
size_t size () const
Partoperator[] (size_t n) const
Partinsert (Clock start, Clock end)
void insert (Part *part)
void remove (Part *part)
void remove (size_t index)
size_t numPartsBetween (Clock start, Clock end)
int operator< (const Track &t) const
size_t index (Clock c) const
size_t index (Part *part) const
virtual void Notifier_Deleted (Part *)
virtual PlayableIteratoriterator (Clock index)
virtual Clock lastClock () const
virtual void save (std::ostream &o, int i) const
virtual void load (std::istream &in, SerializableLoadInfo &info)
virtual void DisplayParams_Altered (DisplayParams *)

Friends

class Song

Detailed Description

Represents the concurrent musical sections of a Song.

A Track is a subunit of a Song. Many Tracks can exist in a Song and are played concurrently. You can imagine them to correspond to the different members of a band or orchestra.

Tracks contain a number of parameters that effect the way the musical data they contain is produced.

Tracks contain . They 'own' them, and so a Part's lifetime is bound to it's parent Track. are created by external agents - the user of the TSE3 library. Each Part has a well defined start and end time, and the Part objects in the Track may not overlap.

Command classes
Use the following command classes to manipute this object in a undo/redo environment.

Author:
Pete Goodliffe
Version:
3.00
See also:
Song

Part


Constructor & Destructor Documentation

TSE3::Track::Track  ) 
 

virtual TSE3::Track::~Track  )  [virtual]
 


Member Function Documentation

const std::string& TSE3::Track::title  )  const
 

Read the Track title.

Returns:
Track's title string
See also:
setTitle

void TSE3::Track::setTitle const std::string &  s  ) 
 

Set the Track title.

Parameters:
s New title string
See also:
title

MidiFilter* TSE3::Track::filter  ) 
 

MidiFilter that affects how are produced by this Track.

Returns:
Track's MidiFilter

MidiParams* TSE3::Track::params  ) 
 

The Track parameters.

Returns:
Track's MidiParams

DisplayParams* TSE3::Track::displayParams  ) 
 

The display parameters.

Returns:
The Track's DisplayParams object

Song* TSE3::Track::parent  )  const
 

Returns a pointer to the parent Song that this Track has been inserted into. If this Track has not been inserted in a Song, this method returns zero.

Returns:
Song this Track is inserted in

size_t TSE3::Track::size  )  const
 

The number of in this Track.

Returns:
The number of

Part* TSE3::Track::operator[] size_t  n  )  const
 

Return the Part at the given index

The value returned for an index that is out of range is undefined. The size method describes the valid values.

Parameters:
n Index
Returns:
Part at this index

Part* TSE3::Track::insert Clock  start,
Clock  end
 

Inserts a Part between the given times. The Track 'owns' this Part and will delete it when it is deleted.

If the Part cannot be inserted (due to Part overlap) a TrackError will be thrown.

Parameters:
start Part's start time
end Part's end time
Exceptions:
TrackError 
Returns:
New Part. If several Part objects are inserted (because action is ) the pointer to the first Part will be returned.

void TSE3::Track::insert Part part  ) 
 

Inserts the given Part into the Track at the Part's times.

This causes the Part to be 'owned' by the Track, it will be deleted when the Track is deleted.

You may not pass a Part that has already been inserted into a different (or indeed the same) Track (the TrackError exception will be thrown).

If the Part cannot be inserted (due to Part overlap) a TrackError will be thrown.

If the Part has invalid times (i.e. start after end) then a TrackError will be thrown.

Parameters:
New Part to insert
Exceptions:
TrackError 

void TSE3::Track::remove Part part  ) 
 

Remove the given Part.

The Part will not be deleted, it is no longer considered to be 'owned' by the Track.

If the Part is not in the Track then nothing will happen.

Parameters:
part Part to remove - you must now delete it

void TSE3::Track::remove size_t  index  ) 
 

Remove the Part with the given index.

The Part will not be deleted, it is no longer considered to be 'owned' by the Track.

If the index is invalid then nothing will happen.

Parameters:
part Part to remove - you must now delete it

size_t TSE3::Track::numPartsBetween Clock  start,
Clock  end
 

Returns the number of Part objects (or bits of Part objects) that exist in the Track between the given times.

Parameters:
start Start of time zone
end End of time zone
Returns:
Number of Part objects between times

int TSE3::Track::operator< const Track t  )  const
 

This less than operation compares the Tracks' title strings.

size_t TSE3::Track::index Clock  c  )  const
 

Returns the index of the first Part that occurs after the given Clock.

Parameters:
c Clock value to search for
Returns:
Index of first Part at or after this time. If past the end of the Track object then returns 'size'.

size_t TSE3::Track::index Part part  )  const
 

Returns the index of the specified Part (or size if not in this Track).

Parameters:
part Pointer to
Returns:
The index of the specified Part, or size()

virtual void TSE3::Track::Notifier_Deleted Part  )  [virtual]
 

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

Implements TSE3::Playable.

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

Implements TSE3::Playable.

virtual void TSE3::Track::save std::ostream &  o,
int  i
const [virtual]
 

Reimplemented from TSE3::Serializable.

virtual void TSE3::Track::load std::istream &  in,
SerializableLoadInfo info
[virtual]
 

Reimplemented from TSE3::Serializable.

virtual void TSE3::Track::DisplayParams_Altered DisplayParams  )  [virtual]
 

Reimplemented from TSE3::DisplayParamsListener.


Friends And Related Function Documentation

friend class Song [friend]
 

The Song class is a friend so that it can access the () method.


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