Logo Search packages:      
Sourcecode: rosegarden version File versions  Download package

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Friends

Rosegarden::Composition Class Reference

Inheritance diagram for Rosegarden::Composition:
Inheritance graph
Collaboration diagram for Rosegarden::Composition:
Collaboration graph

List of all members.


struct  BarNumberComparator
class  ReferenceSegment
struct  ReferenceSegmentEventCmp

Public Types

typedef segmentcontainer::iterator iterator
typedef std::vector< Marker * > markercontainer
typedef markercontainer::iterator markeriterator
typedef std::set< TrackId > recordtrackcontainer
typedef std::multiset< Segment
*, Segment::SegmentCmp
typedef std::map< TrackId,
Track * > 
typedef trackcontainer::iterator trackiterator
typedef std::set
< TriggerSegmentRec
*, TriggerSegmentCmp

Public Member Functions

void addMarker (Marker *marker)
void addObserver (CompositionObserver *obs)
iterator addSegment (Segment *)
int addTempoAtTime (timeT time, tempoT tempo, tempoT targetTempo=-1)
int addTimeSignature (timeT t, TimeSignature timeSig)
void addTrack (Track *track)
TriggerSegmentRecaddTriggerSegment (Segment *, int pitch=-1, int velocity=-1)
TriggerSegmentRecaddTriggerSegment (Segment *, TriggerSegmentId, int basePitch=-1, int baseVelocity=-1)
iterator begin ()
const_iterator begin () const
void clear ()
void clearMarkers ()
void clearTracks ()
void clearTriggerSegments ()
bool contains (const Segment *)
void deleteSegment (iterator)
bool deleteSegment (Segment *)
void deleteTrack (TrackId track)
void deleteTriggerSegment (TriggerSegmentId)
bool detachMarker (Marker *marker)
bool detachSegment (Segment *)
bool detachTrack (Track *track)
void detachTriggerSegment (TriggerSegmentId)
void dump (std::ostream &, bool full=false) const
iterator end ()
const_iterator end () const
iterator findSegment (const Segment *)
timeT getAbsoluteTimeForMusicalTime (int bar, int beat, int fraction, int remainder)
timeT getBarEnd (int n) const
timeT getBarEndForTime (timeT t) const
int getBarNumber (timeT t) const
std::pair< timeT, timeT > getBarRange (int n) const
std::pair< timeT, timeT > getBarRangeForTime (timeT t) const
timeT getBarStart (int n) const
timeT getBarStartForTime (timeT t) const
const BasicQuantizergetBasicQuantizer () const
tempoT getCompositionDefaultTempo () const
std::string getCopyrightNote () const
tempoT getCurrentTempo () const
timeT getDuration () const
timeT getDurationForMusicalTime (timeT absoluteTime, int bars, int beats, int fractions, int remainder)
RealTime getElapsedRealTime (timeT t) const
timeT getElapsedTimeForRealTime (RealTime t) const
timeT getEndMarker () const
ColourMapgetGeneralColourMap ()
timeT getLoopEnd () const
timeT getLoopStart () const
const markercontainer & getMarkers () const
markercontainer & getMarkers ()
int getMaxContemporaneousSegmentsOnTrack (TrackId track) const
tempoT getMaxTempo () const
TrackId getMaxTrackId () const
ConfigurationgetMetadata ()
const ConfigurationgetMetadata () const
tempoT getMinTempo () const
TrackId getMinTrackId () const
void getMusicalTimeForAbsoluteTime (timeT absoluteTime, int &bar, int &beat, int &fraction, int &remainder)
void getMusicalTimeForDuration (timeT absoluteTime, timeT duration, int &bars, int &beats, int &fractions, int &remainder)
int getNbBars () const
unsigned int getNbSegments () const
unsigned int getNbTracks () const
unsigned int getNewRefreshStatusId ()
TrackId getNewTrackId () const
TriggerSegmentId getNextTriggerSegmentId () const
const NotationQuantizergetNotationQuantizer () const
timeT getPosition () const
RealTime getRealTimeDifference (timeT t0, timeT t1) const
const recordtrackcontainer & getRecordTracks () const
RefreshStatusgetRefreshStatus (unsigned int id)
ColourMapgetSegmentColourMap ()
const ColourMapgetSegmentColourMap () const
segmentcontainer & getSegments ()
const segmentcontainer & getSegments () const
int getSegmentVoiceIndex (const Segment *) const
TrackId getSelectedTrack () const
timeT getStartMarker () const
tempoT getTempoAtTime (timeT t) const
std::pair< timeT, tempoT > getTempoChange (int n) const
int getTempoChangeCount () const
int getTempoChangeNumberAt (timeT time) const
std::pair< bool, tempoT > getTempoRamping (int n, bool calculate=true) const
TimeSignature getTimeSignatureAt (timeT t) const
timeT getTimeSignatureAt (timeT, TimeSignature &) const
std::pair< timeT, TimeSignaturegetTimeSignatureChange (int n) const
int getTimeSignatureCount () const
TimeSignature getTimeSignatureInBar (int n, bool &isNew) const
int getTimeSignatureNumberAt (timeT time) const
TrackgetTrackById (TrackId track) const
TrackgetTrackByPosition (int position) const
int getTrackPositionById (TrackId track) const
trackcontainer & getTracks ()
const trackcontainer & getTracks () const
SegmentgetTriggerSegment (TriggerSegmentId)
int getTriggerSegmentId (Segment *)
TriggerSegmentRecgetTriggerSegmentRec (TriggerSegmentId)
triggersegmentcontainer & getTriggerSegments ()
const triggersegmentcontainer & getTriggerSegments () const
bool haveTrack (TrackId track) const
bool isLooping () const
bool isMarkerAtPosition (timeT time) const
bool isSolo () const
bool isTrackRecording (TrackId track) const
void removeObserver (CompositionObserver *obs)
void removeTempoChange (int n)
void removeTimeSignature (int n)
void resetTrackIdAndPosition (TrackId oldId, TrackId newId, int position)
void setCompositionDefaultTempo (tempoT tempo)
void setCopyrightNote (const std::string &cr)
void setEndMarker (const timeT &eM)
void setGeneralColourMap (ColourMap &newmap)
void setLoopEnd (const timeT &lE)
void setLoopStart (const timeT &lS)
void setNextTriggerSegmentId (TriggerSegmentId)
void setPlayMetronome (bool value)
void setPosition (timeT position)
void setRecordMetronome (bool value)
void setSegmentColourMap (ColourMap &newmap)
void setSegmentStartTime (Segment *, timeT)
void setSelectedTrack (TrackId track)
void setSolo (bool value)
void setStartMarker (const timeT &sM)
void setTrackRecording (TrackId track, bool recording)
virtual std::string toXmlString ()
void updateRefreshStatuses ()
 Set all refresh statuses to true.
