MuseScore  3.4
Music composition and notation
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Ms::Note Class Referencefinal

Graphic representation of a note. More...

#include <note.h>

Inheritance diagram for Ms::Note:
Inheritance graph
[legend]
Collaboration diagram for Ms::Note:
Collaboration graph
[legend]

Public Types

enum  ValueType : char { ValueType::OFFSET_VAL, ValueType::USER_VAL }
 
- Public Types inherited from Ms::Element
enum  EditBehavior { EditBehavior::SelectOnly, EditBehavior::Edit }
 

Public Member Functions

 Note (Score *s=0)
 
 Note (const Note &, bool link=false)
 
 ~Note ()
 
Noteoperator= (const Note &)=delete
 
virtual Noteclone () const override
 
ElementType type () const override
 
virtual void undoUnlink () override
 
virtual qreal mag () const override
 
void layout ()
 
void layout2 ()
 
void setCachedNoteheadSym (SymId i)
 
void scanElements (void *data, void(*func)(void *, Element *), bool all=true)
 
void setTrack (int val)
 
int playTicks () const
 Return total tick len of tied notes. More...
 
qreal headWidth () const
 
qreal headHeight () const
 
qreal tabHeadWidth (const StaffType *tab=0) const
 
qreal tabHeadHeight (const StaffType *tab=0) const
 
QPointF stemDownNW () const
 
QPointF stemUpSE () const
 
qreal bboxXShift () const
 
qreal noteheadCenterX () const
 
qreal bboxRightPos () const
 
qreal headBodyWidth () const
 
NoteHead::Group headGroup () const
 
NoteHead::Type headType () const
 
void setHeadGroup (NoteHead::Group val)
 
void setHeadType (NoteHead::Type t)
 
virtual int subtype () const override
 
virtual QString subtypeName () const override
 
void setPitch (int val)
 
void setPitch (int pitch, int tpc1, int tpc2)
 
int pitch () const
 
int ppitch () const
 playback pitch More...
 
int epitch () const
 effective pitch More...
 
qreal tuning () const
 
void setTuning (qreal v)
 
void undoSetTpc (int v)
 
int transposition () const
 
bool fixed () const
 
void setFixed (bool v)
 
int fixedLine () const
 
void setFixedLine (int v)
 
int tpc () const
 
int tpc1 () const
 
int tpc2 () const
 
QString tpcUserName (bool explicitAccidental=false) const
 
void setTpc (int v)
 
void setTpc1 (int v)
 
void setTpc2 (int v)
 
void setTpcFromPitch ()
 
int tpc1default (int pitch) const
 
int tpc2default (int pitch) const
 
int transposeTpc (int tpc)
 
Accidentalaccidental () const
 
void setAccidental (Accidental *a)
 
AccidentalType accidentalType () const
 
void setAccidentalType (AccidentalType type)
 
int line () const
 
void setLine (int n)
 
int physicalLine () const
 
int fret () const
 
void setFret (int val)
 
int string () const
 
void setString (int val)
 
bool ghost () const
 
void setGhost (bool val)
 
bool fretConflict () const
 
void setFretConflict (bool val)
 
virtual void add (Element *) override
 
virtual void remove (Element *) override
 
bool mirror () const
 
void setMirror (bool val)
 
bool small () const
 
void setSmall (bool val)
 
bool play () const
 
void setPlay (bool val)
 
Ms::TietieFor () const
 
Ms::TietieBack () const
 
void setTieFor (Tie *t)
 
void setTieBack (Tie *t)
 
NotefirstTiedNote () const
 
const NotelastTiedNote () const
 
NotelastTiedNote ()
 
int unisonIndex () const
 
void disconnectTiedNotes ()
 
void connectTiedNotes ()
 
Chordchord () const
 
void setChord (Chord *a)
 
virtual void draw (QPainter *) const override
 
virtual void read (XmlReader &) override
 
virtual bool readProperties (XmlReader &) override
 
virtual void readAddConnector (ConnectorInfoReader *info, bool pasteMode) override
 
virtual void write (XmlWriter &) const override
 
bool acceptDrop (EditData &) const override
 Return true if this element accepts a drop at canvas relative pos of given element type and subtype. More...
 
Elementdrop (EditData &)
 Handle a dropped element at canvas relative pos of given element type and subtype. More...
 
bool hidden () const
 
void setHidden (bool val)
 
bool dotsHidden () const
 
void setDotsHidden (bool val)
 
NoteType noteType () const
 
QString noteTypeUserName () const
 
ElementListel ()
 
const ElementListel () const
 
int subchannel () const
 
void setSubchannel (int val)
 
MScore::DirectionH userMirror () const
 
void setUserMirror (MScore::DirectionH d)
 
Direction userDotPosition () const
 
void setUserDotPosition (Direction d)
 
bool dotIsUp () const
 
void reset ()
 
ValueType veloType () const
 
void setVeloType (ValueType v)
 
int veloOffset () const
 
void setVeloOffset (int v)
 
void setOnTimeOffset (int v)
 
void setOffTimeOffset (int v)
 
int customizeVelocity (int velo) const
 
NoteDotdot (int n)
 
const QVector< NoteDot * > & dots () const
 
QVector< NoteDot * > & dots ()
 
int qmlDotsCount ()
 
void updateAccidental (AccidentalState *)
 
void updateLine ()
 
void setNval (const NoteVal &, Fraction={ -1, 1})
 
NoteEventListplayEvents ()
 
const NoteEventListplayEvents () const
 
NoteEventnoteEvent (int idx)
 
void setPlayEvents (const NoteEventList &l)
 
const QVector< Spanner * > & spannerFor () const
 
const QVector< Spanner * > & spannerBack () const
 
void addSpannerBack (Spanner *e)
 
bool removeSpannerBack (Spanner *e)
 
