Canorus 0.0
Public Member Functions | Private Attributes | List of all members
CAMidiNote Class Reference

Represents a note with custom length and Midi-defined pitch. More...

#include <midinote.h>

Inheritance diagram for CAMidiNote:
Inheritance graph
[legend]

Public Member Functions

 CAMidiNote (int pitch, int timeStart, int timeLength, CAVoice *v)
 
virtual ~CAMidiNote ()
 
CAMidiNoteclone (CAVoice *voice=0)
 
int compare (CAMusElement *elt)
 
int midiPitch ()
 
void setMidiPitch (int m)
 
- Public Member Functions inherited from CAPlayable
 CAPlayable (CAPlayableLength length, CAVoice *voice, int timeStart, int timeLength=-1)
 
virtual ~CAPlayable ()
 
CAPlayableLengthplayableLength ()
 
void setPlayableLength (CAPlayableLength &l)
 
virtual CAPlayableclone (CAContext *context)
 
virtual CAPlayableclone (CAVoice *voice=0)=0
 
CATuplettuplet ()
 
void setTuplet (CATuplet *t)
 
CAVoicevoice ()
 
void setVoice (CAVoice *v)
 
CAStaffstaff ()
 
bool isFirstInTuplet ()
 
bool isLastInTuplet ()
 
void resetTime ()
 
void calculateTimeLength ()
 
- Public Member Functions inherited from CAMusElement
 CAMusElement (CAContext *context, int timeStart, int timeLength=0)
 
virtual ~CAMusElement ()
 
virtual CAMusElementclone (CAContext *context=0)=0
 
virtual int compare (CAMusElement *elt)=0
 
CAMusElementType musElementType ()
 
CAContextcontext ()
 
void setContext (CAContext *context)
 
virtual int timeStart () const
 
void setTimeStart (int time)
 
virtual int timeLength () const
 
void setTimeLength (int length)
 
int timeEnd ()
 
virtual int realTimeStart ()
 
virtual int realTimeLength ()
 
int realTimeEnd ()
 
const QString name ()
 
void setName (const QString name)
 
const bool isVisible ()
 
void setVisible (const bool v)
 
const QColor color ()
 
void setColor (const QColor c)
 
const QList< CAMark * > markList ()
 
void addMark (CAMark *mark)
 
void addMarks (QList< CAMark * > marks)
 
void removeMark (CAMark *mark)
 
const QList< CANoteCheckerError * > & noteCheckerErrorList ()
 
void addNoteCheckerError (CANoteCheckerError *nce)
 
void removeNoteCheckerError (CANoteCheckerError *nce)
 
bool isPlayable ()
 

Private Attributes

int _midiPitch
 

Additional Inherited Members

- Public Types inherited from CAMusElement
enum  CAMusElementType {
  Undefined = 0 , Note , Rest , MidiNote ,
  Barline , Clef , TimeSignature , KeySignature ,
  Slur , Tuplet , Syllable , FunctionMark ,
  FiguredBassMark , Mark
}
 
- Static Public Member Functions inherited from CAMusElement
static const QString musElementTypeToString (CAMusElementType)
 
static CAMusElementType musElementTypeFromString (const QString)
 
- Protected Member Functions inherited from CAMusElement
void setMusElementType (CAMusElementType type)
 
- Protected Attributes inherited from CAPlayable
CAPlayableLength _playableLength
 
CAVoice_voice
 
CATuplet_tuplet
 
- Protected Attributes inherited from CAMusElement
CAMusElementType _musElementType
 
QList< CAMark * > _markList
 
QList< CANoteCheckerError * > _noteCheckerErrorList
 
CAContext_context
 
int _timeStart
 
int _timeLength
 
bool _visible
 
QColor _color
 
QString _name
 

Detailed Description

Represents a note with custom length and Midi-defined pitch.

Copyright (c) 2009, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.

Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE.GPL for details.

This class is usually used when a composer wants to import his improvisations and the input Midi files are naturally recorded and are too difficult to quantize. However, composer wants to see his recorded notes in the staff so he can transcribe the prototype improvisation into actual notes. The CAMidiNote class represents a Midi Note-On/Note-Off pair of events with defined timeStart, timeLength and Midi pitch. The class is usually used to graphically display the recorded Midi events in the staff and nothing more.

Constructor & Destructor Documentation

◆ CAMidiNote()

CAMidiNote::CAMidiNote ( int  pitch,
int  timeStart,
int  timeLength,
CAVoice v 
)

References CAMusElement::MidiNote, and CAMusElement::setMusElementType().

Referenced by clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CAMidiNote()

CAMidiNote::~CAMidiNote ( )
virtual

Member Function Documentation

◆ clone()

CAMidiNote * CAMidiNote::clone ( CAVoice voice = 0)
virtual

Implements CAPlayable.

References CAMidiNote(), midiPitch(), CAMusElement::timeLength(), and CAMusElement::timeStart().

Here is the call graph for this function:

◆ compare()

int CAMidiNote::compare ( CAMusElement elt)
virtual

Compares the music element with the given elt and returns number of differences in their properties. Returns 0, if the music elements are exact; -1 if the music element type differs; otherwise number greater than 0.

This method is usually used when opening a score document where music elements are written in various voices (eg. barlines), but are eventually merged and written only once per staff.

Implements CAMusElement.

References CAMusElement::MidiNote, midiPitch(), and CAMusElement::musElementType().

Here is the call graph for this function:

◆ midiPitch()

int CAMidiNote::midiPitch ( )
inline

References _midiPitch.

Referenced by clone(), compare(), and CALayoutEngine::reposit().

Here is the caller graph for this function:

◆ setMidiPitch()

void CAMidiNote::setMidiPitch ( int  m)
inline

References _midiPitch.

Member Data Documentation

◆ _midiPitch

int CAMidiNote::_midiPitch
private

Referenced by midiPitch(), and setMidiPitch().


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