MuseScore  3.4
Music composition and notation
ove.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Score
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2009 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef OVE_DATA_H
21 #define OVE_DATA_H
22 
23 #ifdef WIN32
24 #define DLL_EXPORT extern "C" __declspec(dllexport)
25 #else
26 #define DLL_EXPORT
27 #endif
28 
29 namespace OVE {
30 
31 class OveSong;
32 class Track;
33 class Page;
34 class Voice;
35 class Line;
36 class Staff;
37 class Measure;
38 class MeasureData;
39 class MusicData;
40 class OffsetElement;
41 class LineElement;
42 class PairEnds;
43 class Note;
44 class NoteContainer;
45 class Beam;
46 class Tie;
47 class Tuplet;
48 class Harmony;
49 class Clef;
50 class Lyric;
51 class Slur;
52 class MeasureText;
53 class Articulation;
54 class Glissando;
55 class Decorator;
56 class MeasureRepeat;
57 class Dynamics;
58 class Wedge;
59 class WedgeEndPoint;
60 class Pedal;
61 class KuoHao;
62 class Expressions;
63 class HarpPedal;
64 class MultiMeasureRest;
65 class OctaveShift;
66 class OctaveShiftEndPoint;
67 class BarNumber;
68 class Tempo;
69 class Text;
70 class TimeSignature;
71 class Key;
72 class RepeatSymbol;
73 class NumericEnding;
74 class MidiData;
75 class MidiController;
76 class MidiProgramChange;
77 class MidiChannelPressure;
78 class MidiPitchWheel;
79 
80 const int TWELVE_TONE = 12 ;
81 const int INVALID_NOTE = -1 ;
82 const int OCTAVE = 7 ;
83 
84 enum class CondType : char {
85  None,
86  Time_Parameters = 0x09, // size - 7, TimeSignature
87  Bar_Number = 0x0A, // size, compatible with previous version
88  Decorator = 0x16,
89  Tempo = 0x1C, // size - 7
90  Text = 0x1D, // size - 7, Rehearsal | SystemText
91  Expression = 0x25, // size - 7, if set playback parameters in Expression, will store in COND
92  Barline_Parameters = 0x30, // size - 7, include :|| repeat count
93  Repeat = 0x31, //
94  Numeric_Ending = 0x32,
95  };
96 
97 enum class BdatType : unsigned char {
98  None,
99  Raw_Note = 0x70,
100  Rest = 0x80,
101  Note = 0x90,
102  Beam = 0x10,
103  Harmony = 0x11,
104  Clef = 0x12,
105  Dynamics = 0x13,
106  Wedge = 0x14, // cresendo, decresendo
107  Glissando = 0x15,
108  Decorator = 0x16, // measure repeat | piano pedal | dotted barline
109  Key = 0x17,
110  Lyric = 0x18,
111  Octave_Shift = 0x19,
112  Slur = 0x1B,
113  Text = 0x1D,
114  Tie = 0x1E,
115  Tuplet = 0x1F,
116  Guitar_Bend = 0x21, //
117  Guitar_Barre = 0x22, //
118  Pedal = 0x23,
119  KuoHao = 0x24, // () [] {}
120  Expressions = 0x25,
121  Harp_Pedal = 0x26,
122  Multi_Measure_Rest = 0x27,
123  Harmony_GuitarFrame = 0x28,
124  Graphics_40 = 0x40, // unknown
125  Graphics_RoundRect = 0x41,
126  Graphics_Rect = 0x42,
127  Graphics_Round = 0x43,
128  Graphics_Line = 0x44,
129  Graphics_Curve = 0x45,
130  Graphics_WedgeSymbol = 0x46,
131  Midi_Controller = 0xAB,
132  Midi_Program_Change = 0xAC,
133  Midi_Channel_Pressure = 0xAD,
134  Midi_Pitch_Wheel = 0xAE,
135  Bar_End = 0xFF,
136  };
137 
139 
140 enum class MusicDataType : char {
141  None,
142 
143  // attributes
144  Clef,
145  Key,
147 
148  // sound
149  Tempo,
150 
151  // direction
152  Dynamics,
153  Wedge,
155  OctaveShift,
157  Expressions,
158  Repeat,
159  Text,
160  Harp_Pedal,
161  Pedal,
162 
163  // note & harmony
165  Harmony,
166 
167  // note's children
168  Beam,
169  Glissando,
170  Lyric,
171  Slur,
172  Tie,
173  Tuplet,
174 
175  // barline
177 
178  KuoHao,
179  Bar_End,
180  Decorator,
182  };
183 
184 enum class MidiType : signed char {
185  None = -1,
186  Controller,
189  Pitch_Wheel,
190  };
191 
192 enum class ClefType : char {
193  Treble = 0x00, //0x00
194  Bass, //0x01
195  Alto, //0x02
196  UpAlto, //0x03
197  DownDownAlto, //0x04
198  DownAlto, //0x05
199  UpUpAlto, //0x06
200  Treble8va, //0x07
201  Bass8va, //0x08
202  Treble8vb, //0x09
203  Bass8vb, //0x0A
204  Percussion1, //0x0B
205  Percussion2, //0x0C
206  TAB //0x0D
207  };
208 
209 enum class GroupType : char {
210  None = 0,
211  Brace,
212  Bracket
213  };
214 
215 enum class AccidentalType : char {
216  Normal = 0x0,
217  Sharp = 0x1,
218  Flat = 0x2,
219  Natural = 0x3,
220  DoubleSharp = 0x4,
221  DoubleFlat = 0x5,
222  Sharp_Caution = 0x9,
223  Flat_Caution = 0xA,
224  Natural_Caution = 0xB,
225  DoubleSharp_Caution = 0xC,
226  DoubleFlat_Caution = 0xD
227  };
228 
229 enum class NoteHeadType : char {
230  Standard = 0x00,
231  Invisible,
233  Percussion,
235  Open_Rhythm,
236  Closed_Slash,
237  Open_Slash,
238  Closed_Do,
239  Open_Do,
240  Closed_Re,
241  Open_Re,
242  Closed_Mi,
243  Open_Mi,
244  Closed_Fa,
245  Open_Fa,
246  Closed_Sol,
247  Open_Sol,
248  Closed_La,
249  Open_La,
250  Closed_Ti,
251  Open_Ti
252  };
253 
254 enum class TiePos : char {
255  None = 0x0,
256  LeftEnd = 0x1,
257  RightEnd = 0x2
258  };
259 
260 enum class ArticulationType : char {
261  Major_Trill = 0x00,
262  Minor_Trill = 0x01,
263  Trill_Section = 0x02,
264  Inverted_Short_Mordent = 0x03,
265  Inverted_Long_Mordent = 0x04,
266  Short_Mordent = 0x05,
267  Turn = 0x06,
268  Finger_1 = 0x07,
269  Finger_2 = 0x08,
270  Finger_3 = 0x09,
271  Finger_4 = 0x0A,
272  Finger_5 = 0x0B,
276  Marcato = 0x0F,
277  Marcato_Dot = 0x10,
278  Heavy_Attack = 0x11,
279  SForzando = 0x12,
280  SForzando_Dot = 0x13,
281  Heavier_Attack = 0x14,
282  SForzando_Inverted = 0x15,
283  SForzando_Dot_Inverted = 0x16,
284  Staccatissimo = 0x17,
285  Staccato = 0x18,
286  Tenuto = 0x19,
287  Up_Bow = 0x1A,
288  Down_Bow = 0x1B,
289  Up_Bow_Inverted = 0x1C,
290  Down_Bow_Inverted = 0x1D,
291  Arpeggio = 0x1E,
292  Tremolo_Eighth = 0x1F,
293  Tremolo_Sixteenth = 0x20,
294  Tremolo_Thirty_Second = 0x21,
295  Tremolo_Sixty_Fourth = 0x22,
296  Natural_Harmonic = 0x23,
297  Artificial_Harmonic = 0x24,
298  Plus_Sign = 0x25,
299  Fermata = 0x26,
300  Fermata_Inverted = 0x27,
301  Pedal_Down = 0x28,
302  Pedal_Up = 0x29,
303  Pause = 0x2A,
304  Grand_Pause = 0x2B,
305  Toe_Pedal = 0x2C,
306  Heel_Pedal = 0x2D,
307  Toe_To_Heel_Pedal = 0x2E,
308  Heel_To_Toe_Pedal = 0x2F,
309  Open_String = 0x30, // finger 0 in guitar
310  Guitar_Lift = 0x46,
311  Guitar_Slide_Up = 0x47,
312  Guitar_Rip = 0x48,
313  Guitar_Fall_Off = 0x49,
314  Guitar_Slide_Down = 0x4A,
315  Guitar_Spill = 0x4B,
316  Guitar_Flip = 0x4C,
317  Guitar_Smear = 0x4D,
318  Guitar_Bend = 0x4E,
319  Guitar_Doit = 0x4F,
320  Guitar_Plop = 0x50,
321  Guitar_Wow_Wow = 0x51,
322  Guitar_Thumb = 0x64,
323  Guitar_Index_Finger = 0x65,
324  Guitar_Middle_Finger = 0x66,
325  Guitar_Ring_Finger = 0x67,
326  Guitar_Pinky_Finger = 0x68,
327  Guitar_Tap = 0x69,
328  Guitar_Hammer = 0x6A,
329  Guitar_Pluck = 0x6B,
330 
331  None
332 
333  /* Detached_Legato,
334  Spiccato,
335  Scoop,
336  Plop,
337  Doit,
338  Falloff,
339  Breath_Mark,
340  Caesura,*/
341  };
342 
343 enum class NoteType : char {
344  Note_DoubleWhole = 0x0,
345  Note_Whole = 0x1,
346  Note_Half = 0x2,
347  Note_Quarter = 0x3,
348  Note_Eight = 0x4,
349  Note_Sixteen = 0x5,
350  Note_32 = 0x6,
351  Note_64 = 0x7,
352  Note_128 = 0x8,
353  Note_256 = 0x9,
354 
355  Note_None
356  };
357 
358 inline int NoteTypeToTick(NoteType type, int quarter) {
359  int c = int(pow(2.0, int(type))) ;
360  return quarter * 4 * 2 / c ;
361  }
362 
363 enum class DynamicsType : char {
364  PPPP = 0,
365  PPP,
366  PP,
367  P,
368  MP,
369  MF,
370  F,
371  FF,
372  FFF,
373  FFFF,
374  SF,
375  FZ,
376  SFZ,
377  SFFZ,
378  FP,
379  SFP
380  };
381 
382 enum class WedgeType : char {
383  Cres_Line = 0, // <
384  Double_Line, // <>, not appear in xml
385  Decresc_Line, // >
386  Cres, // cresc., not appear in xml, will create Expression
387  Decresc // decresc., not appear in xml, will create Expression
388  };
389 
390 enum class KuoHaoType : char {
391  Parentheses = 0,
392  Brace,
393  Bracket
394  };
395 
396 enum class OctaveShiftType : char {
397  OS_8 = 0,
398  OS_Minus_8,
399  OS_15,
401  };
402 
403 enum class OctaveShiftPosition : char {
404  Start = 0 ,
405  Continue,
406  Stop
407  };
408 
409 enum class RepeatType : char {
410  Segno = 0,
411  Coda,
412  ToCoda,
413  DSAlCoda,
414  DSAlFine,
415  DCAlCoda,
416  DCAlFine,
417  Fine,
418 
419  Null
420  };
421 
422 enum class BarLineType : char {
423  Default = 0, //0x00 will be | or final (at last measure)
424  Double, //0x01 ||
425  RepeatLeft, //0x02 ||:
426  RepeatRight, //0x03 :||
427  Final, //0x04
428  Dashed, //0x05
429  Null //0x06
430  } ;
431 
432 enum class NoteDuration {
433  D_256 = 15,
434  D_128 = NoteDuration::D_256 * 2, // 30
435  D_64 = NoteDuration::D_128 * 2, // 60
436  D_32 = NoteDuration::D_64 * 2, // 120
437  D_16 = NoteDuration::D_32 * 2, // 240
438  D_8 = NoteDuration::D_16 * 2, // 480
439  D_4 = NoteDuration::D_8 * 2, // 960
440  D_2 = NoteDuration::D_4 * 2, // 1920
441  D_Whole = NoteDuration::D_2 * 2, // 3840
443  };
444 
445 enum class ToneType : char {
446  C = 0,
447  D,
448  E,
449  F,
450  G,
451  A,
452  B
453  };
454 
455 enum class KeyType : char {
456  Key_C = 0, // C
457  Key_Bass_1, // F
458  Key_Bass_2, // Bb
459  Key_Bass_3, // Eb
460  Key_Bass_4, // Ab
461  Key_Bass_5, // Db
462  Key_Bass_6, // Gb
463  Key_Bass_7, // Cb
464  Key_Sharp_1, // G
465  Key_Sharp_2, // D
466  Key_Sharp_3, // A
467  Key_Sharp_4, // E
468  Key_Sharp_5, // B
469  Key_Sharp_6, // F#
470  Key_Sharp_7 // C#
471  };
472 
473 // IOveNotify.h
474 class IOveNotify {
475 public:
477  virtual ~IOveNotify() {}
478 
479 public:
480  virtual void loadInfo(const QString& info) = 0;
481  virtual void loadError() = 0;
482  virtual void loadPosition(int currentMeasure, int totalMeasure, int currentTrack, int totalTrack) = 0;
483  };
484 
486 public:
488  virtual ~IOVEStreamLoader() {}
489 
490 public:
491  virtual void setNotify(IOveNotify* notify) = 0;
492  virtual void setFileStream(unsigned char* buffer, unsigned int size) = 0;
493  virtual void setOve(OveSong* ove) = 0;
494 
495  // read stream, set read data to setOve(ove)
496  virtual bool load() = 0;
497 
498  virtual void release() = 0;
499  };
500 
502 
504 // basic element
505 class TickElement {
506 public:
507  TickElement();
508  virtual ~TickElement() {}
509 
510 public:
511  void setTick(int tick);
512  int getTick(void) const;
513 
514 private:
515  int tick_;
516  };
517 
518 class MeasurePos {
519 public:
520  MeasurePos();
521  virtual ~MeasurePos() {}
522 
523 public:
524  void setMeasure(int measure);
525  int getMeasure() const;
526 
527  void setOffset(int offset);
528  int getOffset() const;
529 
530  MeasurePos shiftMeasure(int measure) const;
531  MeasurePos shiftOffset(int offset) const; // ignore cross measure
532 
533  bool operator ==(const MeasurePos& mp) const;
534  bool operator !=(const MeasurePos& mp) const;
535  bool operator <(const MeasurePos& mp) const;
536  bool operator <=(const MeasurePos& mp) const;
537  bool operator >(const MeasurePos& mp) const;
538  bool operator >=(const MeasurePos& mp) const;
539 
540 private:
541  int measure_;
542  int offset_;
543  };
544 
545 class PairElement {
546 public:
547  PairElement();
548  virtual ~PairElement();
549 
550 public:
551  MeasurePos* start() const;
552  MeasurePos* stop() const;
553 
554 private:
557  };
558 
559 class PairEnds {
560 public:
561  PairEnds();
562  virtual ~PairEnds();
563 
564 public:
565  LineElement* getLeftLine() const;
566  LineElement* getRightLine() const;
567 
568  OffsetElement* getLeftShoulder() const;
569  OffsetElement* getRightShoulder() const;
570 
571 private:
576  };
577 
578 class LineElement {
579 public:
580  LineElement();
581  virtual ~LineElement() {}
582 
583 public:
584  virtual void setLine(int line); // middle line (3rd line of each clef) is set 0
585  virtual int getLine(void) const;
586 
587 private:
588  int line_;
589  };
590 
592 public:
593  OffsetElement();
594  virtual ~OffsetElement() {}
595 
596 public:
597  virtual void setXOffset(int offset);
598  virtual int getXOffset() const;
599 
600  virtual void setYOffset(int offset);
601  virtual int getYOffset() const;
602 
603 private:
604  int xOffset_;
605  int yOffset_;
606  };
607 
609 public:
610  LengthElement();
611  virtual ~LengthElement() {}
612 
613 public:
614  void setLength(int length);
615  int getLength() const;
616 
617 private:
618  int length_; // tick
619  };
620 
621 // base class of many ove music element
622 class MusicData: public TickElement, public PairElement, public OffsetElement {
623 public:
624  MusicData();
625  virtual ~MusicData() {}
626 
627 public:
628  MusicDataType getMusicDataType() const;
629 
630  enum class XmlDataType : char {
631  Attributes = 0, NoteBeam, Notations, Direction, None
632  };
633  static XmlDataType getXmlDataType(MusicDataType type);
634  // static bool get_is_pair_element(MusicDataType type) ;
635 
636  // show / hide
637  void setShow(bool show);
638  bool getShow() const;
639 
640  // color
641  void setColor(unsigned int color); // not exists in ove 3
642  unsigned int getColor() const;
643 
644  void setVoice(unsigned int voice);
645  unsigned int getVoice() const;
646 
647  void copyCommonBlock(const MusicData& source);
648 
649 protected:
651 
652 private:
653  bool show_;
654  unsigned int color_;
655  unsigned int voice_;
656  };
657 
658 class MidiData: public TickElement {
659 public:
660  MidiData();
661  virtual ~MidiData() {}
662 
663 public:
664  MidiType getMidiType() const;
665 
666 protected:
668  };
669 
670 
672 class OveSong {
673 public:
674  OveSong();
675  ~OveSong();
676 
677 public:
678  void setIsVersion4(bool version4 = true);
679  bool getIsVersion4() const;
680 
681  void setQuarter(int tick);
682  int getQuarter(void) const;
683 
684  void setShowPageMargin(bool show);
685  bool getShowPageMargin() const;
686 
687  void setShowTransposeTrack(bool show);
688  bool getShowTransposeTrack() const;
689 
690  void setShowLineBreak(bool show);
691  bool getShowLineBreak() const;
692 
693  void setShowRuler(bool show);
694  bool getShowRuler() const;
695 
696  void setShowColor(bool show);
697  bool getShowColor() const;
698 
699  void setPlayRepeat(bool play);
700  bool getPlayRepeat() const;
701 
702  enum class PlayStyle : char {
703  Record, Swing, Notation
704  };
705  void setPlayStyle(PlayStyle style);
706  PlayStyle getPlayStyle() const;
707 
708  void addTitle(const QString& str);
709  QList<QString> getTitles(void) const;
710 
711  void addAnnotate(const QString& str);
712  QList<QString> getAnnotates(void) const;
713 
714  void addWriter(const QString& str);
715  QList<QString> getWriters(void) const;
716 
717  void addCopyright(const QString& str);
718  QList<QString> getCopyrights(void) const;
719 
720  void addHeader(const QString& str);
721  QList<QString> getHeaders(void) const;
722 
723  void addFooter(const QString& str);
724  QList<QString> getFooters(void) const;
725 
726  void addTrack(Track* ptr);
727  int getTrackCount(void) const;
728  QList<Track*> getTracks() const;
729  Track* getTrack(int part, int staff) const;
730 
731  void setTrackBarCount(int count);
732  int getTrackBarCount() const;
733 
734  bool addPage(Page* page);
735  int getPageCount() const;
736  Page* getPage(int idx);
737 
738  void addLine(Line* ptr);
739  int getLineCount() const;
740  Line* getLine(int idx) const;
741 
742  void addMeasure(Measure* ptr);
743  int getMeasureCount(void) const;
744  Measure* getMeasure(int bar) const;
745 
746  void addMeasureData(MeasureData* ptr);
747  int getMeasureDataCount(void) const;
748  MeasureData* getMeasureData(int part, int staff/*=0*/, int bar) const;
749  MeasureData* getMeasureData(int track, int bar) const;
750 
751  // tool
752  void setPartStaffCounts(const QList<int>& partStaffCounts);
753  int getPartCount() const;
754  int getStaffCount(int part) const;
755  int getPartBarCount() const;
756 
757  void clear(void);
758 
759  QPair<int, int> trackToPartStaff(int track) const;
760 
761  void setTextCodecName(const QString& codecName);
762  QString getCodecString(const QByteArray& text);
763 
764 private:
765  int partStaffToTrack(int part, int staff) const;
766 
767 private:
768  bool version4_;
769  int quarter_;
770 
778 
779  QList<QString> titles_;
780  QList<QString> annotates_;
781  QList<QString> writers_;
782  QList<QString> copyrights_;
783  QList<QString> headers_;
784  QList<QString> footers_;
785 
786  QList<Track*> tracks_;
787  QList<Page*> pages_;
788  QList<Line*> lines_;
789  QList<Measure*> measures_;
790  QList<MeasureData*> measureDatas_;
791  int trackBarCount_; //equal to measures_.size()
792 
793  QList<int> partStaffCounts_;
794  QTextCodec* codec_;
795  };
796 
797 class Voice {
798 public:
799  Voice();
800  ~Voice(){}
801 
802 public:
803  void setChannel(int channel);
804  int getChannel() const;
805 
806  void setVolume(int volume);
807  int getVolume() const;
808 
809  void setPitchShift(int pitchShift);
810  int getPitchShift() const;
811 
812  void setPan(int pan);
813  int getPan() const;
814 
815  void setPatch(int patch);
816  int getPatch() const;
817 
818  void setStemType(int stemType);
819  int getStemType() const;
820 
821  static int getDefaultPatch();
822  static int getDefaultVolume();
823 
824 private:
825  int channel_; // [0, 15]
826  int volume_; // [-1, 127], -1 default
827  int pitchShift_; // [-36, 36]
828  int pan_; // [-64, 63]
829  int patch_; // [0, 127]
830  int stemType_; // 0, 1, 2
831  };
832 
833 class Track {
834 public:
835  Track();
836  ~Track();
837 
838 public:
839  void setName(const QString& str);
840  QString getName(void) const;
841 
842  void setBriefName(const QString& str);
843  QString getBriefName(void) const;
844 
845  void setPatch(unsigned int patch); // -1: percussion
846  unsigned int getPatch() const;
847 
848  void setChannel(int channel);
849  int getChannel() const;
850 
851  void setShowName(bool show);
852  bool getShowName() const;
853 
854  void setShowBriefName(bool show);
855  bool getShowBriefName() const;
856 
857  void setMute(bool mute);
858  bool getMute() const;
859 
860  void setSolo(bool solo);
861  bool getSolo() const;
862 
863  void setShowKeyEachLine(bool show);
864  bool getShowKeyEachLine() const;
865 
866  void setVoiceCount(int voices);
867  int getVoiceCount() const;
868 
869  void addVoice(Voice* voice);
870  QList<Voice*> getVoices() const;
871 
872  void setShowTranspose(bool show);
873  bool getShowTranspose() const;
874 
875  void setTranspose(int transpose);
876  int getTranspose() const;
877 
878  void setNoteShift(int shift);
879  int getNoteShift() const;
880 
881  void setStartClef(int clef/*in ClefType*/);
882  ClefType getStartClef() const;
883 
884  void setTransposeClef(int clef/*in ClefType*/);
885  ClefType getTansposeClef() const;
886 
887  void setStartKey(int key/*in KeyType*/);
888  int getStartKey() const;
889 
890  void setDisplayPercent(unsigned int percent/*25~100*/);
891  unsigned int getDisplayPercent() const;
892 
893  void setShowLegerLine(bool show);
894  bool getShowLegerLine() const;
895 
896  void setShowClef(bool show);
897  bool getShowClef() const;
898 
899  void setShowTimeSignature(bool show);
900  bool getShowTimeSignature() const;
901 
902  void setShowKeySignature(bool show);
903  bool getShowKeySignature() const;
904 
905  void setShowBarline(bool show);
906  bool getShowBarline() const;
907 
908  void setFillWithRest(bool fill);
909  bool getFillWithRest() const;
910 
911  void setFlatTail(bool flat);
912  bool getFlatTail() const;
913 
914  void setShowClefEachLine(bool show);
915  bool getShowClefEachLine() const;
916 
917  struct DrumNode {
918  int line_;
920  int pitch_;
921  int voice_;
922 
923  public:
924  DrumNode():line_(0), headType_(0), pitch_(0), voice_(0){}
925  };
926  void addDrum(const DrumNode& node);
927  QList<DrumNode> getDrumKit() const;
928 
929  void clear(void);
930 
932  void setPart(int part);
933  int getPart() const;
934 
935 private:
936  int number_;
937  QString name_;
938  QString briefName_;
939  unsigned int patch_;
940  int channel_;
946  unsigned int displayPercent_;
949  QList<Voice*> voices_;
950 
951  bool showName_;
955  bool showClef_;
960 
962  bool flatTail_;
963 
964  bool mute_;
965  bool solo_;
966 
967  QList<DrumNode> drumKit_;
968 
970  int part_;
971  };
972 
973 class Page {
974 public:
975  Page();
976  ~Page(){}
977 
978 public:
979  void setBeginLine(int line);
980  int getBeginLine() const;
981 
982  void setLineCount(int count);
983  int getLineCount() const;
984 
985  void setLineInterval(int interval); // between system
986  int getLineInterval() const;
987 
988  void setStaffInterval(int interval);
989  int getStaffInterval() const;
990 
991  void setStaffInlineInterval(int interval); // between treble-bass staff
992  int getStaffInlineInterval() const;
993 
994  void setLineBarCount(int count);
995  int getLineBarCount() const;
996 
997  void setPageLineCount(int count);
998  int getPageLineCount() const;
999 
1000  void setLeftMargin(int margin);
1001  int getLeftMargin() const;
1002 
1003  void setTopMargin(int margin);
1004  int getTopMargin() const;
1005 
1006  void setRightMargin(int margin);
1007  int getRightMargin() const;
1008 
1009  void setBottomMargin(int margin);
1010  int getBottomMargin() const;
1011 
1012  void setPageWidth(int width);
1013  int getPageWidth() const;
1014 
1015  void setPageHeight(int height);
1016  int getPageHeight() const;
1017 
1018 private:
1021 
1025 
1028 
1033 
1036  };
1037 
1038 class Line {
1039 public:
1040  Line();
1041  ~Line();
1042 
1043 public:
1044  void addStaff(Staff* staff);
1045  int getStaffCount() const;
1046  Staff* getStaff(int idx) const;
1047 
1048  void setBeginBar(unsigned int bar);
1049  unsigned int getBeginBar() const;
1050 
1051  void setBarCount(unsigned int count);
1052  unsigned int getBarCount() const;
1053 
1054  void setYOffset(int offset);
1055  int getYOffset() const;
1056 
1057  void setLeftXOffset(int offset);
1058  int getLeftXOffset() const;
1059 
1060  void setRightXOffset(int offset);
1061  int getRightXOffset() const;
1062 
1063 private:
1064  QList<Staff*> staffs_;
1065  unsigned int beginBar_;
1066  unsigned int barCount_;
1070  };
1071 
1072 class Staff : public OffsetElement {
1073 public:
1074  Staff();
1075  virtual ~Staff(){}
1076 
1077 public:
1078  void setClefType(int clef);
1079  ClefType getClefType() const;
1080 
1081  void setKeyType(int key);
1082  int getKeyType() const;
1083 
1084  void setVisible(bool visible);
1085  bool setVisible() const;
1086 
1087  void setGroupType(GroupType type);
1088  GroupType getGroupType() const;
1089 
1090  void setGroupStaffCount(int count);
1091  int getGroupStaffCount() const;
1092 
1093 private:
1095  int key_;
1096  bool visible_;
1099  };
1100 
1102 
1103 class Note : public LineElement {
1104 public:
1105  Note();
1106  virtual ~Note(){}
1107 
1108 public:
1109  void setIsRest(bool rest);
1110  bool getIsRest() const;
1111 
1112  void setNote(unsigned int note);
1113  unsigned int getNote() const;
1114 
1115  void setAccidental(int type); //AccidentalType
1116  AccidentalType getAccidental() const;
1117 
1118  void setShowAccidental(bool show);
1119  bool getShowAccidental() const;
1120 
1121  void setOnVelocity(unsigned int velocity);
1122  unsigned int getOnVelocity() const;
1123 
1124  void setOffVelocity(unsigned int velocity);
1125  unsigned int getOffVelocity() const;
1126 
1127  void setHeadType(int type); //NoteHeadType
1128  NoteHeadType getHeadType() const;
1129 
1130  void setTiePos(int tiePos);
1131  TiePos getTiePos() const;
1132 
1133  void setOffsetStaff(int offset); // cross staff notes
1134  int getOffsetStaff() const;
1135 
1136  void setShow(bool show);
1137  bool getShow() const;
1138 
1139  void setOffsetTick(int offset);
1140  int getOffsetTick() const;
1141 
1142 private:
1143  bool rest_;
1144  unsigned int note_;
1147  unsigned int onVelocity_;
1148  unsigned int offVelocity_;
1152  bool show_;
1153  int offsetTick_;//for playback
1154  };
1155 
1156 class Articulation : public OffsetElement {
1157 public:
1158  Articulation();
1159  virtual ~Articulation(){}
1160 
1161 public:
1162  void setArtType(int type);//ArticulationType
1163  ArticulationType getArtType() const;
1164 
1165  void setPlacementAbove(bool above);
1166  bool getPlacementAbove() const;
1167 
1168  // for midi
1169  bool willAffectNotes() const;
1170 
1171  static bool isTrill(ArticulationType type);
1172 
1173  // for xml
1174  enum class XmlType : char {
1175  Articulation,
1176  Technical,
1177  Arpeggiate,
1178  Ornament,
1179  Fermata,
1180  Direction,
1181 
1182  Unknown
1183  };
1184  XmlType getXmlType() const;
1185 
1186  // sound setting
1187  bool getChangeSoundEffect() const;
1188  void setSoundEffect(int soundFrom, int soundTo);
1189  QPair<int, int> getSoundEffect() const;
1190 
1191  bool getChangeLength() const;
1192  void setLengthPercentage(int percentage);
1193  int getLengthPercentage() const;
1194 
1195  bool getChangeVelocity() const;
1196  enum class VelocityType : char {
1197  Offset,
1198  SetValue,
1199  Percentage
1200  };
1201  void setVelocityType(VelocityType type);
1202  VelocityType getVelocityType() const;
1203 
1204  void setVelocityValue(int value);
1205  int getVelocityValue() const;
1206 
1207  bool getChangeExtraLength() const;
1208  void setExtraLength(int length);
1209  int getExtraLength() const;
1210 
1211  // trill
1212  enum class TrillInterval : char {
1213  Diatonic = 0,
1214  Chromatic,
1215  Whole
1216  };
1217  void setTrillInterval(int interval);
1218  TrillInterval getTrillInterval() const;
1219 
1220  void setAuxiliaryFirst(bool first);
1221  bool getAuxiliaryFirst() const;
1222 
1223  void setTrillRate(NoteType rate);
1224  NoteType getTrillRate() const;
1225 
1226  void setTrillNoteLength(int length);
1227  int getTrillNoteLength() const;
1228 
1229  enum class AccelerateType : char {
1230  None = 0 ,
1231  Slow,
1232  Normal,
1233  Fast
1234  };
1235  void setAccelerateType(int type);
1236  AccelerateType getAccelerateType() const;
1237 
1238 private:
1240  bool above_;
1241 
1243  QPair<int, int> soundEffect_;
1251 
1252  // trill
1258  };
1259 
1260 class NoteContainer : public MusicData, public LengthElement {
1261 public:
1262  NoteContainer();
1263  virtual ~NoteContainer();
1264 
1265 public:
1266  void setIsGrace(bool grace);
1267  bool getIsGrace() const;
1268 
1269  void setIsCue(bool cue);
1270  bool getIsCue() const;
1271 
1272  void setIsRest(bool rest/*or note*/);
1273  bool getIsRest() const;
1274 
1275  void setIsRaw(bool raw);
1276  bool getIsRaw() const;
1277 
1278  void setNoteType(NoteType type);
1279  NoteType getNoteType() const;
1280 
1281  void setDot(int dot);
1282  int getDot() const;
1283 
1284  void setGraceNoteType(NoteType type);
1285  NoteType getGraceNoteType() const;
1286 
1287  void setInBeam(bool in);
1288  bool getInBeam() const;
1289 
1290  void setStemUp(bool up);
1291  bool getStemUp(void) const;
1292 
1293  void setShowStem(bool show);
1294  bool getShowStem() const;
1295 
1296  void setStemLength(int line);
1297  int getStemLength() const;
1298 
1299  void setTuplet(int tuplet);
1300  int getTuplet() const;
1301 
1302  void setSpace(int space);
1303  int getSpace() const;
1304 
1305  void addNoteRest(Note* note);
1306  QList<Note*> getNotesRests() const;
1307 
1308  void addArticulation(Articulation* art);
1309  QList<Articulation*> getArticulations() const;
1310 
1311  void setNoteShift(int octave);
1312  int getNoteShift() const;
1313 
1314  int getOffsetStaff() const;
1315 
1316  int getDuration() const;
1317 
1318 private:
1319  bool grace_;
1320  bool cue_;
1321  bool rest_;
1322  bool raw_;
1324  int dot_;
1326  int tuplet_;
1327  int space_;
1328  bool inBeam_;
1329  bool stemUp_;
1331  int stemLength_; // line count span
1333 
1334  QList<Note*> notes_;
1335  QList<Articulation*> articulations_;
1336  };
1337 
1338 class Beam : public MusicData, public PairEnds {
1339 public:
1340  Beam();
1341  virtual ~Beam(){}
1342 
1343 public:
1344  void setIsGrace(bool grace);
1345  bool getIsGrace() const;
1346 
1347  void addLine(const MeasurePos& startMp, const MeasurePos& endMp);
1348  const QList<QPair<MeasurePos, MeasurePos> > getLines() const;
1349 
1350 private:
1351  bool grace_;
1352  QList<QPair<MeasurePos, MeasurePos> > lines_;
1353  };
1354 
1355 class Tie : public MusicData, public PairEnds {
1356 public:
1357  Tie();
1358  virtual ~Tie(){}
1359 
1360 public:
1361  void setShowOnTop(bool top);
1362  bool getShowOnTop() const;
1363 
1364  void setNote(int note);// note value tie point to
1365  int getNote() const;
1366 
1367  void setHeight(int height);
1368  int getHeight() const;
1369 
1370 private:
1372  int note_;
1373  int height_;
1374  };
1375 
1376 class Glissando : public MusicData, public PairEnds {
1377 public:
1378  Glissando();
1379  virtual ~Glissando(){}
1380 
1381 public:
1382  void setStraightWavy(bool straight);
1383  bool getStraightWavy() const;
1384 
1385  void setText(const QString& text);
1386  QString getText() const;
1387 
1388  void setLineThick(int thick);
1389  int getLineThick() const;
1390 
1391 private:
1393  QString text_;
1395  };
1396 
1397 class Decorator : public MusicData {
1398 public:
1399  Decorator();
1400  virtual ~Decorator(){}
1401 
1402 public:
1403  enum class Type : char {
1404  Dotted_Barline = 0,
1405  Articulation
1406  };
1407  void setDecoratorType(Type type);
1408  Type getDecoratorType() const;
1409 
1410  void setArticulationType(ArticulationType type);
1411  ArticulationType getArticulationType() const;
1412 
1413 private:
1416  };
1417 
1418 class MeasureRepeat : public MusicData {
1419 public:
1420  MeasureRepeat();
1421  virtual ~MeasureRepeat(){}
1422 
1423 public:
1424  void setSingleRepeat(bool single); // false : double
1425  bool getSingleRepeat() const;
1426 
1427 private:
1429  };
1430 
1431 class Tuplet : public MusicData, public PairEnds {
1432 public:
1433  Tuplet();
1434  virtual ~Tuplet();
1435 
1436 public:
1437  void setTuplet(int tuplet=3);
1438  int getTuplet() const;
1439 
1440  void setSpace(int space=2);
1441  int getSpace() const;
1442 
1443  void setHeight(int height);
1444  int getHeight() const;
1445 
1446  void setNoteType(NoteType type);
1447  NoteType getNoteType() const;
1448 
1449  OffsetElement* getMarkHandle() const;
1450 
1451 private:
1452  int tuplet_;
1453  int space_;
1454  int height_;
1457  };
1458 
1459 class Harmony : public MusicData, public LengthElement {
1460 public:
1461  Harmony();
1462  virtual ~Harmony(){}
1463 
1464 public:
1465  void setHarmonyType(QString type);
1466  QString getHarmonyType() const;
1467 
1468  void setRoot(int root=0);//C
1469  int getRoot() const;
1470 
1471  void setBass(int bass);
1472  int getBass() const;
1473 
1474  void setAlterRoot(int val);
1475  int getAlterRoot() const;
1476 
1477  void setAlterBass(int val);
1478  int getAlterBass() const;
1479 
1480  void setBassOnBottom(bool on);
1481  bool getBassOnBottom() const;
1482 
1483  void setAngle(int angle);
1484  int getAngle() const;
1485 
1486 private:
1487  QString harmonyType_;
1488  int root_;
1489  int bass_;
1493  int angle_;
1494  };
1495 
1496 class Clef : public MusicData, public LineElement {
1497 public:
1498  Clef();
1499  virtual ~Clef(){}
1500 
1501 public:
1502  void setClefType(int type); // ClefType
1503  ClefType getClefType() const;
1504 
1505 private:
1507  };
1508 
1509 class Lyric : public MusicData {
1510 public:
1511  Lyric();
1512  virtual ~Lyric(){}
1513 
1514 public:
1515  void setLyric(const QString& lyricText);
1516  QString getLyric() const;
1517 
1518  void setVerse(int verse);
1519  int getVerse() const;
1520 
1521 private:
1522  QString lyric_;
1523  int verse_;
1524  };
1525 
1526 class Slur: public MusicData, public PairEnds {
1527 public:
1528  Slur();
1529  virtual ~Slur();
1530 
1531 public:
1532  void setContainerCount(int count); // span
1533  int getContainerCount() const;
1534 
1535  void setShowOnTop(bool top);
1536  bool getShowOnTop() const;
1537 
1538  OffsetElement* getHandle2() const;
1539  OffsetElement* getHandle3() const;
1540 
1541  void setNoteTimePercent(int percent); // 50% ~ 200%
1542  int getNoteTimePercent() const;
1543 
1544 private:
1550  };
1551 
1552 class Dynamics: public MusicData {
1553 public:
1554  Dynamics();
1555  virtual ~Dynamics() {}
1556 
1557 public:
1558  void setDynamicsType(int type);//DynamicsType
1559  DynamicsType getDynamicsType() const;
1560 
1561  void setIsPlayback(bool play);
1562  bool getIsPlayback() const;
1563 
1564  void setVelocity(int vel);
1565  int getVelocity() const;
1566 
1567 private:
1571  };
1572 
1573 class WedgeEndPoint: public MusicData {
1574 public:
1575  WedgeEndPoint();
1576  virtual ~WedgeEndPoint() {}
1577 
1578 public:
1579  void setWedgeType(WedgeType type);
1580  WedgeType getWedgeType() const;
1581 
1582  void setHeight(int height);
1583  int getHeight() const;
1584 
1585  void setWedgeStart(bool wedgeStart);
1586  bool getWedgeStart() const;
1587 
1588 private:
1589  int height_;
1592  };
1593 
1594 class Wedge: public MusicData {
1595 public:
1596  Wedge();
1597  virtual ~Wedge() {}
1598 
1599 public:
1600  void setWedgeType(WedgeType type);
1601  WedgeType getWedgeType() const;
1602 
1603  void setHeight(int height);
1604  int getHeight() const;
1605 
1606 private:
1607  int height_;
1609  };
1610 
1611 class Pedal: public MusicData, public PairEnds {
1612 public:
1613  Pedal();
1614  virtual ~Pedal();
1615 
1616 public:
1617  void setHalf(bool half);
1618  bool getHalf() const;
1619 
1620  void setIsPlayback(bool playback);
1621  bool getIsPlayback() const;
1622 
1623  void setPlayOffset(int offset); // -127~127
1624  int getPlayOffset() const;
1625 
1626  OffsetElement* getPedalHandle() const; //only on half pedal
1627 
1628 private:
1629  bool half_;
1633  };
1634 
1635 class KuoHao: public MusicData, public PairEnds {
1636 public:
1637  KuoHao();
1638  virtual ~KuoHao() {}
1639 
1640 public:
1641  void setHeight(int height);
1642  int getHeight() const;
1643 
1644  void setKuohaoType(int type);// KuoHaoType
1645  KuoHaoType getKuohaoType() const;
1646 
1647 private:
1648  int height_;
1650  };
1651 
1652 class Expressions: public MusicData {
1653 public:
1654  Expressions();
1655  virtual ~Expressions() {}
1656 
1657 public:
1658  void setText(const QString& str);
1659  QString getText() const;
1660 
1661 private:
1662  QString text_;
1663  };
1664 
1665 class HarpPedal: public MusicData {
1666 public:
1667  HarpPedal();
1668  virtual ~HarpPedal() {}
1669 
1670 public:
1671  void setShowType(int type);//0:graph, 1:char, 2:char cut, 3:change
1672  int getShowType() const;
1673 
1674  void setShowCharFlag(int flag);//each bit is a bool, total 7 bools
1675  int getShowCharFlag() const;
1676 
1677 private:
1680  };
1681 
1682 class OctaveShift: public MusicData, public LengthElement {
1683 public:
1684  OctaveShift();
1685  virtual ~OctaveShift() {}
1686 
1687 public:
1688  void setOctaveShiftType(OctaveShiftType type);
1689  OctaveShiftType getOctaveShiftType() const;
1690 
1691  void setOctaveShiftPosition(OctaveShiftPosition position);
1692  OctaveShiftPosition getOctaveShiftPosition() const;
1693 
1694  int getNoteShift() const;
1695 
1696  void setEndTick(int tick);
1697  int getEndTick() const;
1698 
1699 private:
1703  };
1704 
1706 public:
1709 
1710 public:
1711  void setOctaveShiftType(OctaveShiftType type);
1712  OctaveShiftType getOctaveShiftType() const;
1713 
1714  void setOctaveShiftPosition(OctaveShiftPosition position);
1715  OctaveShiftPosition getOctaveShiftPosition() const;
1716 
1717  void setEndTick(int tick);
1718  int getEndTick() const;
1719 
1720 private:
1724  };
1725 
1727 public:
1728  MultiMeasureRest();
1729  virtual ~MultiMeasureRest() {}
1730 
1731 public:
1732  void setMeasureCount(int count);
1733  int getMeasureCount() const;
1734 
1735 private:
1737  };
1738 
1739 class Tempo: public MusicData {
1740 public:
1741  Tempo();
1742  virtual ~Tempo() {}
1743 
1744 public:
1745  void setLeftNoteType(int type);//NoteType
1746  NoteType getLeftNoteType() const;
1747 
1748  void setShowMark(bool show);
1749  bool getShowMark() const;
1750 
1751  void setShowBeforeText(bool show);
1752  bool getShowBeforeText() const;
1753 
1754  void setShowParenthesis(bool show);
1755  bool getShowParenthesis() const;
1756 
1757  void setTypeTempo(double tempo); //0x2580 = 96.00
1758  double getTypeTempo() const;
1759  double getQuarterTempo() const;
1760 
1761  void setLeftText(const QString& str);// string at left of the mark
1762  QString getLeftText() const;
1763 
1764  void setRightText(const QString& str);
1765  QString getRightText() const;
1766 
1767  void setSwingEighth(bool swing);
1768  bool getSwingEighth() const;
1769 
1770  void setRightNoteType(int type);
1771  NoteType getRightNoteType() const;
1772 
1773  void setLeftNoteDot(bool showDot);
1774  bool getLeftNoteDot() const;
1775 
1776  void setRightNoteDot(bool showDot);
1777  bool getRightNoteDot() const;
1778 
1779  void setRightSideType(int type);
1780  int getRightSideType() const;
1781 
1782 private:
1787  double typeTempo_;
1788  QString leftText_;
1789  QString rightText_;
1795  };
1796 
1797 class Text: public MusicData, public LengthElement {
1798 public:
1799  Text();
1800  virtual ~Text() {}
1801 
1802 public:
1803  enum class Type : char {
1804  Rehearsal,
1805  SystemText,
1806  MeasureText
1807  };
1808 
1809  void setTextType(Type type);
1810  Type getTextType() const;
1811 
1812  void setHorizontalMargin(int margin);
1813  int getHorizontalMargin() const;
1814 
1815  void setVerticalMargin(int margin);
1816  int getVerticalMargin() const;
1817 
1818  void setLineThick(int thick);
1819  int getLineThick() const;
1820 
1821  void setText(const QString& text);
1822  QString getText() const;
1823 
1824  void setWidth(int width);
1825  int getWidth() const;
1826 
1827  void setHeight(int height);
1828  int getHeight() const;
1829 
1830 private:
1835  QString text_;
1836  int width_;
1837  int height_;
1838  };
1839 
1841 
1842 class TimeSignature: public MusicData {
1843 public:
1844  TimeSignature();
1845  virtual ~TimeSignature() {}
1846 
1847 public:
1848  void setNumerator(int numerator);
1849  int getNumerator() const;
1850 
1851  void setDenominator(int denominator);
1852  int getDenominator() const;
1853 
1854  void setIsSymbol(bool symbol); //4/4:common, 2/2:cut
1855  bool getIsSymbol() const;
1856 
1857  void setBeatLength(int length); // tick
1858  int getBeatLength() const;
1859 
1860  void setBarLength(int length); // tick
1861  int getBarLength() const;
1862 
1863  void addBeat(int startUnit, int lengthUnit, int startTick);
1864  void endAddBeat();
1865  int getUnits() const;
1866 
1867  void setReplaceFont(bool replace);
1868  bool getReplaceFont() const;
1869 
1870  void setShowBeatGroup(bool show);
1871  bool getShowBeatGroup() const;
1872 
1873  void setGroupNumerator1(int numerator);
1874  void setGroupNumerator2(int numerator);
1875  void setGroupNumerator3(int numerator);
1876  void setGroupDenominator1(int denominator);
1877  void setGroupDenominator2(int denominator);
1878  void setGroupDenominator3(int denominator);
1879 
1880  void setBeamGroup1(int count);
1881  void setBeamGroup2(int count);
1882  void setBeamGroup3(int count);
1883  void setBeamGroup4(int count);
1884 
1885  void set16thBeamCount(int count);
1886  void set32thBeamCount(int count);
1887 
1888 private:
1894 
1895  struct BeatNode {
1899 
1901  startUnit_(0),
1902  lengthUnit_(0),
1903  startTick_(0) {
1904  }
1905  };
1906  QList<BeatNode> beats_;
1908 
1911 
1918 
1923 
1926  };
1927 
1928 class Key: public MusicData {
1929 public:
1930  Key();
1931  virtual ~Key() {}
1932 
1933 public:
1934  void setKey(int key); //C=0x0, G=0x8, C#=0xE, F=0x1, Db=0x7
1935  int getKey() const;
1936  bool getSetKey() const;
1937 
1938  void setPreviousKey(int key);
1939  int getPreviousKey() const;
1940 
1941  void setSymbolCount(int count);
1942  int getSymbolCount() const;
1943 
1944 private:
1945  int key_;
1946  bool set_;
1949  };
1950 
1951 class RepeatSymbol: public MusicData {
1952 public:
1953  RepeatSymbol();
1954  virtual ~RepeatSymbol() {}
1955 
1956 public:
1957  void setText(const QString& text);
1958  QString getText() const;
1959 
1960  void setRepeatType(int repeatType);
1961  RepeatType getRepeatType() const;
1962 
1963 private:
1964  QString text_;
1966  };
1967 
1968 class NumericEnding: public MusicData, public PairEnds {
1969 public:
1970  NumericEnding();
1971  virtual ~NumericEnding();
1972 
1973 public:
1974  OffsetElement* getNumericHandle() const;
1975 
1976  void setHeight(int height);
1977  int getHeight() const;
1978 
1979  void setText(const QString& text);
1980  QString getText() const;
1981  QList<int> getNumbers() const;
1982  int getJumpCount() const;
1983 
1984 private:
1985  int height_;
1986  QString text_;
1988  };
1989 
1990 class BarNumber: public MusicData {
1991 public:
1992  BarNumber();
1993  virtual ~BarNumber() {}
1994 
1995 public:
1996  void setIndex(int index);
1997  int getIndex() const;
1998 
1999  void setShowOnParagraphStart(bool show);
2000  bool getShowOnParagraphStart() const;
2001 
2002  void setAlign(int align);// 0:left, 1:center, 2:right
2003  int getAlign() const;
2004 
2005  void setShowFlag(int flag); // 0:page, 1:staff, 2:bar, 3:none
2006  int getShowFlag() const;
2007 
2008  void setShowEveryBarCount(int count);
2009  int getShowEveryBarCount() const;
2010 
2011  void setPrefix(const QString& str);
2012  QString getPrefix() const;
2013 
2014 private:
2015  int index_;
2017  int align_;
2020  QString prefix_;
2021  };
2022 
2024 // MIDI
2025 class MidiController: public MidiData {
2026 public:
2027  MidiController();
2028  virtual ~MidiController() {}
2029 
2030 public:
2031  void setController(int number);
2032  int getController() const;
2033 
2034  void setValue(int value);
2035  int getValue() const;
2036 
2037 private:
2039  int value_;
2040  };
2041 
2043 public:
2045  virtual ~MidiProgramChange() {}
2046 
2047 public:
2048  void setPatch(int patch);
2049  int getPatch() const;
2050 
2051 private:
2052  int patch_;
2053  };
2054 
2056 public:
2059 
2060 public:
2061  void setPressure(int pressure);
2062  int getPressure() const;
2063 
2064 private:
2066  };
2067 
2068 class MidiPitchWheel: public MidiData {
2069 public:
2070  MidiPitchWheel();
2071  virtual ~MidiPitchWheel() {}
2072 
2073 public:
2074  void setValue(int value);
2075  int getValue() const;
2076 
2077 private:
2078  int value_;
2079  };
2080 
2082 class Measure: public LengthElement {
2083 public:
2084  Measure(int index = 0);
2085  virtual ~Measure();
2086 
2087 private:
2088  Measure();
2089 
2090 public:
2091  BarNumber* getBarNumber() const;
2092  TimeSignature* getTime() const;
2093 
2094  void setLeftBarline(int barline/*in BarLineType*/);
2095  BarLineType getLeftBarline() const;
2096 
2097  void setRightBarline(int barline/*in BarLineType*/);
2098  BarLineType getRightBarline() const;
2099 
2100  // set when rightBarline == Baline_Backward
2101  void setBackwardRepeatCount(int repeatCount);
2102  int getBackwardRepeatCount() const;
2103 
2104  void setTypeTempo(double tempo);
2105  double getTypeTempo() const;
2106 
2107  void setIsPickup(bool pickup);
2108  bool getIsPickup() const;
2109 
2110  void setIsMultiMeasureRest(bool rest);
2111  bool getIsMultiMeasureRest() const;
2112 
2113  void setMultiMeasureRestCount(int count);
2114  int getMultiMeasureRestCount() const;
2115 
2116 private:
2117  void clear();
2118 
2121 
2125  double typeTempo_; // based on some type
2126  bool pickup_;
2129  };
2130 
2132 public:
2133  MeasureData();
2134  ~MeasureData();
2135 
2136 public:
2137  Clef* getClef() const;
2138  Key* getKey() const;
2139 
2140  void addNoteContainer(NoteContainer* ptr);
2141  QList<NoteContainer*> getNoteContainers() const;
2142 
2143  // put Tempo, Text, RepeatSymbol to MeasureData at part=0 && staff=0
2144  void addMusicData(MusicData* ptr);
2145  // if type==MusicData_None, return all
2146  QList<MusicData*> getMusicDatas(MusicDataType type);//MusicXml: note|direction|harmony
2147 
2148  // put NumericEnding to MeasureData at part=0 && staff=0
2149  void addCrossMeasureElement(MusicData* ptr, bool start);
2150  enum class PairType : char {
2151  Start,
2152  Stop,
2153  All
2154  };
2155  QList<MusicData*> getCrossMeasureElements(MusicDataType type, PairType pairType);
2156 
2157  // for midi
2158  void addMidiData(MidiData* ptr);
2159  QList<MidiData*> getMidiDatas(MidiType type);
2160 
2161 private:
2164  QList<MusicData*> musicDatas_;
2165  QList<NoteContainer*> noteContainers_;
2166  QList<QPair<MusicData*, bool> > crossMeasureElements_;
2167  QList<MidiData*> midiDatas_;
2168  };
2169 
2170 // StreamHandle
2172 public:
2173  StreamHandle(unsigned char* p, int size);
2174  virtual ~StreamHandle();
2175 
2176 private:
2177  StreamHandle();
2178 
2179 public:
2180  virtual bool read(char* buff, int size);
2181  virtual bool write(char* buff, int size);
2182 
2183 private:
2184  int size_;
2185  int curPos_;
2186  unsigned char* point_;
2187  };
2188 
2189 // Block.h
2190 // base block, or resizable block in ove to store data
2191 class Block {
2192 public:
2193  Block();
2194  explicit Block(unsigned int size);
2195  virtual ~Block() {
2196  }
2197 
2198 public:
2199  // size > 0, check this in use code
2200  virtual void resize(unsigned int count);
2201 
2202  const unsigned char* data() const;
2203  unsigned char* data();
2204  int size() const;
2205 
2206  bool operator ==(const Block& block) const;
2207  bool operator !=(const Block& block) const;
2208 
2209  bool toBoolean() const;
2210  unsigned int toUnsignedInt() const;
2211  int toInt() const;
2212  QByteArray toStrByteArray() const; // string
2213  QByteArray fixedSizeBufferToStrByteArray() const; // string
2214 
2215 private:
2216  void doResize(unsigned int count);
2217 
2218 private:
2219  // char [-128, 127], unsigned char [0, 255]
2220  QList<unsigned char> data_;
2221  };
2222 
2223 class FixedBlock: public Block {
2224 public:
2225  explicit FixedBlock(unsigned int count);
2226  virtual ~FixedBlock() {
2227  }
2228 
2229 private:
2230  FixedBlock();
2231 
2232 private:
2233  // can't resize
2234  virtual void resize(unsigned int count);
2235  };
2236 
2238 // 4 byte block in ove to store size
2239 class SizeBlock: public FixedBlock {
2240 public:
2241  SizeBlock();
2242  virtual ~SizeBlock() {
2243  }
2244 
2245 public:
2246  // void fromUnsignedInt(unsigned int count) ;
2247 
2248  unsigned int toSize() const;
2249  };
2250 
2251 // 4 bytes block in ove to store name
2252 class NameBlock: public FixedBlock {
2253 public:
2254  NameBlock();
2255  virtual ~NameBlock() {
2256  }
2257 
2258 public:
2259  // ignore data more than 4 bytes
2260  bool isEqual(const QString& name) const;
2261  };
2262 
2263 // 2 bytes block in ove to store count
2264 class CountBlock: public FixedBlock {
2265 public:
2266  CountBlock();
2267  virtual ~CountBlock() {
2268  }
2269 
2270 public:
2271  // void setValue(unsigned short count) ;
2272 
2273  unsigned short toCount() const;
2274  };
2275 
2276 // Chunk.h
2277 // content : name
2278 class Chunk {
2279 public:
2280  Chunk();
2281  virtual ~Chunk() {
2282  }
2283 
2284 public:
2285  const static QString TrackName;
2286  const static QString PageName;
2287  const static QString LineName;
2288  const static QString StaffName;
2289  const static QString MeasureName;
2290  const static QString ConductName;
2291  const static QString BdatName;
2292 
2293  NameBlock getName() const;
2294 
2295 protected:
2297  };
2298 
2299 // content : name / size / data
2300 class SizeChunk: public Chunk {
2301 public:
2302  SizeChunk();
2303  virtual ~SizeChunk();
2304 
2305 public:
2306  SizeBlock* getSizeBlock() const;
2307  Block* getDataBlock() const;
2308 
2309  const static unsigned int version3TrackSize;
2310 
2311 protected:
2314  };
2315 
2316 // content : name / count
2317 class GroupChunk: public Chunk {
2318 public:
2319  GroupChunk();
2320  virtual ~GroupChunk();
2321 
2322 public:
2323  CountBlock* getCountBlock() const;
2324 
2325 protected:
2327  };
2328 
2329 // ChunkParse.h
2330 class BasicParse {
2331 public:
2332  BasicParse(OveSong* ove);
2333  virtual ~BasicParse();
2334 
2335 private:
2336  BasicParse();
2337 
2338 public:
2339  void setNotify(IOveNotify* notify);
2340  virtual bool parse();
2341 
2342 protected:
2343  bool readBuffer(Block& placeHolder, int size);
2344  bool jump(int offset);
2345 
2346  void messageOut(const QString& str);
2347 
2348 protected:
2352  };
2353 
2355 
2356 class OvscParse: public BasicParse {
2357 public:
2358  OvscParse(OveSong* ove);
2359  virtual ~OvscParse();
2360 
2361 public:
2362  void setOvsc(SizeChunk* chunk);
2363 
2364  virtual bool parse();
2365 
2366 private:
2368  };
2369 
2370 class TrackParse: public BasicParse {
2371 public:
2372  TrackParse(OveSong* ove);
2373  virtual ~TrackParse();
2374 
2375 public:
2376  void setTrack(SizeChunk* chunk);
2377 
2378  virtual bool parse();
2379 
2380 private:
2382  };
2383 
2385 public:
2386  GroupParse(OveSong* ove);
2387  virtual ~GroupParse();
2388 
2389 public:
2390  void addSizeChunk(SizeChunk* sizeChunk);
2391 
2392  virtual bool parse();
2393 
2394 private:
2395  QList<SizeChunk*> sizeChunks_;
2396  };
2397 
2399 public:
2400  PageGroupParse(OveSong* ove);
2401  virtual ~PageGroupParse();
2402 
2403 public:
2404  void addPage(SizeChunk* chunk);
2405 
2406  virtual bool parse();
2407 
2408 private:
2409  bool parsePage(SizeChunk* chunk, Page* page);
2410 
2411 private:
2412  QList<SizeChunk*> pageChunks_;
2413  };
2414 
2416 public:
2417  StaffCountGetter(OveSong* ove);
2418  virtual ~StaffCountGetter() {}
2419 
2420 public:
2421  unsigned int getStaffCount(SizeChunk* chunk);
2422  };
2423 
2425 public:
2426  LineGroupParse(OveSong* ove);
2427  virtual ~LineGroupParse();
2428 
2429 public:
2430  void setLineGroup(GroupChunk* chunk);
2431  void addLine(SizeChunk* chunk);
2432  void addStaff(SizeChunk* chunk);
2433 
2434  virtual bool parse();
2435 
2436 private:
2437  bool parseLine(SizeChunk* chunk, Line* line);
2438  bool parseStaff(SizeChunk* chunk, Staff* staff);
2439 
2440 private:
2442  QList<SizeChunk*> lineChunks_;
2443  QList<SizeChunk*> staffChunks_;
2444  };
2445 
2446 class BarsParse: public BasicParse {
2447 public:
2448  BarsParse(OveSong* ove);
2449  virtual ~BarsParse();
2450 
2451 public:
2452  void addMeasure(SizeChunk* chunk);
2453  void addConduct(SizeChunk* chunk);
2454  void addBdat(SizeChunk* chunk);
2455 
2456  virtual bool parse();
2457 
2458 private:
2459  bool parseMeas(Measure* measure, SizeChunk* chunk);
2460  bool parseCond(Measure* measure, MeasureData* measureData, SizeChunk* chunk);
2461  bool parseBdat(Measure* measure, MeasureData* measureData, SizeChunk* chunk);
2462 
2463  bool getCondElementType(unsigned int byteData, CondType& type);
2464  bool getBdatElementType(unsigned int byteData, BdatType& type);
2465 
2466  // COND
2467  bool parseTimeSignature(Measure* measure, int length);
2468  bool parseTimeSignatureParameters(Measure* measure, int length);
2469  bool parseRepeatSymbol(MeasureData* measureData, int length);
2470  bool parseNumericEndings(MeasureData* measureData, int length);
2471  bool parseTempo(MeasureData* measureData, int length);
2472  bool parseBarNumber(Measure* measure, int length);
2473  bool parseText(MeasureData* measureData, int length);
2474  bool parseBarlineParameters(Measure* measure, int length);
2475 
2476  // BDAT
2477  bool parseNoteRest(MeasureData* measureData, int length, BdatType type);
2478  bool parseBeam(MeasureData* measureData, int length);
2479  bool parseTie(MeasureData* measureData, int length);
2480  bool parseTuplet(MeasureData* measureData, int length);
2481  bool parseHarmony(MeasureData* measureData, int length);
2482  bool parseClef(MeasureData* measureData, int length);
2483  bool parseLyric(MeasureData* measureData, int length);
2484  bool parseSlur(MeasureData* measureData, int length);
2485  bool parseGlissando(MeasureData* measureData, int length);
2486  bool parseDecorators(MeasureData* measureData, int length);
2487  bool parseDynamics(MeasureData* measureData, int length);
2488  bool parseWedge(MeasureData* measureData, int length);
2489  bool parseKey(MeasureData* measureData, int length);
2490  bool parsePedal(MeasureData* measureData, int length);
2491  bool parseKuohao(MeasureData* measureData, int length);
2492  bool parseExpressions(MeasureData* measureData, int length);
2493  bool parseHarpPedal(MeasureData* measureData, int length);
2494  bool parseMultiMeasureRest(MeasureData* measureData, int length);
2495  bool parseHarmonyGuitarFrame(MeasureData* measureData, int length);
2496  bool parseOctaveShift(MeasureData* measureData, int length);
2497  bool parseMidiController(MeasureData* measureData, int length);
2498  bool parseMidiProgramChange(MeasureData* measureData, int length);
2499  bool parseMidiChannelPressure(MeasureData* measureData, int length);
2500  bool parseMidiPitchWheel(MeasureData* measureData, int length);
2501 
2502  bool parseSizeBlock(int length);
2503  bool parseMidiCommon(MidiData* ptr);
2504  bool parseCommonBlock(MusicData* ptr);
2505  bool parseOffsetCommonBlock(MusicData* ptr);
2506  bool parsePairLinesBlock(PairEnds* ptr); //size==2
2507  bool parseOffsetElement(OffsetElement* ptr);//size==2
2508 
2509 private:
2510  QList<SizeChunk*> measureChunks_;
2511  QList<SizeChunk*> conductChunks_;
2512  QList<SizeChunk*> bdatChunks_;
2513  };
2514 
2516 public:
2517  LyricChunkParse(OveSong* ove);
2518  virtual ~LyricChunkParse() {}
2519 
2520 public:
2521  void setLyricChunk(SizeChunk* chunk);
2522 
2523  virtual bool parse();
2524 
2525 private:
2526  struct LyricInfo {
2527  int track_;
2529  int verse_;
2530  int voice_;
2533  QString name_;
2534  QString lyric_;
2535  int font_;
2538 
2540  track_(0), measure_(0), verse_(0), voice_(0), wordCount_(0),
2541  lyricSize_(0), name_(QString()), lyric_(QString()),
2542  font_(0), fontSize_(12), fontStyle_(0) {}
2543  };
2544 
2545  void processLyricInfo(const LyricInfo& info);
2546 
2547 private:
2549  };
2550 
2552 public:
2553  TitleChunkParse(OveSong* ove);
2554  virtual ~TitleChunkParse() {}
2555 
2556 public:
2557  void setTitleChunk(SizeChunk* chunk);
2558 
2559  virtual bool parse();
2560 
2561 private:
2562  void addToOve(const QString& str, unsigned int titleType);
2563 
2564 private:
2565  unsigned int titleType_;
2566  unsigned int annotateType_;
2567  unsigned int writerType_;
2568  unsigned int copyrightType_;
2569  unsigned int headerType_;
2570  unsigned int footerType_;
2571 
2573  };
2574 
2575 // OveOrganizer.h
2577 public:
2578  OveOrganizer(OveSong* ove) ;
2579  virtual ~OveOrganizer(){}
2580 
2581 public:
2582  void organize() ;
2583 
2584 private:
2585  void organizeAttributes() ;
2586  void organizeTracks() ;
2587  void organizeMeasures() ;
2588  void organizeMeasure(int part, int track, Measure* measure, MeasureData* measureData) ;
2589 
2590  void organizeContainers(int part, int track, Measure* measure, MeasureData* measureData) ;
2591  void organizeMusicDatas(int part, int track, Measure* measure, MeasureData* measureData) ;
2592  void organizeCrossMeasureElements(int part, int track, Measure* measure, MeasureData* measureData) ;
2593 
2594  void organizePairElement(MusicData* data, int part, int track, Measure* measure, MeasureData* measureData) ;
2595  void organizeOctaveShift(OctaveShift* octave, Measure* measure, MeasureData* measureData) ;
2596  void organizeWedge(Wedge* wedge, int part, int track, Measure* measure, MeasureData* measureData) ;
2597 
2598 private:
2600  };
2601 
2602 // OveSerialize.h
2603 class StreamHandle;
2604 class Block;
2605 class NameBlock;
2606 class Chunk;
2607 class SizeChunk;
2608 class GroupChunk;
2609 
2611 public:
2612  OveSerialize();
2613  virtual ~OveSerialize();
2614 
2615 public:
2616  virtual void setOve(OveSong* ove);
2617  virtual void setFileStream(unsigned char* buffer, unsigned int size);
2618  virtual void setNotify(IOveNotify* notify);
2619  virtual bool load(void);
2620 
2621  virtual void release();
2622 
2623 private:
2624  bool readNameBlock(NameBlock& nameBlock);
2625  bool readChunkName(Chunk* chunk, const QString& name);
2626  bool readSizeChunk(SizeChunk* sizeChunk); // contains a SizeChunk and data buffer
2627  bool readDataChunk(Block* block, unsigned int size);
2628  bool readGroupChunk(GroupChunk* groupChunk);
2629 
2630  bool readHeader();
2631  bool readHeadData(SizeChunk* ovscChunk);
2632  bool readTracksData();
2633  bool readPagesData();
2634  bool readLinesData();
2635  bool readBarsData();
2636  bool readOveEnd();
2637 
2638  void messageOutError();
2639  void messageOut(const QString& str);
2640 
2641 private:
2645  };
2646 
2647 }
2648 
2649 #endif
bool showName_
Definition: ove.h:951
bool showOnTop_
Definition: ove.h:1546
int topMargin_
Definition: ove.h:1030
Definition: ove.h:1496
NoteDuration
Definition: ove.h:432
unsigned int barCount_
Definition: ove.h:1066
RepeatType repeatType_
Definition: ove.h:1965
int barLength_
Definition: ove.h:1893
~Page()
Definition: ove.h:976
LineElement * leftLine_
Definition: ove.h:572
virtual ~OctaveShift()
Definition: ove.h:1685
Definition: ove.h:973
bool leftNoteDot_
Definition: ove.h:1792
QPair< int, int > soundEffect_
Definition: ove.h:1243
Definition: ove.h:1928
int lineThick_
Definition: ove.h:1394
int patch_
Definition: ove.h:829
Definition: ove.h:2356
static const QString BdatName
Definition: ove.h:2291
virtual ~Text()
Definition: ove.h:1800
QList< Note * > notes_
Definition: ove.h:1334
Definition: ove.h:1156
int groupNumerator3_
Definition: ove.h:1914
QList< SizeChunk * > bdatChunks_
Definition: ove.h:2512
virtual ~NameBlock()
Definition: ove.h:2255
int space_
Definition: ove.h:1327
int leftNoteType_
Definition: ove.h:1783
virtual ~Tie()
Definition: ove.h:1358
int trackBarCount_
Definition: ove.h:791
Definition: ove.h:1573
OctaveShiftType octaveShiftType_
Definition: ove.h:1700
Swing
Definition: importmidi_operation.h:32
int key_
Definition: ove.h:1095
virtual ~Clef()
Definition: ove.h:1499
Key * key_
Definition: ove.h:2162
bool show_
Definition: ove.h:1152
StreamHandle * handle_
Definition: ove.h:2350
int measureCount_
Definition: ove.h:1736
virtual ~Note()
Definition: ove.h:1106
virtual ~TimeSignature()
Definition: ove.h:1845
int fontSize_
Definition: ove.h:2536
bool showTransposeTrack
Definition: ove.h:772
Key
Definition: key.h:28
int width_
Definition: ove.h:1836
int size_
Definition: ove.h:2184
Definition: ove.h:559
int noteTimePercent_
Definition: ove.h:1547
int root_
Definition: ove.h:1488
QString prefix_
Definition: ove.h:2020
QList< MusicData * > musicDatas_
Definition: ove.h:2164
int showCharFlag_
Definition: ove.h:1679
bool changeVelocity_
Definition: ove.h:1246
unsigned int displayPercent_
Definition: ove.h:946
ArticulationType artType_
Definition: ove.h:1415
int offset_
Definition: ove.h:542
int rightSideType_
Definition: ove.h:1794
int lengthUnit_
Definition: ove.h:1897
Definition: ove.h:2055
virtual ~Articulation()
Definition: ove.h:1159
Type
Definition: ove.h:1803
virtual ~MidiProgramChange()
Definition: ove.h:2045
bool show_
Definition: ove.h:653
bool straight_
Definition: ove.h:1392
int symbolCount_
Definition: ove.h:1948
int pageLineCount_
Definition: ove.h:1027
int alterRoot_
Definition: ove.h:1490
QList< QString > annotates_
Definition: ove.h:780
Definition: ove.h:1594
int barLengthUnits_
Definition: ove.h:1907
bool pickup_
Definition: ove.h:2126
bool above_
Definition: ove.h:1240
int beamGroup1_
Definition: ove.h:1919
int controller_
Definition: ove.h:2038
unsigned int titleType_
Definition: ove.h:2565
NoteType graceNoteType_
Definition: ove.h:1325
Definition: ove.h:1338
Definition: ove.h:1418
WedgeType
Definition: ove.h:382
bool singleRepeat_
Definition: ove.h:1428
virtual ~SizeBlock()
Definition: ove.h:2242
Definition: ove.h:1038
int line_
Definition: ove.h:588
OctaveShiftType
Definition: ove.h:396
int voiceCount_
Definition: ove.h:948
PlayStyle playStyle_
Definition: ove.h:777
bool rightNoteDot_
Definition: ove.h:1793
Definition: ove.h:1652
QString harmonyType_
Definition: ove.h:1487
Definition: ove.h:2384
Type
Definition: ove.h:1403
bool grace_
Definition: ove.h:1319
Definition: ove.h:2610
Definition: voice.h:118
int noteShift_
Definition: ove.h:943
static const unsigned int version3TrackSize
Definition: ove.h:2309
Definition: ove.h:2042
bool showClefEachLine_
Definition: ove.h:959
bool visible_
Definition: ove.h:1096
int xOffset_
Definition: ove.h:604
Definition: ove.h:545
Definition: ove.h:1797
Definition: ove.h:672
static const QString LineName
Definition: ove.h:2287
IOveNotify * notify_
Definition: ove.h:2644
bool showText_
Definition: ove.h:1785
Definition: ove.h:2424
#define DLL_EXPORT
Definition: ove.h:26
Definition: ove.h:2317
int value_
Definition: ove.h:2078
int height_
Definition: ove.h:1648
OctaveShiftPosition octaveShiftPosition_
Definition: ove.h:1701
int lineInterval_
Definition: ove.h:1022
NoteType trillRate_
Definition: ove.h:1255
virtual ~MeasurePos()
Definition: ove.h:521
int value_
Definition: ove.h:2039
int height_
Definition: ove.h:1607
const int INVALID_NOTE
Definition: ove.h:81
virtual ~OffsetElement()
Definition: ove.h:594
int pitch_
Definition: ove.h:920
CountBlock * childCount_
Definition: ove.h:2326
int groupNumerator2_
Definition: ove.h:1913
BeatNode()
Definition: ove.h:1900
Definition: ove.h:1509
bool showColor_
Definition: ove.h:775
int angle_
Definition: ove.h:1493
int containerCount_
Definition: ove.h:1545
virtual ~TickElement()
Definition: ove.h:508
unsigned int headerType_
Definition: ove.h:2569
NoteType noteType_
Definition: ove.h:1323
Definition: ove.h:474
Definition: ove.h:591
Definition: ove.h:2171
int startTick_
Definition: ove.h:1898
int bass_
Definition: ove.h:1489
int leftMargin_
Definition: ove.h:1029
bool playback_
Definition: ove.h:1630
int stemLength_
Definition: ove.h:1331
XmlDataType
Definition: ove.h:630
int lineBarCount_
Definition: ove.h:1026
Type textType_
Definition: ove.h:1831
virtual ~Wedge()
Definition: ove.h:1597
int groupNumerator1_
Definition: ove.h:1912
virtual ~IOVEStreamLoader()
Definition: ove.h:488
OveSong * ove_
Definition: ove.h:2599
bool showRuler_
Definition: ove.h:774
virtual ~Tempo()
Definition: ove.h:1742
static const QString MeasureName
Definition: ove.h:2289
bool showBriefName_
Definition: ove.h:952
bool isSymbol_
Definition: ove.h:1891
ArticulationType
Definition: ove.h:260
bool showLegerLine_
Definition: ove.h:954
Definition: ove.h:2300
DynamicsType dynamicsType_
Definition: ove.h:1568
int curPos_
Definition: ove.h:2185
bool set_
Definition: ove.h:1946
~Voice()
Definition: ove.h:800
int offsetTick_
Definition: ove.h:1153
Definition: ove.h:608
virtual ~FixedBlock()
Definition: ove.h:2226
unsigned int voice_
Definition: ove.h:655
QList< DrumNode > drumKit_
Definition: ove.h:967
bool half_
Definition: ove.h:1629
int numerator_
Definition: ove.h:1889
int startUnit_
Definition: ove.h:1896
int tuplet_
Definition: ove.h:1326
int lineCount_
Definition: ove.h:1020
bool changeLength_
Definition: ove.h:1244
NoteType
Definition: ove.h:343
int pitchShift_
Definition: ove.h:827
Definition: ove.h:2239
int extraLength_
Definition: ove.h:1250
KuoHaoType
Definition: ove.h:390
ClefType transposeClef_
Definition: ove.h:945
int track_
Definition: ove.h:2527
bool stemUp_
Definition: ove.h:1329
const OVE::Tuplet * getTuplet(const QList< OVE::MusicData *> &tuplets, int unit)
Definition: importove.cpp:938
Definition: ove.h:1990
int staffInterval_
Definition: ove.h:1023
unsigned int color_
Definition: ove.h:654
SizeChunk * chunk_
Definition: ove.h:2381
QList< QPair< MeasurePos, MeasurePos > > lines_
Definition: ove.h:1352
Definition: ove.h:797
Definition: ove.h:2223
int index_
Definition: ove.h:2015
AccelerateType accelerateType_
Definition: ove.h:1257
int verse_
Definition: ove.h:2529
OveSong * ove_
Definition: ove.h:2642
int height_
Definition: ove.h:1589
QList< BeatNode > beats_
Definition: ove.h:1906
TrillInterval
Definition: ove.h:1212
DynamicsType
Definition: ove.h:363
Definition: ove.h:1355
int horiMargin_
Definition: ove.h:1832
bool version4_
Definition: ove.h:768
int staffInlineInterval_
Definition: ove.h:1024
TrillInterval trillInterval_
Definition: ove.h:1253
int velocity_
Definition: ove.h:1570
GroupType groupType_
Definition: ove.h:1097
virtual ~Beam()
Definition: ove.h:1341
Definition: ove.h:1726
SizeChunk * chunk_
Definition: ove.h:2548
int rightXOffset_
Definition: ove.h:1069
bool replaceFont_
Definition: ove.h:1909
int alterBass_
Definition: ove.h:1491
Definition: ove.h:2576
QList< Measure * > measures_
Definition: ove.h:789
CondType
Definition: ove.h:84
WedgeType wedgeType_
Definition: ove.h:1608
Definition: ove.h:1459
int space_
Definition: ove.h:1453
unsigned int copyrightType_
Definition: ove.h:2568
Definition: ove.h:2131
Definition: ove.h:1103
int patch_
Definition: ove.h:2052
QList< MeasureData * > measureDatas_
Definition: ove.h:790
int multiMeasureRestCount_
Definition: ove.h:2128
bool showKeySignature_
Definition: ove.h:957
unsigned int beginBar_
Definition: ove.h:1065
LyricInfo()
Definition: ove.h:2539
QString lyric_
Definition: ove.h:2534
unsigned int offVelocity_
Definition: ove.h:1148
TimeSignature * time_
Definition: ove.h:2120
bool showMark_
Definition: ove.h:1784
int fontStyle_
Definition: ove.h:2537
BdatType
Definition: ove.h:97
QString lyric_
Definition: ove.h:1522
int part_
Definition: ove.h:970
QString briefName_
Definition: ove.h:938
Definition: ove.h:2264
virtual ~Dynamics()
Definition: ove.h:1555
const int OCTAVE
Definition: ove.h:82
bool grace_
Definition: ove.h:1351
MidiType
Definition: ove.h:184
int volume_
Definition: ove.h:826
Definition: ove.h:917
OVE::ClefType getClefType(OVE::MeasureData *measure, int tick)
Definition: importove.cpp:1115
int verse_
Definition: ove.h:1523
int measure_
Definition: ove.h:2528
bool getDecoratorType(unsigned int thisByte, bool &measureRepeat, Decorator::Type &decoratorType, bool &singleRepeat, ArticulationType &artType)
Definition: ove.cpp:6113
int previousKey_
Definition: ove.h:1947
virtual ~Key()
Definition: ove.h:1931
virtual ~RepeatSymbol()
Definition: ove.h:1954
virtual ~MultiMeasureRest()
Definition: ove.h:1729
int repeatCount_
Definition: ove.h:2124
QList< QString > copyrights_
Definition: ove.h:782
IOVEStreamLoader()
Definition: ove.h:487
bool playRepeat_
Definition: ove.h:776
Definition: ove.h:505
QList< Staff * > staffs_
Definition: ove.h:1064
OffsetElement * handle_2_
Definition: ove.h:1548
AccidentalType accidental_
Definition: ove.h:1145
int voice_
Definition: ove.h:921
virtual ~IOveNotify()
Definition: ove.h:477
Definition: ove.h:518
OctaveShiftPosition
Definition: ove.h:403
bool inBeam_
Definition: ove.h:1328
int velocityValue_
Definition: ove.h:1248
Definition: ove.h:2191
bool flatTail_
Definition: ove.h:962
int measure_
Definition: ove.h:541
Definition: ove.h:2082
double typeTempo_
Definition: ove.h:2125
QString text_
Definition: ove.h:1662
Definition: ove.h:1951
int tuplet_
Definition: ove.h:1452
static const QString TrackName
Definition: ove.h:2285
OctaveShiftType octaveShiftType_
Definition: ove.h:1721
bool multiMeasureRest_
Definition: ove.h:2127
virtual ~Expressions()
Definition: ove.h:1655
virtual ~HarpPedal()
Definition: ove.h:1668
VelocityType velocityType_
Definition: ove.h:1247
int pressure_
Definition: ove.h:2065
Definition: ove.h:1705
bool swingEighth_
Definition: ove.h:1790
bool raw_
Definition: ove.h:1322
unsigned int patch_
Definition: ove.h:939
int tick_
Definition: ove.h:515
QString text_
Definition: ove.h:1393
QString text_
Definition: ove.h:1986
virtual ~Chunk()
Definition: ove.h:2281
Definition: ove.h:1611
OffsetElement * leftShoulder_
Definition: ove.h:574
int startKey_
Definition: ove.h:947
virtual ~MidiController()
Definition: ove.h:2028
StreamHandle * streamHandle_
Definition: ove.h:2643
bool mute_
Definition: ove.h:964
QList< SizeChunk * > sizeChunks_
Definition: ove.h:2395
virtual ~Decorator()
Definition: ove.h:1400
MeasurePos * start_
Definition: ove.h:555
Definition: ove.cpp:22
OctaveShiftPosition octaveShiftPosition_
Definition: ove.h:1722
bool showTimeSignature_
Definition: ove.h:956
bool showParenthesis_
Definition: ove.h:1786
Definition: ove.h:1260
virtual ~Lyric()
Definition: ove.h:1512
int headType_
Definition: ove.h:919
virtual ~MusicData()
Definition: ove.h:625
BarLineType
Definition: ove.h:422
bool auxiliaryFirst_
Definition: ove.h:1254
virtual ~CountBlock()
Definition: ove.h:2267
unsigned int footerType_
Definition: ove.h:2570
OffsetElement * mark_
Definition: ove.h:1456
QList< SizeChunk * > staffChunks_
Definition: ove.h:2443
virtual ~MeasureRepeat()
Definition: ove.h:1421
BarLineType rightBarline_
Definition: ove.h:2123
Definition: ove.h:485
int playOffset_
Definition: ove.h:1631
int align_
Definition: ove.h:2017
Definition: ove.h:2551
int bottomMargin_
Definition: ove.h:1032
OveSong * ove_
Definition: ove.h:2349
QList< SizeChunk * > pageChunks_
Definition: ove.h:2412
int lineThick_
Definition: ove.h:1834
bool changeSoundEffect_
Definition: ove.h:1242
QList< QString > titles_
Definition: ove.h:779
NoteHeadType headType_
Definition: ove.h:1149
PlayStyle
Definition: ove.h:702
unsigned int annotateType_
Definition: ove.h:2566
GroupChunk * chunk_
Definition: ove.h:2441
unsigned int note_
Definition: ove.h:1144
OffsetElement * handle_3_
Definition: ove.h:1549
int beamGroup3_
Definition: ove.h:1921
virtual ~BarNumber()
Definition: ove.h:1993
virtual ~WedgeEndPoint()
Definition: ove.h:1576
bool cue_
Definition: ove.h:1320
AccidentalType
Definition: ove.h:215
ClefType clefType_
Definition: ove.h:1506
int lyricSize_
Definition: ove.h:2532
virtual ~OveOrganizer()
Definition: ove.h:2579
TiePos
Definition: ove.h:254
RepeatType
Definition: ove.h:409
int note_
Definition: ove.h:1372
bool showBeatGroup_
Definition: ove.h:1910
virtual ~Harmony()
Definition: ove.h:1462
int endTick_
Definition: ove.h:1702
Definition: ove.h:2526
int groupDenominator1_
Definition: ove.h:1915
unsigned int onVelocity_
Definition: ove.h:1147
AccelerateType
Definition: ove.h:1229
int key_
Definition: ove.h:1945
virtual ~Glissando()
Definition: ove.h:1379
NameBlock nameBlock_
Definition: ove.h:2296
int endTick_
Definition: ove.h:1723
SizeBlock * sizeBlock_
Definition: ove.h:2312
bool showOnTop_
Definition: ove.h:1371
Type decoratorType_
Definition: ove.h:1414
QList< QString > writers_
Definition: ove.h:781
QList< Track * > tracks_
Definition: ove.h:786
int rightMargin_
Definition: ove.h:1031
int leftXOffset_
Definition: ove.h:1068
bool rest_
Definition: ove.h:1143
Clef * clef_
Definition: ove.h:2163
QString leftText_
Definition: ove.h:1788
int length_
Definition: ove.h:618
LineElement * rightLine_
Definition: ove.h:573
int height_
Definition: ove.h:1454
Definition: ove.h:658
bool wedgeStart_
Definition: ove.h:1591
Direction
Definition: types.h:282
int channel_
Definition: ove.h:940
XmlType
Definition: ove.h:1174
QList< Line * > lines_
Definition: ove.h:788
int beamCount16th_
Definition: ove.h:1924
Definition: ove.h:1072
bool showLineBreak_
Definition: ove.h:773
VelocityType
Definition: ove.h:1196
QString text_
Definition: ove.h:1835
BarLineType leftBarline_
Definition: ove.h:2122
Definition: ove.h:1526
Definition: ove.h:1552
MidiType midiType_
Definition: ove.h:667
int font_
Definition: ove.h:2535
virtual ~KuoHao()
Definition: ove.h:1638
int beamCount32th_
Definition: ove.h:1925
int beatLength_
Definition: ove.h:1892
MusicDataType
Definition: ove.h:140
QList< int > partStaffCounts_
Definition: ove.h:793
Definition: ove.h:1431
Definition: ove.h:2415
int barRange_
Definition: ove.h:2019
QString rightText_
Definition: ove.h:1789
virtual ~MidiData()
Definition: ove.h:661
static const QString StaffName
Definition: ove.h:2288
int number_
Definition: ove.h:936
int showFlag_
Definition: ove.h:2018
Definition: ove.h:2025
OffsetElement * pedalHandle_
Definition: ove.h:1632
WedgeType wedgeType_
Definition: ove.h:1590
IOveNotify * notify_
Definition: ove.h:2351
int transpose_
Definition: ove.h:941
int height_
Definition: ove.h:1837
QList< SizeChunk * > measureChunks_
Definition: ove.h:2510
Definition: ove.h:578
int beamGroup4_
Definition: ove.h:1922
Definition: ove.h:1397
QList< Voice * > voices_
Definition: ove.h:949
static const QString PageName
Definition: ove.h:2286
int voice_
Definition: ove.h:2530
int pan_
Definition: ove.h:828
Definition: ove.h:1635
virtual ~StaffCountGetter()
Definition: ove.h:2418
int pageHeight_
Definition: ove.h:1035
int vertMargin_
Definition: ove.h:1833
Definition: ove.h:2446
QTextCodec * codec_
Definition: ove.h:794
MeasurePos * stop_
Definition: ove.h:556
virtual ~LengthElement()
Definition: ove.h:611
ClefType clef_
Definition: ove.h:1094
int pageWidth_
Definition: ove.h:1034
IOVEStreamLoader * createOveStreamLoader()
Definition: ove.cpp:8536
virtual ~LyricChunkParse()
Definition: ove.h:2518
Definition: ove.h:2330
int denominator_
Definition: ove.h:1890
KeyType
Definition: ove.h:455
unsigned int writerType_
Definition: ove.h:2567
Definition: ove.h:2515
Definition: ove.h:1682
virtual ~OctaveShiftEndPoint()
Definition: ove.h:1708
virtual ~Staff()
Definition: ove.h:1075
IOveNotify()
Definition: ove.h:476
int beamGroup2_
Definition: ove.h:1920
int channel_
Definition: ove.h:825
NoteType noteType_
Definition: ove.h:1455
bool showPageMargin_
Definition: ove.h:771
QString name_
Definition: ove.h:937
bool showBarline_
Definition: ove.h:958
double typeTempo_
Definition: ove.h:1787
KuoHaoType kuohaoType_
Definition: ove.h:1649
bool showTranspose_
Definition: ove.h:942
Definition: ove.h:622
virtual ~LineElement()
Definition: ove.h:581
int NoteTypeToTick(NoteType type, int quarter)
Definition: ove.h:358
static const QString ConductName
Definition: ove.h:2290
virtual ~MidiChannelPressure()
Definition: ove.h:2058
int stemType_
Definition: ove.h:830
QList< MidiData * > midiDatas_
Definition: ove.h:2167
Definition: ove.h:833
bool playback_
Definition: ove.h:1569
int yOffset_
Definition: ove.h:605
int quarter_
Definition: ove.h:769
bool showKeyEachLine_
Definition: ove.h:953
unsigned char * point_
Definition: ove.h:2186
NoteHeadType
Definition: ove.h:229
Definition: ove.h:2068
QList< Page * > pages_
Definition: ove.h:787
ClefType startClef_
Definition: ove.h:944
bool showAccidental_
Definition: ove.h:1146
BarNumber * barNumber_
Definition: ove.h:2119
int yOffset_
Definition: ove.h:1067
ClefType
Definition: ove.h:192
QList< SizeChunk * > lineChunks_
Definition: ove.h:2442
QList< NoteContainer * > noteContainers_
Definition: ove.h:2165
QList< QPair< MusicData *, bool > > crossMeasureElements_
Definition: ove.h:2166
Definition: ove.h:1376
virtual ~Block()
Definition: ove.h:2195
virtual ~MidiPitchWheel()
Definition: ove.h:2071
QString name_
Definition: ove.h:2533
int rightNoteType_
Definition: ove.h:1791
QString text_
Definition: ove.h:1964
QList< Articulation * > articulations_
Definition: ove.h:1335
bool solo_
Definition: ove.h:965
bool rest_
Definition: ove.h:1321
QList< SizeChunk * > conductChunks_
Definition: ove.h:2511
Block * dataBlock_
Definition: ove.h:2313
int wordCount_
Definition: ove.h:2531
int noteShift_
Definition: ove.h:1332
GroupType
Definition: ove.h:209
Definition: ove.h:1842
bool changeExtraLength_
Definition: ove.h:1249
Staff * getStaff(OveSong *ove, int track)
Definition: ove.cpp:7526
int showType_
Definition: ove.h:1678
ArticulationType type_
Definition: ove.h:1239
virtual ~TitleChunkParse()
Definition: ove.h:2554
int height_
Definition: ove.h:1985
TiePos tiePos_
Definition: ove.h:1150
int trillNoteLength_
Definition: ove.h:1256
SizeChunk * chunk_
Definition: ove.h:2367
Definition: ove.h:2278
Definition: ove.h:2252
bool showStem_
Definition: ove.h:1330
int offsetStaff_
Definition: ove.h:1151
int lengthPercentage_
Definition: ove.h:1245
QList< unsigned char > data_
Definition: ove.h:2220
QList< QString > headers_
Definition: ove.h:783
SizeChunk * chunk_
Definition: ove.h:2572
bool bassOnBottom_
Definition: ove.h:1492
int groupDenominator2_
Definition: ove.h:1916
OffsetElement * rightShoulder_
Definition: ove.h:575
PairType
Definition: ove.h:2150
OffsetElement * numericHandle_
Definition: ove.h:1987
int dot_
Definition: ove.h:1324
bool fillWithRest_
Definition: ove.h:961
Definition: ove.h:1895
int groupDenominator3_
Definition: ove.h:1917
int beginLine_
Definition: ove.h:1019
Definition: ove.h:1739
bool showClef_
Definition: ove.h:955
bool showOnParagraphStart_
Definition: ove.h:2016
int groupStaffCount_
Definition: ove.h:1098
DrumNode()
Definition: ove.h:924
ToneType
Definition: ove.h:445
const int TWELVE_TONE
Definition: ove.h:80
int line_
Definition: ove.h:918
Definition: ove.h:1968
Definition: ove.h:2370
Definition: ove.h:2398
MusicDataType musicDataType_
Definition: ove.h:650
Definition: ove.h:1665
int height_
Definition: ove.h:1373
QList< QString > footers_
Definition: ove.h:784