void addSpannerFor (Spanner *e)
 
bool removeSpannerFor (Spanner *e)
 
void transposeDiatonic (int interval, bool keepAlterations, bool useDoubleAccidentals)
 
virtual void localSpatiumChanged (qreal oldValue, qreal newValue) override
 
virtual QVariant getProperty (Pid propertyId) const override
 
virtual bool setProperty (Pid propertyId, const QVariant &) override
 
void undoChangeDotsVisible (bool v)
 
virtual QVariant propertyDefault (Pid) const override
 
virtual QString propertyUserValue (Pid) const override
 
bool mark () const
 
void setMark (bool v) const
 
virtual void setScore (Score *s) override
 
void setDotY (Direction)
 
void addParentheses ()
 
NoteVal noteVal () const
 
ElementnextInEl (Element *e)
 
ElementprevInEl (Element *e)
 
virtual ElementnextElement () override
 
virtual ElementprevElement () override
 
virtual ElementlastElementBeforeSegment ()
 
virtual ElementnextSegmentElement () override
 
virtual ElementprevSegmentElement () override
 
virtual QString accessibleInfo () const override
 
virtual QString screenReaderInfo () const override
 
virtual QString accessibleExtraInfo () const override
 
virtual Shape shape () const override
 
std::vector< Note * > tiedNotes () const
 
void setOffTimeType (int v)
 
void setOnTimeType (int v)
 
int offTimeType () const
 
int onTimeType () const
 
- Public Member Functions inherited from Ms::Element
 Element (Score *=0, ElementFlags=ElementFlag::NOTHING)
 
 Element (const Element &)
 
virtual ~Element ()
 
Elementoperator= (const Element &)=delete
 
virtual ElementlinkedClone ()
 
Elementparent () const
 
void setParent (Element *e)
 
MeasurefindMeasure ()
 
const MeasurefindMeasure () const
 
MeasureBasefindMeasureBase ()
 
const MeasureBasefindMeasureBase () const
 
virtual bool isElement () const override
 
qreal spatium () const
 
void setFlag (ElementFlag f, bool v)
 
void setFlag (ElementFlag f, bool v) const
 
bool flag (ElementFlag f) const
 
bool selected () const
 
virtual void setSelected (bool f)
 
bool visible () const
 
virtual void setVisible (bool f)
 
virtual bool sizeIsSpatiumDependent () const override
 
void setSizeIsSpatiumDependent (bool v)
 
Placement placement () const
 
void setPlacement (Placement val)
 
bool placeAbove () const
 
bool placeBelow () const
 
bool generated () const
 
void setGenerated (bool val)
 
Spatium minDistance () const
 
void setMinDistance (Spatium v)
 
OffsetChange offsetChanged () const
 
void setOffsetChanged (bool v, bool absolute=true, const QPointF &diff=QPointF())
 
const QPointF & ipos () const
 
virtual const QPointF pos () const
 
virtual qreal x () const
 
virtual qreal y () const
 
void setPos (qreal x, qreal y)
 
void setPos (const QPointF &p)
 
QPointF & rpos ()
 
qreal & rxpos ()
 
qreal & rypos ()
 
virtual void move (const QPointF &s)
 
virtual QPointF pagePos () const
 position in page coordinates More...
 
virtual QPointF canvasPos () const
 position in canvas coordinates More...
 
qreal pageX () const
 
qreal canvasX () const
 
const QPointF & offset () const
 
virtual void setOffset (const QPointF &o)
 
void setOffset (qreal x, qreal y)
 
QPointF & roffset ()
 
qreal & rxoffset ()
 
qreal & ryoffset ()
 
virtual Fraction tick () const
 
virtual Fraction rtick () const
 
bool isNudged () const
 
virtual const QRectF & bbox () const
 
virtual QRectF & bbox ()
 
virtual qreal height () const
 
virtual void setHeight (qreal v)
 
virtual qreal width () const
 
virtual void setWidth (qreal v)
 
QRectF abbox () const
 
QRectF pageBoundingRect () const
 
QRectF canvasBoundingRect () const
 
virtual void setbbox (const QRectF &r) const
 
virtual void addbbox (const QRectF &r) const
 
bool contains (const QPointF &p) const
 
bool intersects (const QRectF &r) const
 
virtual qreal baseLine () const
 
void drawAt (QPainter *p, const QPointF &pt) const
 
virtual void writeProperties (XmlWriter &xml) const
 
virtual QLineF dragAnchor () const
 
virtual bool isEditable () const
 
virtual void startEdit (EditData &)
 
virtual bool edit (EditData &)
 
virtual void startEditDrag (EditData &)
 
virtual void endEditDrag (EditData &)
 
virtual void endEdit (EditData &)
 
virtual void editCut (EditData &)
 
virtual void editCopy (EditData &)
 
void updateGrips (EditData &) const
 
virtual bool nextGrip (EditData &) const
 
virtual bool prevGrip (EditData &) const
 
virtual QPointF gripAnchor (Grip) const
 
virtual EditBehavior normalModeEditBehavior () const
 
virtual int gripsCount () const
 
virtual Grip initialEditModeGrip () const
 
virtual Grip defaultGrip () const
 
virtual std::vector< QPointF > gripsPositions (const EditData &) const
 
int track () const
 
int z () const
 
void setZ (int val)
 
int staffIdx () const
 
virtual int vStaffIdx () const
 
int voice () const
 
void setVoice (int v)
 
Staffstaff () const
 
StaffTypestaffType () const
 
Partpart () const
 
virtual void change (Element *o, Element *n)
 
virtual void spatiumChanged (qreal, qreal)
 
virtual void dump () const
 
virtual Q_INVOKABLE QString _name () const
 
virtual QColor color () const
 
QColor curColor () const
 