void updateTriggerSegmentReferences ()
bool usePlayMetronome () const
bool useRecordMetronome () const
iterator weakAddSegment (Segment *)
bool weakDetachSegment (Segment *)

Static Public Member Functions

static std::string encode (const std::string &)
static int getDefaultNbBars ()
static tempoT getTempoForQpm (double qpm)
static double getTempoQpm (tempoT tempo)
static void setDefaultNbBars (int b)

Protected Types

typedef std::list
< CompositionObserver * > 

Protected Member Functions

void calculateBarPositions () const
 affects m_timeSigSegment
void calculateTempoTimestamps () const
 affects m_tempoSegment
void checkSelectedAndRecordTracks ()
void clearVoiceCaches ()
TrackId getClosestValidTrackId (TrackId id) const
bool getTempoTarget (ReferenceSegment::const_iterator i, tempoT &target, timeT &targetTime) const
ReferenceSegment::iterator getTimeSignatureAtAux (timeT t) const
void notifyEndMarkerChange (bool shorten) const
void notifyMetronomeChanged () const
void notifySegmentAdded (Segment *) const
void notifySegmentEndMarkerChange (Segment *s, bool shorten)
void notifySegmentEventsTimingChanged (Segment *s, timeT delay, RealTime rtDelay) const
void notifySegmentRemoved (Segment *) const
void notifySegmentRepeatChanged (Segment *, bool) const
void notifySegmentRepeatEndChanged (Segment *, timeT) const
void notifySegmentStartChanged (Segment *, timeT)
void notifySegmentTrackChanged (Segment *s, TrackId oldId, TrackId newId) const
void notifySegmentTransposeChanged (Segment *s, int transpose) const
void notifySoloChanged () const
void notifySourceDeletion () const
void notifyTempoChanged () const
void notifyTimeSignatureChanged () const
void notifyTrackChanged (Track *) const
void notifyTrackDeleted (TrackId) const
timeT realTime2Time (RealTime rtime, tempoT tempo) const
timeT realTime2Time (RealTime rtime, tempoT tempo, timeT targetTempoTime, tempoT targetTempo) const
void rebuildVoiceCaches () const
RealTime time2RealTime (timeT time, tempoT tempo, timeT targetTempoTime, tempoT targetTempo) const
RealTime time2RealTime (timeT time, tempoT tempo) const
void updateExtremeTempos ()

Static Protected Member Functions

static RealTime getTempoTimestamp (const Event *e)
static void setTempoTimestamp (Event *e, RealTime r)

Protected Attributes

bool m_barPositionsNeedCalculating
tempoT m_defaultTempo
timeT m_endMarker
ColourMap m_generalColourMap
timeT m_loopEnd
timeT m_loopStart
markercontainer m_markers
tempoT m_maxTempo
Configuration m_metadata
tempoT m_minTempo
TriggerSegmentId m_nextTriggerSegmentId
ObserverSet m_observers
bool m_playMetronome
timeT m_position
bool m_recordMetronome
recordtrackcontainer m_recordTracks
RefreshStatusArray< RefreshStatusm_refreshStatusArray
ColourMap m_segmentColourMap
segmentcontainer m_segments
std::map< const Segment *, int > m_segmentVoiceIndexCache
TrackId m_selectedTrack
bool m_solo
timeT m_startMarker
ReferenceSegment m_tempoSegment
 Contains tempo events.
bool m_tempoTimestampsNeedCalculating
ReferenceSegment m_timeSigSegment
 Contains time signature events.
trackcontainer m_tracks
std::map< TrackId, int > m_trackVoiceCountCache
triggersegmentcontainer m_triggerSegments

Static Protected Attributes

static const PropertyName BarNumberProperty = "BarNumber"
static int m_defaultNbBars = 100
static const PropertyName NoAbsoluteTimeProperty = "NoAbsoluteTime"
static const PropertyName TargetTempoProperty = "TargetTempo"
static const std::string TempoEventType = "tempo"
static const PropertyName TempoProperty = "Tempo"
static const PropertyName TempoTimestampProperty = "TimestampSec"

Private Member Functions

 Composition (const Composition &)
Compositionoperator= (const Composition &)


class Segment
class Track

Detailed Description

Definition at line 59 of file Composition.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index