LibMusicXML  3.18
msrNotes_MUT_DEP.h
1 /*
2  This file is to be included only by msrMutualDependencies.h,
3  to satisfy declarations mutual dependencies.
4 */
5 
6 //______________________________________________________________________________
7 class msrNote : public msrTupletElement
8 {
9  public:
10 
11  // constants
12  // ------------------------------------------------------
13 
14  #define K_NO_OCTAVE -1
15 
16  // data types
17  // ------------------------------------------------------
18 
19  enum msrNoteKind {
20  k_NoNoteKind,
21  kRestNote, kSkipNote,
22  kUnpitchedNote,
23  kStandaloneNote,
24  kDoubleTremoloMemberNote,
25  kGraceNote,
26  kChordMemberNote,
27  kGraceChordMemberNote,
28  kTupletMemberNote,
29  kGraceTupletMemberNote,
30  kTupletMemberUnpitchedNote };
31 
32  static string noteKindAsString (
33  msrNoteKind noteKind);
34 
35  enum msrNoteAccidentalKind {
36  kNoteAccidentalNone,
37 
38  kNoteAccidentalSharp, kNoteAccidentalNatural,
39  kNoteAccidentalFlat, kNoteAccidentalDoubleSharp,
40  kNoteAccidentalSharpSharp,
41  kNoteAccidentalFlatFlat, kNoteAccidentalNaturalSharp,
42  kNoteAccidentalNaturalFlat, kNoteAccidentalQuarterFlat,
43  kNoteAccidentalQuarterSharp,kNoteAccidentalThreeQuartersFlat,
44  kNoteAccidentalThreeQuartersSharp,
45 
46  kNoteAccidentalSharpDown, kNoteAccidentalSharpUp,
47  kNoteAccidentalNaturalDown, kNoteAccidentalNaturalUp,
48  kNoteAccidentalFlatDown, kNoteAccidentalFlatUp,
49  kNoteAccidentalTripleSharp, kNoteAccidentalTripleFlat,
50  kNoteAccidentalSlashQuarterSharp, kNoteAccidentalSlashSharp,
51  kNoteAccidentalSlashFlat,kNoteAccidentaldoubleSlashFlat,
52  kNoteAccidentalSharp_1, kNoteAccidentalSharp_2,
53  kNoteAccidentalSharp_3, kNoteAccidentalSharp_5,
54  kNoteAccidentalFlat_1, kNoteAccidentalFlat_2,
55  kNoteAccidentalFlat_3, kNoteAccidentalFlat_4,
56  kNoteAccidentalSori, kNoteAccidentalKoron };
57 
58  static string noteAccidentalKindAsString (
59  msrNoteAccidentalKind noteAccidentalKind);
60 
61  enum msrNoteEditorialAccidentalKind {
62  kNoteEditorialAccidentalYes, kNoteEditorialAccidentalNo };
63 
64  static string noteEditorialAccidentalKindAsString (
65  msrNoteEditorialAccidentalKind noteEditorialAccidentalKind);
66 
67  enum msrNoteCautionaryAccidentalKind {
68  kNoteCautionaryAccidentalYes, kNoteCautionaryAccidentalNo };
69 
70  static string noteCautionaryAccidentalKindAsString (
71  msrNoteCautionaryAccidentalKind noteCautionaryAccidentalKind);
72 
73  enum msrNoteHeadKind {
74  kNoteHeadSlash,
75  kNoteHeadTriangle, kNoteHeadDiamond, kNoteHeadSquare,
76  kNoteHeadCross,kNoteHeadX,
77  kNoteHeadCircleX, kNoteHeadInvertedTriangle,
78  kNoteHeadArrowDown, kNoteHeadArrowUp,
79  kNoteHeadSlashed, kNoteHeadBackSlashed,
80  kNoteHeadNormal, kNoteHeadCluster,
81  kNoteHeadCircleDot,
82  kNoteHeadLeftTriangle,
83  kNoteHeadRectangle,
84  kNoteHeadNone,
85  kNoteHeadDo, kNoteHeadRe, kNoteHeadMi, kNoteHeadFa, kNoteHeadFaUp,
86  kNoteHeadSo, kNoteHeadLa, kNoteHeadTi };
87 
88  static string noteHeadKindAsString (
89  msrNoteHeadKind noteHeadKind);
90 
91  enum msrNoteHeadFilledKind {
92  kNoteHeadFilledYes, kNoteHeadFilledNo };
93 
94  static string noteHeadFilledKindAsString (
95  msrNoteHeadFilledKind noteHeadFilledKind);
96 
97  enum msrNoteHeadParenthesesKind {
98  kNoteHeadParenthesesYes, kNoteHeadParenthesesNo };
99 
100  static string noteHeadParenthesesKindAsString (
101  msrNoteHeadParenthesesKind noteHeadParenthesesKind);
102 
103  // creation from MusicXML
104  // ------------------------------------------------------
105 
106  static SMARTP<msrNote> create (
107  int inputLineNumber,
108  string noteMeasureNumber,
109 
110  msrNoteKind noteKind,
111 
112  msrQuarterTonesPitchKind noteQuarterTonesPitchKind,
113 
114  rational noteSoundingWholeNotes,
115  rational noteDisplayWholeNotes,
116 
117  int noteDotsNumber,
118 
119  msrDurationKind noteGraphicDurationKind,
120 
121  int noteOctave,
122 
123  msrQuarterTonesPitchKind noteQuarterTonesDisplayPitchKind,
124  int noteDisplayOctave,
125 
126  bool noteIsARest,
127  bool noteIsUnpitched,
128 
129  bool noteIsACueNote,
130  bool noteIsAGraceNote,
131 
132  msrPrintObjectKind notePrintObjectKind,
133 
134  msrNoteHeadKind noteHeadKind,
135  msrNoteHeadFilledKind noteHeadFilledKind,
136  msrNoteHeadParenthesesKind noteHeadParenthesesKind);
137 
138  SMARTP<msrNote> createNoteNewbornClone (
139  S_msrPart containingPart);
140 
141  SMARTP<msrNote> createNoteDeepCopy (
142  S_msrVoice containingVoice);
143 
144  // creation from xml2Msr
145  // ------------------------------------------------------
146 
147  static SMARTP<msrNote> createRestNote (
148  int inputLineNumber,
149  string noteMeasureNumber,
150  rational soundingWholeNotes,
151  rational displayWholeNotes,
152  int dotsNumber,
153  int staffNumber,
154  int voiceNumber);
155 
156  static SMARTP<msrNote> createSkipNote (
157  int inputLineNumber,
158  string noteMeasureNumber,
159  rational soundingWholeNotes,
160  rational displayWholeNotes,
161  int dotsNumber,
162  int staffNumber,
163  int voiceNumber);
164 
165  // creation from the options
166  // ------------------------------------------------------
167 
168  static SMARTP<msrNote> createNoteFromSemiTonesPitchAndOctave (
169  int inputLineNumber,
170  S_msrSemiTonesPitchAndOctave semiTonesPitchAndOctave);
171 
172  protected:
173 
174  // constructors/destructor
175  // ------------------------------------------------------
176 
177  msrNote (
178  int inputLineNumber,
179  string noteMeasureNumber,
180 
181  msrNoteKind noteKind,
182 
183  msrQuarterTonesPitchKind noteQuarterTonesPitchKind,
184 
185  rational noteSoundingWholeNotes,
186  rational noteDisplayWholeNotes,
187 
188  int noteDotsNumber,
189 
190  msrDurationKind noteGraphicDurationKind,
191 
192  int noteOctave,
193 
194  msrQuarterTonesPitchKind noteQuarterTonesDisplayPitchKind,
195  int noteDisplayOctave,
196 
197  bool noteIsARest,
198  bool noteIsUnpitched,
199 
200  bool noteIsACueNote,
201  bool noteIsAGraceNote,
202 
203  msrPrintObjectKind notePrintObjectKind,
204 
205  msrNoteHeadKind noteHeadKind,
206  msrNoteHeadFilledKind noteHeadFilledKind,
207  msrNoteHeadParenthesesKind noteHeadParenthesesKind);
208 
209  virtual ~msrNote ();
210 
211  private:
212 
213  // initialisation
214  // ------------------------------------------------------
215 
216  void initializeNote ();
217 
218  public:
219 
220  // set and get
221  // ------------------------------------------------------
222 
223  // measure upLink
224  void setNoteMeasureUpLink (
225  const S_msrMeasure& measure)
226  { fNoteMeasureUpLink = measure; }
227 
228  S_msrMeasure getNoteMeasureUpLink () const
229  { return fNoteMeasureUpLink; }
230 
231  // chord upLink
232  void setNoteChordUpLink (
233  const S_msrChord& chord)
234  { fNoteChordUpLink = chord; }
235 
236  S_msrChord getNoteChordUpLink () const
237  { return fNoteChordUpLink; }
238 
239  // grace notes group upLink
240  void setNoteGraceNotesGroupUpLink (
241  const S_msrGraceNotesGroup& graceNotesGroup)
242  { fNoteGraceNotesGroupUpLink = graceNotesGroup; }
243 
244  S_msrGraceNotesGroup getNoteGraceNotesGroupUpLink () const
245  { return fNoteGraceNotesGroupUpLink; }
246 
247  // tuplet upLink
248  void setNoteTupletUpLink (
249  const S_msrTuplet& tuplet)
250  { fNoteTupletUpLink = tuplet; }
251 
252  S_msrTuplet getNoteTupletUpLink () const
253  { return fNoteTupletUpLink; }
254 
255  // note kind
256 
257  void setNoteKind (msrNoteKind noteKind);
258 
259  msrNoteKind getNoteKind () const
260  { return fNoteKind; }
261 
262  // note pitch
263 
264  msrQuarterTonesPitchKind
265  getNoteQuarterTonesPitchKind () const
266  { return fNoteQuarterTonesPitchKind; }
267 
268  // note print kind
269 
270  void setNotePrintObjectKind (
271  msrPrintObjectKind notePrintObjectKind)
272  { fNotePrintObjectKind = notePrintObjectKind; }
273  msrPrintObjectKind getNotePrintObjectKind () const
274  { return fNotePrintObjectKind; }
275 
276  // note head
277 
278  void setNoteHeadKind (
279  msrNoteHeadKind noteHeadKind)
280  { fNoteHeadKind = noteHeadKind; }
281 
282  msrNoteHeadKind getNoteHeadKind () const
283  { return fNoteHeadKind; }
284 
285  void setNoteHeadFilledKind (
286  msrNoteHeadFilledKind
287  noteHeadFilledKind)
288  {
289  fNoteHeadFilledKind =
290  noteHeadFilledKind;
291  }
292 
293  msrNoteHeadFilledKind getNoteHeadFilledKind () const
294  { return fNoteHeadFilledKind; }
295 
296  void setNoteHeadParenthesesKind (
297  msrNoteHeadParenthesesKind
298  noteHeadParenthesesKind)
299  {
300  fNoteHeadParenthesesKind =
301  noteHeadParenthesesKind;
302  }
303 
304  msrNoteHeadParenthesesKind
305  getNoteHeadParenthesesKind () const
306  { return fNoteHeadParenthesesKind; }
307 
308  // accidentals
309 
310  void setNoteAccidentalKind (
311  msrNoteAccidentalKind
312  noteAccidentalKind)
313  {
314  fNoteAccidentalKind =
315  noteAccidentalKind;
316  }
317 
318  msrNoteAccidentalKind
319  getNoteAccidentalKind ()
320  {
321  return
322  fNoteAccidentalKind;
323  }
324 
325  void setNoteEditorialAccidentalKind (
326  msrNoteEditorialAccidentalKind
327  noteEditorialAccidentalKind)
328  {
329  fNoteEditorialAccidentalKind =
330  noteEditorialAccidentalKind;
331  }
332 
333  msrNoteEditorialAccidentalKind
334  getNoteEditorialAccidentalKind ()
335  {
336  return
337  fNoteEditorialAccidentalKind;
338  }
339 
340  void setNoteCautionaryAccidentalKind (
341  msrNoteCautionaryAccidentalKind
342  noteCautionaryAccidentalKind)
343  {
344  fNoteCautionaryAccidentalKind =
345  noteCautionaryAccidentalKind;
346  }
347 
348  msrNoteCautionaryAccidentalKind
349  getNoteCautionaryAccidentalKind ()
350  {
351  return
352  fNoteCautionaryAccidentalKind;
353  }
354 
355  // note whole notes
356 
357  void setNoteSoundingWholeNotes (
358  rational wholeNotes);
359 
360  rational getNoteSoundingWholeNotes ()
361  {
362  return
363  fMeasureElementSoundingWholeNotes; // JMI fNoteSoundingWholeNotes
364  }
365 
366  // note display
367 
368  msrQuarterTonesPitchKind
369  getNoteQuarterTonesDisplayPitchKind () const
370  {
371  return
372  fNoteQuarterTonesDisplayPitchKind;
373  }
374 
375  void setNoteDisplayWholeNotes (
376  rational wholeNotes);
377 
378  rational getNoteDisplayWholeNotes ()
379  { return fNoteDisplayWholeNotes; }
380 
381  // dots
382 
383  int getNoteDotsNumber () const
384  { return fNoteDotsNumber; }
385 
386  msrDurationKind getNoteGraphicDurationKind () const
387  { return fNoteGraphicDurationKind; }
388 
389  int getNoteOctave () const
390  { return fNoteOctave; }
391 
392  int getNoteDisplayOctave () const
393  { return fNoteDisplayOctave; }
394 
395  bool getNoteIsARest () const
396  // useful for rest tuplet members
397  { return fNoteIsARest; }
398 
399  bool getNoteIsUnpitched () const
400  { return fNoteIsUnpitched; }
401 
402  bool getNoteIsACueNote () const
403  { return fNoteIsACueNote; }
404 
405  // octave shifts
406  void setNoteOctaveShift (
407  S_msrOctaveShift octaveShift)
408  { fNoteOctaveShift = octaveShift; }
409 
410  S_msrOctaveShift getNoteOctaveShift () const
411  { return fNoteOctaveShift; }
412 
413  // note context
414  // -------------------------------
415 
416  // chord members
417  void setNoteBelongsToAChord ();
418 
419  bool getNoteBelongsToAChord () const
420  { return fNoteBelongsToAChord; }
421 
422  // grace notes
423  bool getNoteIsAGraceNote () const
424  { return fNoteIsAGraceNote; }
425 
426  // harmonies
427  void appendNoteToNoteHarmoniesList (
428  S_msrHarmony harmony);
429 
430  const list<S_msrHarmony>&
431  getNoteHarmoniesList () const
432  { return fNoteHarmoniesList; }
433 
434  // frame
435  void setNoteFrame (
436  S_msrFrame frame);
437 
438  const S_msrFrame& getNoteFrame () const
439  { return fNoteFrame; }
440 
441  // figured bass
442  void setNoteFiguredBass (
443  S_msrFiguredBass figuredBass);
444 
445  const S_msrFiguredBass&
446  getNoteFiguredBass () const
447  { return fNoteFiguredBass; }
448 
449  // note lyrics
450  // -------------------------------
451 
452  list<S_msrSyllable> getNoteSyllables () const
453  { return fNoteSyllables; }
454 
455  // elements attached to the note
456  // -------------------------------
457 
458  // stems
459  void setNoteStem (S_msrStem stem);
460 
461  S_msrStem getNoteStem () const
462  { return fNoteStem; }
463 
464  // beams
465  const list<S_msrBeam>&
466  getNoteBeams () const
467  { return fNoteBeams; }
468 
469  // articulations
470  const list<S_msrArticulation>&
471  getNoteArticulations () const
472  { return fNoteArticulations; }
473 
474  list<S_msrArticulation>&
475  getNoteArticulationsToModify ()
476  { return fNoteArticulations; }
477 
478  // spanners
479  const list<S_msrSpanner>&
480  getNoteSpanners () const
481  { return fNoteSpanners; }
482 
483  list<S_msrSpanner>&
484  getNoteSpannersToModify ()
485  { return fNoteSpanners; }
486 
487  // technicals
488  const list<S_msrTechnical>&
489  getNoteTechnicals () const
490  { return fNoteTechnicals; }
491 
492  const list<S_msrTechnicalWithInteger>&
493  getNoteTechnicalWithIntegers () const
494  { return fNoteTechnicalWithIntegers; }
495 
496  const list<S_msrTechnicalWithFloat>&
497  getNoteTechnicalWithFloats () const
498  { return fNoteTechnicalWithFloats; }
499 
500  const list<S_msrTechnicalWithString>&
501  getNoteTechnicalWithStrings () const
502  { return fNoteTechnicalWithStrings; }
503 
504  // ornaments
505  const list<S_msrOrnament>&
506  getNoteOrnaments () const
507  { return fNoteOrnaments; }
508 
509  // glissandos
510  const list<S_msrGlissando>&
511  getNoteGlissandos () const
512  { return fNoteGlissandos; }
513 
514  // slides
515  const list<S_msrSlide>&
516  getNoteSlides () const
517  { return fNoteSlides; }
518 
519  // grace notes
520  void setNoteGraceNotesGroupBefore (
521  S_msrGraceNotesGroup graceNotesGroupBefore);
522 
523  S_msrGraceNotesGroup getNoteGraceNotesGroupBefore () const
524  { return fNoteGraceNotesGroupBefore; }
525 
526  void setNoteGraceNotesGroupAfter (
527  S_msrGraceNotesGroup graceNotesGroupAfter);
528 
529  S_msrGraceNotesGroup getNoteGraceNotesGroupAfter () const
530  { return fNoteGraceNotesGroupAfter; }
531 
532  // after grace notes
533  /* JMI
534  void setNoteAfterGraceNotesGroup (
535  S_msrAfterGraceNotesGroup afterGraceNotesGroup);
536 
537  S_msrAfterGraceNotesGroup
538  getNoteAfterGraceNotesGroup () const
539  { return fNoteAfterGraceNotesGroup; }
540  */
541 
542  // singleTremolo
543  void setNoteSingleTremolo (
544  S_msrSingleTremolo trem);
545 
546  S_msrSingleTremolo getNoteSingleTremolo () const
547  { return fNoteSingleTremolo; }
548 
549  // ties
550  void setNoteTie (S_msrTie tie)
551  { fNoteTie = tie; }
552  S_msrTie getNoteTie () const
553  { return fNoteTie; }
554 
555  // dynamics
556  const list<S_msrDynamics>&
557  getNoteDynamics () const
558  { return fNoteDynamics; }
559  const list<S_msrOtherDynamics>&
560  getNoteOtherDynamics () const
561  { return fNoteOtherDynamics; }
562 
563  // words
564  const list<S_msrWords>&
565  getNoteWords () const
566  { return fNoteWords; }
567 
568  list<S_msrWords>& getNoteWordsToModify ()
569  { return fNoteWords; }
570 
571  // slashes
572  const list<S_msrSlash>&
573  getNoteSlashes () const
574  { return fNoteSlashes; }
575 
576  // wedges
577  const list<S_msrWedge>&
578  getNoteWedges () const
579  { return fNoteWedges; }
580 
581  list<S_msrWedge>&
582  getNoteWedgesToModify ()
583  { return fNoteWedges; }
584 
585  // eyeglasses
586  const list<S_msrEyeGlasses>&
587  getNoteEyeGlasses () const
588  { return fNoteEyeGlasses; }
589 
590  // damps
591  const list<S_msrDamp>&
592  getNoteDamps () const
593  { return fNoteDamps; }
594 
595  // damp alls
596  const list<S_msrDampAll>&
597  getNoteDampAlls () const
598  { return fNoteDampAlls; }
599 
600  // scordaturas
601  const list<S_msrScordatura>&
602  getNoteScordaturas () const
603  { return fNoteScordaturas; }
604 
605  // slurs
606  const list<S_msrSlur>&
607  getNoteSlurs () const
608  { return fNoteSlurs; }
609 
610  // ligatures
611  const list<S_msrLigature>&
612  getNoteLigatures () const
613  { return fNoteLigatures; }
614 
615  // pedals
616  const list<S_msrPedal>&
617  getNotePedals () const
618  { return fNotePedals; }
619 
620  // note measure information
621  // -------------------------------
622 
623  // position in measure
624  void setNotePositionInMeasure (
625  rational positionInMeasure);
626 
627  void setNoteOccupiesAFullMeasure ();
628 
629  bool getNoteOccupiesAFullMeasure () const
630  { return fNoteOccupiesAFullMeasure; }
631 
632  // note redundant information (for speed)
633  bool getNoteIsStemless () const
634  { return fNoteIsStemless; }
635 
636  void setNoteIsAChordsFirstMemberNote ()
637  {
638  fNoteIsAChordsFirstMemberNote = true;
639  }
640 
641  bool getNoteIsAChordsFirstMemberNote () const
642  { return fNoteIsAChordsFirstMemberNote; }
643 
644  void setNoteIsFirstNoteInADoubleTremolo ()
645  { fNoteIsFirstNoteInADoubleTremolo = true; }
646 
647  bool getNoteIsFirstNoteInADoubleTremolo () const
648  { return fNoteIsFirstNoteInADoubleTremolo; }
649 
650  void setNoteIsSecondNoteInADoubleTremolo ()
651  { fNoteIsSecondNoteInADoubleTremolo = true; }
652 
653  bool getNoteIsSecondNoteInADoubleTremolo () const
654  { return fNoteIsSecondNoteInADoubleTremolo; }
655 
656  S_msrOrnament getNoteTrillOrnament () const
657  { return fNoteTrillOrnament; }
658 
659  S_msrOrnament getNoteDashesOrnament () const
660  { return fNoteDashesOrnament; }
661 
662  S_msrOrnament getNoteDelayedTurnOrnament () const
663  { return fNoteDelayedTurnOrnament; }
664 
665  S_msrOrnament getNoteDelayedInvertedTurnOrnament () const
666  { return fNoteDelayedInvertedTurnOrnament; }
667 
668  S_msrSpanner getNoteWavyLineSpannerStart () const
669  { return fNoteWavyLineSpannerStart; }
670 
671  S_msrSpanner getNoteWavyLineSpannerStop () const
672  { return fNoteWavyLineSpannerStop; }
673 
674  void setNoteIsFollowedByGraceNotesGroup ()
675  { fNoteIsFollowedByGraceNotesGroup = true; }
676 
677  bool getNoteIsFollowedByGraceNotesGroup () const
678  { return fNoteIsFollowedByGraceNotesGroup; }
679 
680  void setNoteColor (
681  msrAlphaRGBColor noteColor)
682  { fNoteColor = noteColor; }
683 
684  msrAlphaRGBColor getNoteColor () const
685  { return fNoteColor; }
686 
687  // services
688  // ------------------------------------------------------
689 
690  bool noteIsAPitchedRest () const;
691 
692  string asShortStringWithRawWholeNotes () const;
693 
694  // diatonic pitch
695  msrDiatonicPitchKind noteDiatonicPitchKind (
696  int inputLineNumber) const;
697 
698  // tuplet members
699  void determineTupletMemberSoundingFromDisplayWholeNotes (
700  int actualNotes, int normalNotes);
701 
702  // lyrics
703  void appendSyllableToNote (S_msrSyllable syllable);
704 
705  // beams
706  void appendBeamToNote (S_msrBeam beam);
707 
708  // articulations
709  void appendArticulationToNote (S_msrArticulation art);
710 
711  // spanners
712  void appendSpannerToNote (S_msrSpanner span);
713 
714  // technicals
715  void appendTechnicalToNote (S_msrTechnical tech);
716 
717  void appendTechnicalWithIntegerToNote (
718  S_msrTechnicalWithInteger tech);
719 
720  void appendTechnicalWithFloatToNote (
721  S_msrTechnicalWithFloat tech);
722 
723  void appendTechnicalWithStringToNote (
724  S_msrTechnicalWithString tech);
725 
726  // ornaments
727  void appendOrnamentToNote (S_msrOrnament orn);
728 
729  // glissandos
730  void appendGlissandoToNote (S_msrGlissando glissando);
731 
732  // slides
733  void appendSlideToNote (S_msrSlide slide);
734 
735  // dynamics
736  void appendDynamicsToNote (
737  S_msrDynamics dynamics);
738  void appendOtherDynamicsToNote (
739  S_msrOtherDynamics otherDynamics);
740 
741  S_msrDynamics removeFirstDynamics (); // ???
742 
743  // words
744  void appendWordsToNote (S_msrWords words);
745 
746  // slurs
747  void appendSlurToNote (S_msrSlur slur);
748 
749  // ligatures
750  void appendLigatureToNote (S_msrLigature ligature);
751 
752  // pedals
753  void appendPedalToNote (S_msrPedal pedal);
754 
755  // slashes
756  void appendSlashToNote (S_msrSlash slash);
757 
758  // wedges
759  void appendWedgeToNote (S_msrWedge wedge);
760 
761  S_msrWedge removeFirstWedge (); // JMI
762 
763  // segnos
764  void appendSegnoToNote (S_msrSegno segno);
765 
766  // codas
767  void appendCodaToNote (S_msrCoda coda);
768 
769  // eyeglasses
770  void appendEyeGlassesToNote (S_msrEyeGlasses eyeGlasses);
771 
772  // damps
773  void appendDampToNote (S_msrDamp damp);
774 
775  // damp alls
776  void appendDampAllToNote (S_msrDampAll dampAll);
777 
778  // scordaturas
779  void appendScordaturaToNote (S_msrScordatura scordatura);
780 
781 
782  public:
783 
784  // visitors
785  // ------------------------------------------------------
786 
787  virtual void acceptIn (basevisitor* v);
788  virtual void acceptOut (basevisitor* v);
789 
790  virtual void browseData (basevisitor* v);
791 
792  public:
793 
794  // print
795  // ------------------------------------------------------
796 
797  // note kind
798  string noteKindAsString () const;
799 
800  string notePitchAsString () const;
801  string noteDisplayPitchKindAsString () const;
802 
803  string noteDisplayOctaveAsString () const;
804 
805  // note print kind
806  string notePrintObjectKindAsString () const;
807 
808  // note head
809  string noteHeadKindAsString () const;
810 
811  string noteHeadFilledKindAsString () const;
812  string noteHeadParenthesesKindAsString () const;
813 
814  string noteDiatonicPitchKindAsString (
815  int inputLineNumber) const;
816 
817  // whole notes
818  string noteSoundingWholeNotesAsMsrString () const;
819  string noteDisplayWholeNotesAsMsrString () const;
820 
821  // graphic duration
822  string noteGraphicDurationAsMsrString () const;
823  string tupletNoteGraphicDurationAsMsrString ( // JMI
824  int actualNotes, int normalNotes) const;
825 
826  // note as string
827  string asString () const;
828 
829  string asShortString () const;
830 
831  virtual void print (ostream& os) const;
832 
833  private:
834 
835  // fields
836  // ------------------------------------------------------
837 
838  // upLinks
839  // ------------------------------------------------------
840 
841  S_msrChord fNoteChordUpLink;
842 
843  S_msrGraceNotesGroup fNoteGraceNotesGroupUpLink;
844 
845  S_msrTuplet fNoteTupletUpLink;
846 
847  S_msrMeasure fNoteMeasureUpLink;
848 
849  // basic note description
850  // ------------------------------------------------------
851 
852  // note kind
853  msrNoteKind fNoteKind;
854 
855  // note quarter tones pitch
856  msrQuarterTonesPitchKind
857  fNoteQuarterTonesPitchKind;
858 
859  // whole notes
860 // rational fNoteSoundingWholeNotes;
861  rational fNoteDisplayWholeNotes;
862 
863  int fNoteDotsNumber;
864 
865  msrDurationKind fNoteGraphicDurationKind;
866 
867  int fNoteOctave;
868 
869  msrQuarterTonesPitchKind
870  fNoteQuarterTonesDisplayPitchKind;
871  int fNoteDisplayOctave;
872  // for unpitched notes
873  // and pitched rests
874 
875  // short cuts for efficiency
876  bool fNoteIsARest;
877  bool fNoteIsUnpitched;
878 
879  bool fNoteIsACueNote;
880  bool fNoteIsAGraceNote;
881 
882  // note octave shift
883  S_msrOctaveShift fNoteOctaveShift;
884 
885  // note print kind
886  msrPrintObjectKind fNotePrintObjectKind;
887 
888  // note head
889  msrNoteHeadKind fNoteHeadKind;
890  msrNoteHeadFilledKind fNoteHeadFilledKind;
891  msrNoteHeadParenthesesKind
892  fNoteHeadParenthesesKind;
893 
894  // accidentals
895  // ------------------------------------------------------
896 
897  msrNoteAccidentalKind fNoteAccidentalKind;
898 
899  msrNoteEditorialAccidentalKind
900  fNoteEditorialAccidentalKind;
901  msrNoteCautionaryAccidentalKind
902  fNoteCautionaryAccidentalKind;
903 
904  // staff and voice context
905  // ------------------------------------------------------
906 
907  int fNoteStaffNumber;
908  int fNoteVoiceNumber;
909 
910  // chord member?
911  // ------------------------------------------------------
912 
913  bool fNoteBelongsToAChord;
914 
915  // tuplet member?
916  // ------------------------------------------------------
917 
918  bool fNoteBelongsToATuplet;
919 
920  // note measure information
921  // ------------------------------------------------------
922 
923  bool fNoteOccupiesAFullMeasure;
924 
925  // multiple rest member?
926  // ------------------------------------------------------
927 
928  bool fNoteBelongsToARestMeasures; // JMI
929  int fNoteRestMeasuresSequenceNumber; // JMI
930 
931  // note lyrics
932  // ------------------------------------------------------
933 
934  list<S_msrSyllable> fNoteSyllables;
935 
936  // stem
937  // ------------------------------------------------------
938 
939  S_msrStem fNoteStem;
940 
941  // beams
942  // ------------------------------------------------------
943 
944  list<S_msrBeam> fNoteBeams;
945 
946  // articulations
947  // ------------------------------------------------------
948 
949  list<S_msrArticulation>
950  fNoteArticulations;
951 
952  // spanners
953  // ------------------------------------------------------
954 
955  list<S_msrSpanner> fNoteSpanners;
956 
957  // technicals
958  // ------------------------------------------------------
959 
960  list<S_msrTechnical> fNoteTechnicals;
961 
962  list<S_msrTechnicalWithInteger>
963  fNoteTechnicalWithIntegers;
964 
965  list<S_msrTechnicalWithFloat>
966  fNoteTechnicalWithFloats;
967 
968  list<S_msrTechnicalWithString>
969  fNoteTechnicalWithStrings;
970 
971  // ornaments
972  // ------------------------------------------------------
973 
974  list<S_msrOrnament> fNoteOrnaments;
975 
976  // glissandos
977  // ------------------------------------------------------
978 
979  list<S_msrGlissando> fNoteGlissandos;
980 
981  // slides
982  // ------------------------------------------------------
983 
984  list<S_msrSlide> fNoteSlides;
985 
986  // grace notes
987  // ------------------------------------------------------
988 
989  S_msrGraceNotesGroup fNoteGraceNotesGroupBefore;
990  // JMI S_msrAfterGraceNotesGroup
991  S_msrGraceNotesGroup
992  fNoteGraceNotesGroupAfter;
993 
994  // single tremolo
995  // ------------------------------------------------------
996 
997  S_msrSingleTremolo fNoteSingleTremolo;
998 
999  // tie
1000  // ------------------------------------------------------
1001 
1002  S_msrTie fNoteTie;
1003 
1004  // dynamics
1005  // ------------------------------------------------------
1006 
1007  list<S_msrDynamics> fNoteDynamics;
1008  list<S_msrOtherDynamics>
1009  fNoteOtherDynamics;
1010 
1011  // slashes
1012  // ------------------------------------------------------
1013 
1014  list<S_msrSlash> fNoteSlashes;
1015 
1016  // wedges
1017  // ------------------------------------------------------
1018 
1019  list<S_msrWedge> fNoteWedges;
1020 
1021  // segnos
1022  // ------------------------------------------------------
1023 
1024  list<S_msrSegno> fNoteSegnos;
1025 
1026  // coda
1027  // ------------------------------------------------------
1028 
1029  list<S_msrCoda> fNoteCodas;
1030 
1031  // eyeglasses
1032  // ------------------------------------------------------
1033 
1034  list<S_msrEyeGlasses> fNoteEyeGlasses;
1035 
1036  // damps
1037  // ------------------------------------------------------
1038 
1039  list<S_msrDamp> fNoteDamps;
1040 
1041  // damp alls
1042  // ------------------------------------------------------
1043 
1044  list<S_msrDampAll> fNoteDampAlls;
1045 
1046  // scordaturas
1047  // ------------------------------------------------------
1048 
1049  list<S_msrScordatura> fNoteScordaturas;
1050 
1051  // words
1052  // ------------------------------------------------------
1053 
1054  list<S_msrWords> fNoteWords;
1055 
1056  // slurs
1057  // ------------------------------------------------------
1058 
1059  list<S_msrSlur> fNoteSlurs;
1060 
1061  // ligatures
1062  // ------------------------------------------------------
1063 
1064  list<S_msrLigature> fNoteLigatures;
1065 
1066  // pedals
1067  // ------------------------------------------------------
1068 
1069  list<S_msrPedal> fNotePedals;
1070 
1071  // harmonies
1072  // ------------------------------------------------------
1073 
1074  list<S_msrHarmony> fNoteHarmoniesList;
1075 
1076  // frame
1077  // ------------------------------------------------------
1078 
1079  S_msrFrame fNoteFrame;
1080 
1081  // figured bass
1082  // ------------------------------------------------------
1083 
1084  S_msrFiguredBass fNoteFiguredBass;
1085 
1086  // note redundant information (for speed)
1087  // ------------------------------------------------------
1088 
1089  // this is needed to handle stemless notes,
1090  // because the <stem> is visited after 'visitorStart ( S_msrNote )'
1091  bool fNoteIsStemless;
1092 
1093  // this is to distinguish the first chord member note
1094  // from the other ones, since only it should get the slur if any
1095  bool fNoteIsAChordsFirstMemberNote;
1096 
1097  // this is needed to handle double tremolos
1098  bool fNoteIsFirstNoteInADoubleTremolo;
1099  bool fNoteIsSecondNoteInADoubleTremolo;
1100 
1101  // this is useful
1102  // as well as to produce a nice \aftergrace in LilyPond
1103  S_msrOrnament fNoteTrillOrnament;
1104  bool fNoteIsFollowedByGraceNotesGroup;
1105 
1106  // this is useful to produce a text spanner in LilyPond
1107  S_msrOrnament fNoteDashesOrnament;
1108 
1109  // this is needed to produce a delayed turn/inverted-turn in LilyPond
1110  S_msrOrnament fNoteDelayedTurnOrnament;
1111  S_msrOrnament fNoteDelayedInvertedTurnOrnament;
1112 
1113  // this is useful to to combine a trill and a wavy line in LilyPond
1114  S_msrSpanner fNoteWavyLineSpannerStart;
1115  S_msrSpanner fNoteWavyLineSpannerStop;
1116 
1117  // color
1118  msrAlphaRGBColor fNoteColor;
1119 };
1120 typedef SMARTP<msrNote> S_msrNote;
1121 EXP ostream& operator<< (ostream& os, const S_msrNote& elt);
1122 
Definition: msrNotes_MUT_DEP.h:8
Rational number representation.
Definition: rational.h:25