QColor curColor (bool isVisible) const
 
QColor curColor (bool isVisible, QColor normalColor) const
 
virtual void setColor (const QColor &c)
 
void undoSetColor (const QColor &c)
 
void undoSetVisible (bool v)
 
virtual QByteArray mimeData (const QPointF &) const
 
virtual bool mousePress (EditData &)
 delivers mouseEvent to element in edit mode returns true if mouse event is accepted by element More...
 
void setMag (qreal val)
 
qreal magS () const
 
bool isPrintable () const
 
qreal point (const Spatium sp) const
 
bool systemFlag () const
 
void setSystemFlag (bool v) const
 
bool header () const
 
void setHeader (bool v)
 
bool trailer () const
 
void setTrailer (bool val)
 
bool selectable () const
 
void setSelectable (bool val)
 
bool dropTarget () const
 
void setDropTarget (bool v) const
 
bool composition () const
 
void setComposition (bool v) const
 
virtual bool isMovable () const
 
bool enabled () const
 
void setEnabled (bool val)
 
uint tag () const
 
void setTag (uint val)
 
bool autoplace () const
 
virtual void setAutoplace (bool v)
 
bool addToSkyline () const
 
virtual void undoChangeProperty (Pid id, const QVariant &, PropertyFlags ps) override
 
virtual Pid propertyId (const QStringRef &xmlName) const override
 
virtual ElementpropertyDelegate (Pid)
 
bool custom (Pid) const
 
virtual bool isUserModified () const
 
void drawSymbol (SymId id, QPainter *p, const QPointF &o=QPointF(), qreal scale=1.0) const
 
void drawSymbol (SymId id, QPainter *p, const QPointF &o, int n) const
 
void drawSymbols (const std::vector< SymId > &, QPainter *p, const QPointF &o=QPointF(), qreal scale=1.0) const
 
void drawSymbols (const std::vector< SymId > &, QPainter *p, const QPointF &o, const QSizeF &scale) const
 
qreal symHeight (SymId id) const
 
qreal symWidth (SymId id) const
 
qreal symWidth (const std::vector< SymId > &) const
 
QRectF symBbox (SymId id) const
 
QRectF symBbox (const std::vector< SymId > &) const
 
QPointF symStemDownNW (SymId id) const
 
QPointF symStemUpSE (SymId id) const
 
QPointF symCutOutNE (SymId id) const
 
QPointF symCutOutNW (SymId id) const
 
QPointF symCutOutSE (SymId id) const
 
QPointF symCutOutSW (SymId id) const
 
qreal symAdvance (SymId id) const
 
bool symIsValid (SymId id) const
 
bool concertPitch () const
 
virtual void triggerLayout () const
 
virtual void triggerLayoutAll () const
 
virtual void drawEditMode (QPainter *, EditData &)
 
void autoplaceSegmentElement (bool above, bool add)
 
void autoplaceMeasureElement (bool above, bool add)
 
void autoplaceSegmentElement (bool add=true)
 
void autoplaceMeasureElement (bool add=true)
 
void autoplaceCalculateOffset (QRectF &r, qreal minDistance)
 
qreal rebaseOffset (bool nox=true)
 
bool rebaseMinDistance (qreal &md, qreal &yd, qreal sp, qreal rebase, bool above, bool fix)
 
qreal styleP (Sid idx) const
 
- Public Member Functions inherited from Ms::ScoreElement
 ScoreElement (Score *s)
 
 ScoreElement (const ScoreElement &se)
 
virtual ~ScoreElement ()
 
Scorescore () const
 
MasterScoremasterScore () const
 
const char * name () const
 
virtual QString userName () const
 
virtual void resetProperty (Pid id)
 
QVariant propertyDefault (Pid pid, Tid tid) const
 
virtual void initElementStyle (const ElementStyle *)
 
virtual const ElementStylestyledProperties () const
 
virtual PropertyFlagspropertyFlagsList () const
 
virtual PropertyFlags propertyFlags (Pid) const
 
bool isStyled (Pid pid) const
 
QVariant styleValue (Pid, Sid) const
 
void setPropertyFlags (Pid, PropertyFlags)
 
virtual Sid getPropertyStyle (Pid) const
 
bool readProperty (const QStringRef &, XmlReader &, Pid)
 
void readProperty (XmlReader &, Pid)
 
bool readStyledProperty (XmlReader &e, const QStringRef &tag)
 
virtual void styleChanged ()
 
void undoChangeProperty (Pid id, const QVariant &)
 
void undoResetProperty (Pid id)
 
void undoPushProperty (Pid)
 
void writeProperty (XmlWriter &xml, Pid id) const
 
void writeStyledProperties (XmlWriter &) const
 
QList< ScoreElement * > linkList () const
 
void linkTo (ScoreElement *)
 
void unlink ()
 
bool isLinked (ScoreElement *)
 return true if se is different and linked to this element More...
 
int lid () const
 
LinkedElementslinks () const
 
void setLinks (LinkedElements *le)
 
bool isNote () const
 
bool isRest () const
 
bool isChord () const
 
bool isBarLine () const
 
bool isArticulation () const
 
bool isFermata () const
 
bool isMarker () const
 
bool isClef () const
 
bool isKeySig () const
 
bool isTimeSig () const
 
bool isMeasure () const
 
bool isTempoText () const
 
bool isBreath () const
 
bool isHBox () const
 
bool isVBox () const
 
bool isTBox () const
 
bool isFBox () const
 
bool isTie () const
 
bool isSlur () const
 
bool isGlissando () const
 
bool isGlissandoSegment () const
 
bool isSystemDivider () const
 
bool isRehearsalMark () const
 
bool isHarmony () const
 
bool isVolta () const
 
bool isJump () const
 
bool isOttava () const
 
bool isLayoutBreak () const
 
bool isSegment () const
 
bool isTremolo () const
 
bool isSystem () const
 
bool isLyrics () const
 
bool isStem () const
 
bool isBeam () const
 
bool isHook () const
 
bool isStemSlash () const
 
bool isSlurSegment () const
 
bool isTieSegment () const
 
bool isSpacer () const
 
bool isStaffLines () const
 
bool isAmbitus () const
 
bool isBracket () const
 
bool isInstrumentChange () const
 
bool isStaffTypeChange () const
 
bool isHairpin () const
 
bool isHairpinSegment () const
 
bool isBend () const
 
bool isTremoloBar () const
 
bool isRepeatMeasure () const
 
bool isTuplet () const
 
bool isNoteDot () const
 
bool isDynamic () const
 
bool isInstrumentName () const
 
bool isAccidental () const
 
bool isTextLine () const
 
bool isTextLineSegment () const
 
bool isPedal () const
 
bool isPedalSegment () const
 
bool isOttavaSegment () const
 
bool isLedgerLine () const
 
bool isIcon () const
 
bool isVoltaSegment () const
 
bool isNoteLine () const
 
bool isTrill () const
 
bool isTrillSegment () const
 
bool isLetRing () const
 
bool isLetRingSegment () const
 
bool isVibrato () const
 
bool isPalmMute () const
 
bool isPalmMuteSegment () const
 
bool isVibratoSegment () const
 
bool isSymbol () const
 
bool isFSymbol () const
 
bool isFingering () const
 
bool isNoteHead () const
 
bool isLyricsLine () const
 
bool isLyricsLineSegment () const
 
bool isFiguredBass () const
 
bool isStaffState () const
 
bool isArpeggio () const
 
bool isImage () const
 
bool isChordLine () const
 
bool isFretDiagram () const
 
bool isPage () const
 
bool isText () const
 
bool isMeasureNumber () const
 
bool isStaffText () const
 
bool isSystemText () const
 
bool isBracketItem () const
 
bool isScore () const
 
bool isStaff () const
 
bool isPart () const
 
bool isBagpipeEmbellishment () const
 
bool isLasso () const
 
bool isSticking () const
 
bool isChordRest () const
 
bool isDurationElement () const
 
bool isSlurTieSegment () const
 
bool isSLineSegment () const
 
bool isBox () const
 
bool isVBoxBase () const
 
bool isMeasureBase () const
 
bool isTextBase () const
 
bool isTextLineBaseSegment () const
 
bool isLineSegment () const
 
bool isSpannerSegment () const
 
bool isBSymbol () const
 
bool isTextLineBase () const
 
bool isSLine () const
 
bool isSpanner () const
 
bool isStaffTextBase () const
 

Static Public Member Functions

static SymId noteHead (int direction, NoteHead::Group, NoteHead::Type, int tpc, Key key, NoteHeadScheme scheme)
 
static SymId noteHead (int direction, NoteHead::Group, NoteHead::Type)
 
- Static Public Member Functions inherited from Ms::Element
static ElementType readType (XmlReader &node, QPointF *, Fraction *)
 
static ElementreadMimeData (Score *score, const QByteArray &data, QPointF *, Fraction *)
 
static Ms::Elementcreate (Ms::ElementType type, Score *)
 
static Elementname2Element (const QStringRef &, Score *)
 
- Static Public Member Functions inherited from Ms::ScoreElement
static ElementType name2type (const QStringRef &, bool silent=false)
 
static ElementType name2type (const QString &s)
 
static const char * name (ElementType)
 

Private Member Functions

void startDrag (EditData &) override
 
QRectF drag (EditData &ed) override
 Return update Rect relative to canvas. More...
 
void endDrag (EditData &) override
 
void editDrag (EditData &editData) override
 
void verticalDrag (EditData &ed)
 
void horizontalDrag (EditData &ed)
 
void addSpanner (Spanner *)
 
void removeSpanner (Spanner *)
 
int concertPitchIdx () const
 
void updateRelLine (int relLine, bool undoable)
 
bool isNoteName () const
 
SymId noteHead () const
 
void normalizeLeftDragDelta (Segment *seg, EditData &ed, NoteEditData *ned)
 

Private Attributes

bool _ghost { false }
 ghost note (guitar: death note) More...
 
bool _hidden { false }
 marks this note as the hidden one if there are overlapping notes; hidden notes are not played and heads + accidentals are not shown More...
 
bool _dotsHidden { false }
 dots of hidden notes are hidden too except if only one note is dotted More...
 
bool _fretConflict { false }
 used by TAB staves to mark a fretting conflict: two or more notes on the same string More...
 
bool dragMode { false }
 
bool _mirror { false }
 True if note is mirrored at stem. More...
 
bool _small { false }
 
bool _play { true }
 
bool _mark { false }
 
bool _fixed { false }
 
MScore::DirectionH _userMirror { MScore::DirectionH::AUTO }
 user override of mirror More...
 
Direction _userDotPosition { Direction::AUTO }
 user override of dot position More...
 
NoteHead::Group _headGroup { NoteHead::Group::HEAD_NORMAL }
 
NoteHead::Type _headType { NoteHead::Type::HEAD_AUTO }
 
ValueType _veloType { ValueType::OFFSET_VAL }
 
char _offTimeType { 0 }
 
char _onTimeType { 0 }
 
int _subchannel { 0 }
 articulation More...
 
int _line { INVALID_LINE }
 y-Position; 0 - top line. More...
 
int _fret { -1 }
 for tablature view More...
 
int _string { -1 }
 
int _tpc [2] { Tpc::TPC_INVALID, Tpc::TPC_INVALID }
 tonal pitch class (concert/transposing) More...
 
int _pitch { 0 }
 Note pitch as midi value (0 - 127). More...
 
int _veloOffset { 0 }
 velocity user offset in percent, or absolute velocity for this note More...
 
int _fixedLine { 0 }
 
qreal _tuning { 0.0 }
 pitch offset in cent, playable only by internal synthesizer More...
 
Accidental_accidental { 0 }
 
Tie_tieFor { 0 }
 
Tie_tieBack { 0 }
 
ElementList _el
 fingering, other text, symbols or images More...
 
QVector< NoteDot * > _dots
 
NoteEventList _playEvents
 
QVector< Spanner * > _spannerFor
 
QVector< Spanner * > _spannerBack
 
SymId _cachedNoteheadSym
 
SymId _cachedSymNull
 
QString _fretString
 

Additional Inherited Members

- Public Attributes inherited from Ms::Element
bool itemDiscovered { false }
 helper flag for bsp More...
 
- Protected Member Functions inherited from Ms::ScoreElement
virtual int getPropertyFlagsIdx (Pid id) const
 
- Protected Attributes inherited from Ms::Element
int _z
 
QColor _color
 element color attribute More...
 
- Protected Attributes inherited from Ms::ScoreElement
const ElementStyle_elementStyle { &emptyStyle }
 
PropertyFlags_propertyFlagsList { 0 }
 
LinkedElements_links { 0 }
 

Detailed Description

Graphic representation of a note.

Member Enumeration Documentation

◆ ValueType

enum Ms::Note::ValueType : char
strong
Enumerator
OFFSET_VAL 
USER_VAL 

Constructor & Destructor Documentation

◆ Note() [1/2]

Ms::Note::Note ( Score s = 0)

◆ Note() [2/2]

Ms::Note::Note ( const Note n,
bool  link = false 
)

◆ ~Note()

Ms::Note::~Note ( )

Member Function Documentation

◆ acceptDrop()

bool Ms::Note::acceptDrop ( EditData ) const
overridevirtual

Return true if this element accepts a drop at canvas relative pos of given element type and subtype.

Reimplemented by elements that accept drops. Used to change cursor shape while dragging to indicate drop targets.

Reimplemented from Ms::Element.

◆ accessibleExtraInfo()

QString Ms::Note::accessibleExtraInfo ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ accessibleInfo()

QString Ms::Note::accessibleInfo ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ accidental()

Accidental* Ms::Note::accidental ( ) const
inline

◆ accidentalType()

AccidentalType Ms::Note::accidentalType ( ) const

◆ add()

void Ms::Note::add ( Element e)
overridevirtual

Reimplemented from Ms::Element.

◆ addParentheses()

void Ms::Note::addParentheses ( )

◆ addSpanner()

void Ms::Note::addSpanner ( Spanner l)
private

◆ addSpannerBack()

void Ms::Note::addSpannerBack ( Spanner e)
inline

◆ addSpannerFor()

void Ms::Note::addSpannerFor ( Spanner e)
inline

◆ bboxRightPos()

qreal Ms::Note::bboxRightPos ( ) const

◆ bboxXShift()

qreal Ms::Note::bboxXShift ( ) const

◆ chord()

Chord* Ms::Note::chord ( ) const
inline

◆ clone()

virtual Note* Ms::Note::clone ( ) const
inlineoverridevirtual

Implements Ms::Element.

◆ concertPitchIdx()

int Ms::Note::concertPitchIdx ( ) const
inlineprivate

◆ connectTiedNotes()

void Ms::Note::connectTiedNotes ( )

◆ customizeVelocity()

int Ms::Note::customizeVelocity ( int  velo) const

◆ disconnectTiedNotes()

void Ms::Note::disconnectTiedNotes ( )

◆ dot()

NoteDot* Ms::Note::dot ( int  n)
inline

◆ dotIsUp()

bool Ms::Note::dotIsUp ( ) const

◆ dots() [1/2]

const QVector<NoteDot*>& Ms::Note::dots ( ) const
inline

◆ dots() [2/2]

QVector<NoteDot*>& Ms::Note::dots ( )
inline

◆ dotsHidden()

bool Ms::Note::dotsHidden ( ) const
inline

◆ drag()

QRectF Ms::Note::drag ( EditData ed)
overrideprivatevirtual

Return update Rect relative to canvas.

Reimplemented from Ms::Element.

◆ draw()

void Ms::Note::draw ( QPainter *  painter) const
overridevirtual

Reimplemented from Ms::Element.

◆ drop()

Element * Ms::Note::drop ( EditData )
virtual

Handle a dropped element at canvas relative pos of given element type and subtype.

Returns dropped element if any. The ownership of element in DropData is transferred to the called element (if not used, element has to be deleted). The returned element will be selected if not in note edit mode.

Reimplemented by elements that accept drops.

Reimplemented from Ms::Element.

◆ editDrag()

void Ms::Note::editDrag ( EditData editData)
overrideprivatevirtual

Reimplemented from Ms::Element.

◆ el() [1/2]

ElementList& Ms::Note::el ( )
inline

◆ el() [2/2]

const ElementList& Ms::Note::el ( ) const
inline

◆ endDrag()

void Ms::Note::endDrag ( EditData ed)
overrideprivatevirtual

Reimplemented from Ms::Element.

◆ epitch()

int Ms::Note::epitch ( ) const

effective pitch

◆ firstTiedNote()

Note * Ms::Note::firstTiedNote ( ) const

◆ fixed()

bool Ms::Note::fixed ( ) const
inline

◆ fixedLine()

int Ms::Note::fixedLine ( ) const
inline

◆ fret()

int Ms::Note::fret ( ) const
inline

◆ fretConflict()

bool Ms::Note::fretConflict ( ) const
inline

◆ getProperty()

QVariant Ms::Note::getProperty ( Pid  propertyId) const
overridevirtual

Reimplemented from Ms::Element.

◆ ghost()

bool Ms::Note::ghost ( ) const
inline

◆ headBodyWidth()

qreal Ms::Note::headBodyWidth ( ) const

◆ headGroup()

NoteHead::Group Ms::Note::headGroup ( ) const
inline

◆ headHeight()

qreal Ms::Note::headHeight ( ) const

◆ headType()

NoteHead::Type Ms::Note::headType ( ) const
inline

◆ headWidth()

qreal Ms::Note::headWidth ( ) const

◆ hidden()

bool Ms::Note::hidden ( ) const
inline

◆ horizontalDrag()

void Ms::Note::horizontalDrag ( EditData ed)
private

◆ isNoteName()

bool Ms::Note::isNoteName ( ) const
private

◆ lastElementBeforeSegment()

Element * Ms::Note::lastElementBeforeSegment ( )
virtual

◆ lastTiedNote() [1/2]

const Note * Ms::Note::lastTiedNote ( ) const

◆ lastTiedNote() [2/2]

Note* Ms::Note::lastTiedNote ( )
inline

◆ layout()

void Ms::Note::layout ( )
virtual

Reimplemented from Ms::Element.

◆ layout2()

void Ms::Note::layout2 ( )

◆ line()

int Ms::Note::line ( ) const

◆ localSpatiumChanged()

void Ms::Note::localSpatiumChanged ( qreal  oldValue,
qreal  newValue 
)
overridevirtual

Reimplemented from Ms::Element.

◆ mag()

qreal Ms::Note::mag ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ mark()

bool Ms::Note::mark ( ) const
inline

◆ mirror()

bool Ms::Note::mirror ( ) const
inline

◆ nextElement()

Element * Ms::Note::nextElement ( )
overridevirtual

Reimplemented from Ms::Element.

◆ nextInEl()

Element * Ms::Note::nextInEl ( Element e)

◆ nextSegmentElement()

Element * Ms::Note::nextSegmentElement ( )
overridevirtual

Reimplemented from Ms::Element.

◆ normalizeLeftDragDelta()

void Ms::Note::normalizeLeftDragDelta ( Segment seg,
EditData ed,
NoteEditData ned 
)
private

◆ noteEvent()

NoteEvent* Ms::Note::noteEvent ( int  idx)
inline

◆ noteHead() [1/3]

SymId Ms::Note::noteHead ( ) const
private

◆ noteHead() [2/3]

SymId Ms::Note::noteHead ( int  direction,
NoteHead::Group  group,
NoteHead::Type  t,
int  tpc,
Key  key,
NoteHeadScheme  scheme 
)
static

◆ noteHead() [3/3]

SymId Ms::Note::noteHead ( int  direction,
NoteHead::Group  group,
NoteHead::Type  t 
)
static

◆ noteheadCenterX()

qreal Ms::Note::noteheadCenterX ( ) const

◆ noteType()

NoteType Ms::Note::noteType ( ) const

◆ noteTypeUserName()

QString Ms::Note::noteTypeUserName ( ) const

◆ noteVal()

NoteVal Ms::Note::noteVal ( ) const

◆ offTimeType()

int Ms::Note::offTimeType ( ) const
inline

◆ onTimeType()

int Ms::Note::onTimeType ( ) const
inline

◆ operator=()

Note& Ms::Note::operator= ( const Note )
delete

◆ physicalLine()

int Ms::Note::physicalLine ( ) const

◆ pitch()

int Ms::Note::pitch ( ) const
inline

◆ play()

bool Ms::Note::play ( void  ) const
inline

◆ playEvents() [1/2]

NoteEventList& Ms::Note::playEvents ( )
inline

◆ playEvents() [2/2]

const NoteEventList& Ms::Note::playEvents ( ) const
inline

◆ playTicks()

int Ms::Note::playTicks ( ) const

Return total tick len of tied notes.

◆ ppitch()

int Ms::Note::ppitch ( ) const

playback pitch

◆ prevElement()

Element * Ms::Note::prevElement ( )
overridevirtual

Reimplemented from Ms::Element.

◆ prevInEl()

Element * Ms::Note::prevInEl ( Element e)

◆ prevSegmentElement()

Element * Ms::Note::prevSegmentElement ( )
overridevirtual

Reimplemented from Ms::Element.

◆ propertyDefault()

QVariant Ms::Note::propertyDefault ( Pid  propertyId) const
overridevirtual

Reimplemented from Ms::Element.

◆ propertyUserValue()

QString Ms::Note::propertyUserValue ( Pid  pid) const
overridevirtual

Reimplemented from Ms::Element.

◆ qmlDotsCount()

int Ms::Note::qmlDotsCount ( )

◆ read()

void Ms::Note::read ( XmlReader e)
overridevirtual

Reimplemented from Ms::Element.

◆ readAddConnector()

void Ms::Note::readAddConnector ( ConnectorInfoReader info,
bool  pasteMode 
)
overridevirtual

Reimplemented from Ms::ScoreElement.

◆ readProperties()

bool Ms::Note::readProperties ( XmlReader e)
overridevirtual

Reimplemented from Ms::Element.

◆ remove()

void Ms::Note::remove ( Element e)
overridevirtual

Reimplemented from Ms::Element.

◆ removeSpanner()

void Ms::Note::removeSpanner ( Spanner l)
private

◆ removeSpannerBack()

bool Ms::Note::removeSpannerBack ( Spanner e)
inline

◆ removeSpannerFor()

bool Ms::Note::removeSpannerFor ( Spanner e)
inline

◆ reset()

void Ms::Note::reset ( )
virtual

Reimplemented from Ms::Element.

◆ scanElements()

void Ms::Note::scanElements ( void *  data,
void(*)(void *, Element *)  func,
bool  all = true 
)
virtual

Reimplemented from Ms::Element.

◆ screenReaderInfo()

QString Ms::Note::screenReaderInfo ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ setAccidental()

void Ms::Note::setAccidental ( Accidental a)
inline

◆ setAccidentalType()

void Ms::Note::setAccidentalType ( AccidentalType  type)

◆ setCachedNoteheadSym()

void Ms::Note::setCachedNoteheadSym ( SymId  i)
inline

◆ setChord()

void Ms::Note::setChord ( Chord a)
inline

◆ setDotsHidden()

void Ms::Note::setDotsHidden ( bool  val)
inline

◆ setDotY()

void Ms::Note::setDotY ( Direction  pos)

◆ setFixed()

void Ms::Note::setFixed ( bool  v)
inline

◆ setFixedLine()

void Ms::Note::setFixedLine ( int  v)
inline

◆ setFret()

void Ms::Note::setFret ( int  val)
inline

◆ setFretConflict()

void Ms::Note::setFretConflict ( bool  val)
inline

◆ setGhost()

void Ms::Note::setGhost ( bool  val)
inline

◆ setHeadGroup()

void Ms::Note::setHeadGroup ( NoteHead::Group  val)

◆ setHeadType()

void Ms::Note::setHeadType ( NoteHead::Type  t)

◆ setHidden()

void Ms::Note::setHidden ( bool  val)
inline

◆ setLine()

void Ms::Note::setLine ( int  n)
inline

◆ setMark()

void Ms::Note::setMark ( bool  v) const
inline

◆ setMirror()

void Ms::Note::setMirror ( bool  val)
inline

◆ setNval()

void Ms::Note::setNval ( const NoteVal nval,
Fraction  tick = { -1, 1} 
)

◆ setOffTimeOffset()

void Ms::Note::setOffTimeOffset ( int  v)

◆ setOffTimeType()

void Ms::Note::setOffTimeType ( int  v)
inline

◆ setOnTimeOffset()

void Ms::Note::setOnTimeOffset ( int  v)

◆ setOnTimeType()

void Ms::Note::setOnTimeType ( int  v)
inline

◆ setPitch() [1/2]

void Ms::Note::setPitch ( int  val)

◆ setPitch() [2/2]

void Ms::Note::setPitch ( int  pitch,
int  tpc1,
int  tpc2 
)

◆ setPlay()

void Ms::Note::setPlay ( bool  val)
inline

◆ setPlayEvents()

void Ms::Note::setPlayEvents ( const NoteEventList l)
inline

◆ setProperty()

bool Ms::Note::setProperty ( Pid  propertyId,
const QVariant &  v 
)
overridevirtual

Reimplemented from Ms::Element.

◆ setScore()

void Ms::Note::setScore ( Score s)
overridevirtual

Reimplemented from Ms::ScoreElement.

◆ setSmall()

void Ms::Note::setSmall ( bool  val)

◆ setString()

void Ms::Note::setString ( int  val)

◆ setSubchannel()

void Ms::Note::setSubchannel ( int  val)
inline

◆ setTieBack()

void Ms::Note::setTieBack ( Tie t)
inline

◆ setTieFor()

void Ms::Note::setTieFor ( Tie t)
inline

◆ setTpc()

void Ms::Note::setTpc ( int  v)

◆ setTpc1()

void Ms::Note::setTpc1 ( int  v)
inline

◆ setTpc2()

void Ms::Note::setTpc2 ( int  v)
inline

◆ setTpcFromPitch()

void Ms::Note::setTpcFromPitch ( )

◆ setTrack()

void Ms::Note::setTrack ( int  val)
virtual

Reimplemented from Ms::Element.

◆ setTuning()

void Ms::Note::setTuning ( qreal  v)
inline

◆ setUserDotPosition()

void Ms::Note::setUserDotPosition ( Direction  d)
inline

◆ setUserMirror()

void Ms::Note::setUserMirror ( MScore::DirectionH  d)
inline

◆ setVeloOffset()

void Ms::Note::setVeloOffset ( int  v)
inline

◆ setVeloType()

void Ms::Note::setVeloType ( ValueType  v)
inline

◆ shape()

Shape Ms::Note::shape ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ small()

bool Ms::Note::small ( ) const
inline

◆ spannerBack()

const QVector<Spanner*>& Ms::Note::spannerBack ( ) const
inline

◆ spannerFor()

const QVector<Spanner*>& Ms::Note::spannerFor ( ) const
inline

◆ startDrag()

void Ms::Note::startDrag ( EditData ed)
overrideprivatevirtual

Reimplemented from Ms::Element.

◆ stemDownNW()

QPointF Ms::Note::stemDownNW ( ) const

◆ stemUpSE()

QPointF Ms::Note::stemUpSE ( ) const

◆ string()

int Ms::Note::string ( ) const
inline

◆ subchannel()

int Ms::Note::subchannel ( ) const
inline

◆ subtype()

virtual int Ms::Note::subtype ( ) const
inlineoverridevirtual

Reimplemented from Ms::Element.

◆ subtypeName()

QString Ms::Note::subtypeName ( ) const
overridevirtual

Reimplemented from Ms::Element.

◆ tabHeadHeight()

qreal Ms::Note::tabHeadHeight ( const StaffType tab = 0) const

◆ tabHeadWidth()

qreal Ms::Note::tabHeadWidth ( const StaffType tab = 0) const

◆ tieBack()

Ms::Tie* Ms::Note::tieBack ( ) const
inline

◆ tiedNotes()

std::vector< Note * > Ms::Note::tiedNotes ( ) const

◆ tieFor()

Ms::Tie* Ms::Note::tieFor ( ) const
inline

◆ tpc()

int Ms::Note::tpc ( ) const

◆ tpc1()

int Ms::Note::tpc1 ( ) const
inline

◆ tpc1default()

int Ms::Note::tpc1default ( int  pitch) const

◆ tpc2()

int Ms::Note::tpc2 ( ) const
inline

◆ tpc2default()

int Ms::Note::tpc2default ( int  pitch) const

◆ tpcUserName()

QString Ms::Note::tpcUserName ( bool  explicitAccidental = false) const

◆ transposeDiatonic()

void Ms::Note::transposeDiatonic ( int  interval,
bool  keepAlterations,
bool  useDoubleAccidentals 
)

◆ transposeTpc()

int Ms::Note::transposeTpc ( int  tpc)

◆ transposition()

int Ms::Note::transposition ( ) const

◆ tuning()

qreal Ms::Note::tuning ( ) const
inline

◆ type()

ElementType Ms::Note::type ( ) const
inlineoverridevirtual

Implements Ms::ScoreElement.

◆ undoChangeDotsVisible()

void Ms::Note::undoChangeDotsVisible ( bool  v)

◆ undoSetTpc()

void Ms::Note::undoSetTpc ( int  v)

◆ undoUnlink()

void Ms::Note::undoUnlink ( )
overridevirtual

Reimplemented from Ms::ScoreElement.

◆ unisonIndex()

int Ms::Note::unisonIndex ( ) const

◆ updateAccidental()

void Ms::Note::updateAccidental ( AccidentalState as)

◆ updateLine()

void Ms::Note::updateLine ( )

◆ updateRelLine()

void Ms::Note::updateRelLine ( int  relLine,
bool  undoable 
)
private

◆ userDotPosition()

Direction Ms::Note::userDotPosition ( ) const
inline

◆ userMirror()

MScore::DirectionH Ms::Note::userMirror ( ) const
inline

◆ veloOffset()

int Ms::Note::veloOffset ( ) const
inline

◆ veloType()

ValueType Ms::Note::veloType ( ) const
inline

◆ verticalDrag()

void Ms::Note::verticalDrag ( EditData ed)
private

◆ write()

void Ms::Note::write ( XmlWriter xml) const
overridevirtual

Reimplemented from Ms::Element.

Member Data Documentation

◆ _accidental

Accidental* Ms::Note::_accidental { 0 }
private

◆ _cachedNoteheadSym

SymId Ms::Note::_cachedNoteheadSym
private

◆ _cachedSymNull

SymId Ms::Note::_cachedSymNull
private

◆ _dots

QVector<NoteDot*> Ms::Note::_dots
private

◆ _dotsHidden

bool Ms::Note::_dotsHidden { false }
private

dots of hidden notes are hidden too except if only one note is dotted

◆ _el

ElementList Ms::Note::_el
private

fingering, other text, symbols or images

◆ _fixed

bool Ms::Note::_fixed { false }
private

◆ _fixedLine

int Ms::Note::_fixedLine { 0 }
private

◆ _fret

int Ms::Note::_fret { -1 }
private

for tablature view

◆ _fretConflict

bool Ms::Note::_fretConflict { false }
private

used by TAB staves to mark a fretting conflict: two or more notes on the same string

◆ _fretString

QString Ms::Note::_fretString
private

◆ _ghost

bool Ms::Note::_ghost { false }
private

ghost note (guitar: death note)

◆ _headGroup

NoteHead::Group Ms::Note::_headGroup { NoteHead::Group::HEAD_NORMAL }
private

◆ _headType

NoteHead::Type Ms::Note::_headType { NoteHead::Type::HEAD_AUTO }
private

◆ _hidden

bool Ms::Note::_hidden { false }
private

marks this note as the hidden one if there are overlapping notes; hidden notes are not played and heads + accidentals are not shown

◆ _line

int Ms::Note::_line { INVALID_LINE }
private

y-Position; 0 - top line.

◆ _mark

bool Ms::Note::_mark { false }
mutableprivate

◆ _mirror

bool Ms::Note::_mirror { false }
private

True if note is mirrored at stem.

◆ _offTimeType

char Ms::Note::_offTimeType { 0 }
private

◆ _onTimeType

char Ms::Note::_onTimeType { 0 }
private

◆ _pitch

int Ms::Note::_pitch { 0 }
mutableprivate

Note pitch as midi value (0 - 127).

◆ _play

bool Ms::Note::_play { true }
private

◆ _playEvents

NoteEventList Ms::Note::_playEvents
private

◆ _small

bool Ms::Note::_small { false }
private

◆ _spannerBack

QVector<Spanner*> Ms::Note::_spannerBack
private

◆ _spannerFor

QVector<Spanner*> Ms::Note::_spannerFor
private

◆ _string

int Ms::Note::_string { -1 }
private

◆ _subchannel

int Ms::Note::_subchannel { 0 }
private

articulation

◆ _tieBack

Tie* Ms::Note::_tieBack { 0 }
private

◆ _tieFor

Tie* Ms::Note::_tieFor { 0 }
private

◆ _tpc

int Ms::Note::_tpc[2] { Tpc::TPC_INVALID, Tpc::TPC_INVALID }
mutableprivate

tonal pitch class (concert/transposing)

◆ _tuning

qreal Ms::Note::_tuning { 0.0 }
private

pitch offset in cent, playable only by internal synthesizer

◆ _userDotPosition

Direction Ms::Note::_userDotPosition { Direction::AUTO }
private

user override of dot position

◆ _userMirror

MScore::DirectionH Ms::Note::_userMirror { MScore::DirectionH::AUTO }
private

user override of mirror

◆ _veloOffset

int Ms::Note::_veloOffset { 0 }
private

velocity user offset in percent, or absolute velocity for this note

◆ _veloType

ValueType Ms::Note::_veloType { ValueType::OFFSET_VAL }
private

◆ dragMode

bool Ms::Note::dragMode { false }
private

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