LibMusicXML  3.18
mxmlTree2MsrTranslator.h
1 /*
2  MusicXML Library
3  Copyright (C) Grame 2006-2013
4 
5  This Source Code Form is subject to the terms of the Mozilla Public
6  License, v. 2.0. If a copy of the MPL was not distributed with this
7  file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
10  research@grame.fr
11 */
12 
13 #ifndef ___mxmlTree2MsrTranslator___
14 #define ___mxmlTree2MsrTranslator___
15 
16 #include "msr.h"
17 
18 
19 namespace MusicXML2
20 {
21 
22 //________________________________________________________________________
24 
25  // score partwise
26 
27  public visitor<S_score_partwise>,
28 
29  // parts
30 
31  public visitor<S_part>,
32 
33  // ???
34 
35  public visitor<S_attributes>,
36 
37  public visitor<S_divisions>,
38 
39  public visitor<S_staves>,
40  public visitor<S_staff>,
41 
42  // staff details
43 
44  public visitor<S_staff_details>,
45  public visitor<S_staff_type>,
46  public visitor<S_staff_lines>,
47  public visitor<S_staff_tuning>,
48  public visitor<S_tuning_step>,
49  public visitor<S_tuning_octave>,
50  public visitor<S_tuning_alter>,
51  public visitor<S_capo>,
52  public visitor<S_staff_size>,
53 
54  // ???
55 
56  public visitor<S_voice>,
57 
58  // backup & forward
59 
60  public visitor<S_backup>,
61  public visitor<S_forward>,
62 
63  // clefs
64 
65  public visitor<S_clef>,
66  public visitor<S_sign>,
67  public visitor<S_line>,
68  public visitor<S_clef_octave_change>,
69 
70  // keys
71 
72  public visitor<S_key>,
73  public visitor<S_cancel>,
74  public visitor<S_fifths>,
75  public visitor<S_mode>,
76  public visitor<S_key_step>,
77  public visitor<S_key_alter>,
78  public visitor<S_key_octave>,
79 
80  // times
81 
82  public visitor<S_time>,
83  public visitor<S_beats>,
84  public visitor<S_beat_type>,
85  public visitor<S_senza_misura>,
86 
87  public visitor<S_interchangeable>,
88  public visitor<S_time_relation>,
89 
90  // ???
91 
92  public visitor<S_instruments>,
93 
94  // transpose
95 
96  public visitor<S_transpose>,
97  public visitor<S_diatonic>,
98  public visitor<S_chromatic>,
99  public visitor<S_octave_change>,
100  public visitor<S_double>,
101 
102  // directions
103 
104  public visitor<S_direction>,
105  public visitor<S_direction_type>,
106  public visitor<S_offset>,
107 
108  public visitor<S_words>,
109 
110  public visitor<S_octave_shift>,
111 
112  public visitor<S_scordatura>,
113  public visitor<S_accord>,
114 
115  // tempo
116 
117  public visitor<S_metronome>,
118  public visitor<S_beat_unit>,
119  public visitor<S_beat_unit_dot>,
120  public visitor<S_per_minute>,
121  public visitor<S_metronome_note>,
122  public visitor<S_metronome_relation>,
123  public visitor<S_metronome_type>,
124  public visitor<S_metronome_beam>,
125  public visitor<S_metronome_dot>,
126  public visitor<S_metronome_tuplet>,
127  public visitor<S_normal_dot>,
128 
129  // ties, slurs, brackets & beams
130 
131  public visitor<S_tied>,
132  public visitor<S_slur>,
133  public visitor<S_bracket>,
134  public visitor<S_beam>,
135 
136  // lyrics
137 
138  public visitor<S_lyric>,
139  public visitor<S_syllabic>,
140  public visitor<S_text>,
141  public visitor<S_elision>,
142  public visitor<S_extend>,
143 
144  // harmonies
145 
146  public visitor<S_degree>,
147  public visitor<S_degree_value>,
148  public visitor<S_degree_alter>,
149  public visitor<S_degree_type>,
150 
151  public visitor<S_harmony>,
152  public visitor<S_root_step>,
153  public visitor<S_root_alter>,
154  public visitor<S_kind>,
155  public visitor<S_inversion>,
156  public visitor<S_bass_step>,
157  public visitor<S_bass_alter>,
158 
159  // frames
160  // ------------------------------------------------------
161 
162  public visitor<S_frame>,
163  public visitor<S_frame_strings>,
164  public visitor<S_frame_frets>,
165  public visitor<S_first_fret>,
166  public visitor<S_frame_note>,
167  public visitor<S_barre>,
168 
169  // figured bass
170 
171  public visitor<S_figured_bass>,
172  public visitor<S_figure>,
173  public visitor<S_prefix>,
174  public visitor<S_figure_number>,
175  public visitor<S_suffix>,
176 
177  // measures
178 
179  public visitor<S_measure>,
180  public visitor<S_print>,
181  public visitor<S_system_layout>,
182  public visitor<S_measure_numbering>,
183 
184  // ???
185 
186  public visitor<S_barline>,
187  public visitor<S_segno>,
188  public visitor<S_coda>,
189  public visitor<S_eyeglasses>,
190  public visitor<S_pedal>,
191  public visitor<S_bar_style>,
192  public visitor<S_repeat>,
193  public visitor<S_ending>,
194 
195  // notes
196 
197  public visitor<S_note>,
198  public visitor<S_step>,
199  public visitor<S_alter>,
200  public visitor<S_octave>,
201  public visitor<S_duration>,
202  public visitor<S_instrument>,
203  public visitor<S_dot>,
204 
205  public visitor<S_rest>,
206 
207  public visitor<S_unpitched>,
208  public visitor<S_display_step>,
209  public visitor<S_display_octave>,
210 
211  public visitor<S_stem>,
212 
213  // note heads
214 
215  public visitor<S_type>,
216  public visitor<S_notehead>,
217  public visitor<S_accidental>,
218 
219  // repeats
220 
221  public visitor<S_measure_style>,
222  public visitor<S_beat_repeat>,
223  public visitor<S_measure_repeat>,
224  public visitor<S_multiple_rest>,
225  public visitor<S_slash>,
226  public visitor<S_slash_type>,
227  public visitor<S_slash_dot>,
228 
229  // articulations
230 
231  public visitor<S_articulations>,
232  public visitor<S_accent>,
233  public visitor<S_breath_mark>,
234  public visitor<S_caesura>,
235  public visitor<S_spiccato>,
236  public visitor<S_staccato>,
237  public visitor<S_staccatissimo>,
238  public visitor<S_stress>,
239  public visitor<S_unstress>,
240  public visitor<S_detached_legato>,
241  public visitor<S_strong_accent>,
242  public visitor<S_tenuto>,
243  public visitor<S_fermata>,
244  public visitor<S_arpeggiate>,
245  public visitor<S_non_arpeggiate>,
246  public visitor<S_doit>,
247  public visitor<S_falloff>,
248  public visitor<S_plop>,
249  public visitor<S_scoop>,
250 
251  // technicals
252 
253  public visitor<S_technical>,
254  public visitor<S_arrow>,
255  public visitor<S_bend>,
256  public visitor<S_bend_alter>,
257  public visitor<S_double_tongue>,
258  public visitor<S_down_bow>,
259  public visitor<S_fingering>,
260  public visitor<S_fingernails>,
261  public visitor<S_fret>,
262  public visitor<S_hammer_on>,
263  public visitor<S_handbell>,
264  public visitor<S_harmonic>,
265  public visitor<S_heel>,
266  public visitor<S_hole>,
267  public visitor<S_open_string>,
268  public visitor<S_other_technical>,
269  public visitor<S_pluck>,
270  public visitor<S_pull_off>,
271  public visitor<S_snap_pizzicato>,
272  public visitor<S_stopped>,
273  public visitor<S_string>,
274  public visitor<S_tap>,
275  public visitor<S_thumb_position>,
276  public visitor<S_toe>,
277  public visitor<S_triple_tongue>,
278  public visitor<S_up_bow>,
279 
280  // ornaments
281 
282  public visitor<S_ornaments>,
283  public visitor<S_trill_mark>,
284  public visitor<S_dashes>,
285  public visitor<S_wavy_line>,
286  public visitor<S_turn>,
287  public visitor<S_inverted_turn>,
288  public visitor<S_delayed_turn>,
289  public visitor<S_delayed_inverted_turn>,
290  public visitor<S_vertical_turn>,
291  public visitor<S_mordent>,
292  public visitor<S_inverted_mordent>,
293  public visitor<S_schleifer>,
294  public visitor<S_shake>,
295  public visitor<S_accidental_mark>,
296 
297  // tremolos
298 
299  public visitor<S_tremolo>,
300 
301  // dynamics
302 
303  public visitor<S_f>,
304  public visitor<S_ff>,
305  public visitor<S_fff>,
306  public visitor<S_ffff>,
307  public visitor<S_fffff>,
308  public visitor<S_ffffff>,
309 
310  public visitor<S_p>,
311  public visitor<S_pp>,
312  public visitor<S_ppp>,
313  public visitor<S_pppp>,
314  public visitor<S_ppppp>,
315  public visitor<S_pppppp>,
316 
317  public visitor<S_mf>,
318  public visitor<S_mp>,
319  public visitor<S_fp>,
320  public visitor<S_fz>,
321 
322  public visitor<S_rf>,
323  public visitor<S_sf>,
324  public visitor<S_rfz>,
325  public visitor<S_sfz>,
326 
327  public visitor<S_sfp>,
328  public visitor<S_sfpp>,
329  public visitor<S_sffz>,
330 
331  public visitor<S_other_dynamics>,
332 
333  public visitor<S_wedge>,
334 
335  // cue notes
336 
337  public visitor<S_cue>,
338 
339  // grace notes
340 
341  public visitor<S_grace>,
342 
343  // chords
344 
345  public visitor<S_chord>,
346 
347  // times
348 
349  public visitor<S_time_modification>,
350  public visitor<S_actual_notes>,
351  public visitor<S_normal_notes>,
352  public visitor<S_normal_type>,
353 
354  // tuplets
355 
356  public visitor<S_tuplet>,
357  public visitor<S_tuplet_actual>,
358  public visitor<S_tuplet_normal>,
359  public visitor<S_tuplet_number>,
360  public visitor<S_tuplet_type>,
361  public visitor<S_tuplet_dot>,
362 
363  // glissandos
364 
365  public visitor<S_glissando>,
366 
367  // slides
368 
369  public visitor<S_slide>,
370 
371  // rehearsals
372 
373  public visitor<S_rehearsal>,
374 
375  // accordion registration
376 
377  public visitor<S_accordion_registration>,
378  public visitor<S_accordion_high>,
379  public visitor<S_accordion_middle>,
380  public visitor<S_accordion_low>,
381 
382  // harp pedals tuning
383 
384  public visitor<S_harp_pedals>,
385  public visitor<S_pedal_tuning>,
386  public visitor<S_pedal_step>,
387  public visitor<S_pedal_alter>,
388 
389  public visitor<S_damp>,
390  public visitor<S_damp_all>,
391 
392  // sound
393 
394  public visitor<S_sound>,
395 
396  // midi
397 
398  public visitor<S_instrument_sound>,
399  public visitor<S_virtual_instrument>,
400  public visitor<S_midi_device>,
401  public visitor<S_midi_instrument>
402 
403 {
404  public:
405 
406  // constructors/destructor
407  // ------------------------------------------------------
408 
410  S_msrScore scoreSkeleton,
411  indentedOstream& ios);
412 
413  virtual ~mxmlTree2MsrTranslator ();
414 
415  // set and get
416  // ------------------------------------------------------
417 
418  S_msrScore getMsrScore () const
419  { return fMsrScore; }
420 
421  // services
422  // ------------------------------------------------------
423 
424  void populateMsrSkeletonFromMxmlTree (
425  const Sxmlelement mxmlTree);
426 
427  // visitors
428  // ------------------------------------------------------
429 
430  void browseMxmlTree (
431  const Sxmlelement& mxmlTree);
432 
433  protected:
434 
435  // parts
436  // ------------------------------------------------------
437 
438  virtual void visitStart ( S_part& elt);
439  virtual void visitEnd ( S_part& elt);
440 
441  // ???
442  // ------------------------------------------------------
443 
444  virtual void visitStart ( S_attributes& elt);
445  virtual void visitEnd ( S_attributes& elt);
446 
447  virtual void visitStart ( S_divisions& elt);
448 
449  // staves
450  // ------------------------------------------------------
451 
452  virtual void visitStart ( S_staves& elt);
453 
454  virtual void visitStart ( S_staff& elt);
455 
456  // staff details
457  // ------------------------------------------------------
458 
459  virtual void visitStart ( S_staff_details& elt);
460  virtual void visitEnd ( S_staff_details& elt);
461  virtual void visitStart ( S_staff_type& elt);
462  virtual void visitStart ( S_staff_lines& elt);
463  virtual void visitStart ( S_staff_tuning& elt);
464  virtual void visitEnd ( S_staff_tuning& elt);
465  virtual void visitStart ( S_tuning_step& elt);
466  virtual void visitStart ( S_tuning_octave& elt);
467  virtual void visitStart ( S_tuning_alter& elt);
468  virtual void visitStart ( S_capo& elt);
469  virtual void visitStart ( S_staff_size& elt);
470 
471  // ???
472  // ------------------------------------------------------
473 
474  virtual void visitStart ( S_voice& elt );
475 
476  // backup & forward
477  // ------------------------------------------------------
478 
479  virtual void visitStart ( S_backup& elt );
480  virtual void visitEnd ( S_backup& elt );
481  virtual void visitStart ( S_forward& elt );
482  virtual void visitEnd ( S_forward& elt );
483 
484  // clefs
485  // ------------------------------------------------------
486 
487  virtual void visitStart ( S_clef& elt );
488  virtual void visitEnd ( S_clef& elt );
489  virtual void visitStart ( S_sign& elt );
490  virtual void visitStart ( S_line& elt );
491  virtual void visitStart ( S_clef_octave_change& elt );
492 
493  // keys
494  // ------------------------------------------------------
495 
496  virtual void visitStart ( S_key& elt );
497  virtual void visitEnd ( S_key& elt );
498  virtual void visitStart ( S_cancel& elt );
499  virtual void visitStart ( S_fifths& elt );
500  virtual void visitStart ( S_mode& elt );
501  virtual void visitStart ( S_key_step& elt );
502  virtual void visitStart ( S_key_alter& elt );
503  virtual void visitStart ( S_key_octave& elt );
504 
505  // times
506  // ------------------------------------------------------
507 
508  virtual void visitStart ( S_time& elt );
509  virtual void visitEnd ( S_time& elt );
510  virtual void visitStart ( S_beats& elt );
511  virtual void visitStart ( S_beat_type& elt );
512  virtual void visitStart ( S_senza_misura& elt );
513 
514  virtual void visitStart ( S_interchangeable& elt );
515  virtual void visitStart ( S_time_relation& elt );
516 
517  // ???
518  // ------------------------------------------------------
519 
520  virtual void visitStart ( S_instruments& elt );
521 
522  // transpose
523  // ------------------------------------------------------
524 
525  virtual void visitStart ( S_transpose& elt );
526  virtual void visitEnd ( S_transpose& elt );
527  virtual void visitStart ( S_diatonic& elt );
528  virtual void visitStart ( S_chromatic& elt );
529  virtual void visitStart ( S_octave_change& elt );
530  virtual void visitStart ( S_double& elt );
531 
532  // directions
533  // ------------------------------------------------------
534 
535  virtual void visitStart ( S_direction& elt );
536  virtual void visitEnd ( S_direction& elt );
537  virtual void visitStart ( S_direction_type& elt );
538  virtual void visitEnd ( S_direction_type& elt );
539  virtual void visitStart ( S_offset& elt );
540 
541  virtual void visitStart ( S_words& elt );
542 
543  virtual void visitStart ( S_octave_shift& elt );
544 
545  virtual void visitStart ( S_scordatura& elt );
546  virtual void visitEnd ( S_scordatura& elt );
547  virtual void visitStart ( S_accord& elt );
548  virtual void visitEnd ( S_accord& elt );
549 
550  // accordion registration
551  // ------------------------------------------------------
552 
553  virtual void visitStart ( S_accordion_registration& elt );
554  virtual void visitEnd ( S_accordion_registration& elt );
555  virtual void visitStart ( S_accordion_high& elt );
556  virtual void visitStart ( S_accordion_middle& elt );
557  virtual void visitStart ( S_accordion_low& elt );
558 
559  // tempo
560  // ------------------------------------------------------
561 
562  virtual void visitStart ( S_metronome& elt );
563  virtual void visitEnd ( S_metronome& elt );
564  virtual void visitStart ( S_beat_unit& elt );
565  virtual void visitStart ( S_beat_unit_dot& elt );
566  virtual void visitStart ( S_per_minute& elt );
567  virtual void visitStart ( S_metronome_note& elt );
568  virtual void visitEnd ( S_metronome_note& elt );
569  virtual void visitStart ( S_metronome_relation& elt );
570  virtual void visitStart ( S_metronome_type& elt );
571  virtual void visitStart ( S_metronome_beam& elt );
572  virtual void visitStart ( S_metronome_dot& elt );
573  virtual void visitStart ( S_metronome_tuplet& elt );
574  virtual void visitEnd ( S_metronome_tuplet& elt );
575  virtual void visitStart ( S_normal_dot& elt );
576 
577  // ties, slurs, brackets & beams
578  // ------------------------------------------------------
579 
580  virtual void visitStart ( S_tied& elt);
581  virtual void visitStart ( S_slur& elt);
582  virtual void visitStart ( S_bracket& elt);
583  virtual void visitStart ( S_beam& elt);
584 
585  // lyrics
586  // ------------------------------------------------------
587 
588  virtual void visitStart ( S_lyric& elt);
589  virtual void visitEnd ( S_lyric& elt);
590  virtual void visitStart ( S_syllabic& elt);
591  virtual void visitStart ( S_text& elt );
592  virtual void visitStart ( S_elision& elt );
593  virtual void visitStart ( S_extend& elt);
594 
595  // ???
596  // ------------------------------------------------------
597 
598  virtual void visitStart ( S_degree& elt);
599  virtual void visitEnd ( S_degree& elt);
600  virtual void visitStart ( S_degree_value& elt);
601  virtual void visitStart ( S_degree_alter& elt);
602  virtual void visitStart ( S_degree_type& elt);
603 
604  // harmonies
605  // ------------------------------------------------------
606 
607  virtual void visitStart ( S_harmony& elt);
608  virtual void visitEnd ( S_harmony& elt);
609  virtual void visitStart ( S_root_step& elt);
610  virtual void visitStart ( S_root_alter& elt);
611  virtual void visitStart ( S_kind& elt);
612  virtual void visitStart ( S_inversion& elt);
613  virtual void visitStart ( S_bass_step& elt);
614  virtual void visitStart ( S_bass_alter& elt);
615 
616  // frames
617  // ------------------------------------------------------
618 
619  virtual void visitStart ( S_frame& elt);
620  virtual void visitEnd ( S_frame& elt);
621  virtual void visitStart ( S_frame_strings& elt);
622  virtual void visitStart ( S_frame_frets& elt);
623  virtual void visitStart ( S_first_fret& elt);
624  virtual void visitStart ( S_frame_note& elt);
625  virtual void visitEnd ( S_frame_note& elt);
626  virtual void visitStart ( S_barre& elt);
627 
628  // figured bass
629  // ------------------------------------------------------
630 
631  virtual void visitStart ( S_figured_bass& elt);
632  virtual void visitEnd ( S_figured_bass& elt);
633  virtual void visitStart ( S_figure& elt);
634  virtual void visitEnd ( S_figure& elt);
635  virtual void visitStart ( S_prefix& elt);
636  virtual void visitStart ( S_figure_number& elt);
637  virtual void visitStart ( S_suffix& elt);
638 
639  // measures
640  // ------------------------------------------------------
641 
642  virtual void visitStart ( S_measure& elt);
643  virtual void visitEnd ( S_measure& elt);
644 
645  // print
646  // ------------------------------------------------------
647 
648  virtual void visitStart ( S_print& elt);
649  virtual void visitEnd ( S_print& elt);
650 
651  virtual void visitStart ( S_system_layout& elt);
652  virtual void visitStart ( S_measure_numbering& elt);
653 
654  virtual void visitStart ( S_barline& elt);
655  virtual void visitStart ( S_segno& elt);
656  virtual void visitStart ( S_coda& elt);
657  virtual void visitStart ( S_eyeglasses& elt);
658  virtual void visitStart ( S_pedal& elt);
659  virtual void visitStart ( S_bar_style& elt);
660  virtual void visitStart ( S_repeat& elt);
661  virtual void visitStart ( S_ending& elt);
662  virtual void visitEnd ( S_barline& elt);
663 
664  // notes
665  // ------------------------------------------------------
666 
667  virtual void visitStart ( S_note& elt);
668  virtual void visitStart ( S_step& elt);
669  virtual void visitStart ( S_alter& elt);
670  virtual void visitStart ( S_octave& elt);
671  virtual void visitStart ( S_duration& elt);
672  virtual void visitStart ( S_instrument& elt);
673  virtual void visitStart ( S_dot& elt );
674 
675  // repeats
676  // ------------------------------------------------------
677 
678  virtual void visitStart ( S_measure_style& elt );
679  virtual void visitStart ( S_beat_repeat& elt );
680  virtual void visitStart ( S_measure_repeat& elt );
681  virtual void visitStart ( S_multiple_rest& elt );
682  virtual void visitStart ( S_slash& elt );
683  virtual void visitEnd ( S_slash& elt );
684  virtual void visitStart ( S_slash_type& elt );
685  virtual void visitStart ( S_slash_dot& elt );
686 
687  // atticulations
688  // ------------------------------------------------------
689 
690  virtual void visitStart ( S_articulations& elt );
691  virtual void visitEnd ( S_articulations& elt );
692  virtual void visitStart ( S_accent& elt );
693  virtual void visitStart ( S_breath_mark& elt );
694  virtual void visitStart ( S_caesura& elt );
695  virtual void visitStart ( S_spiccato& elt );
696  virtual void visitStart ( S_staccato& elt );
697  virtual void visitStart ( S_staccatissimo& elt );
698  virtual void visitStart ( S_stress& elt );
699  virtual void visitStart ( S_unstress& elt );
700  virtual void visitStart ( S_detached_legato& elt );
701  virtual void visitStart ( S_strong_accent& elt );
702  virtual void visitStart ( S_tenuto& elt );
703  virtual void visitStart ( S_fermata& elt );
704  virtual void visitStart ( S_arpeggiate& elt );
705  virtual void visitStart ( S_non_arpeggiate& elt );
706  virtual void visitStart ( S_doit& elt );
707  virtual void visitStart ( S_falloff& elt );
708  virtual void visitStart ( S_plop& elt );
709  virtual void visitStart ( S_scoop& elt );
710 
711  // technicals
712  // ------------------------------------------------------
713 
714  virtual void visitStart ( S_technical& elt );
715  virtual void visitEnd ( S_technical& elt );
716  virtual void visitStart ( S_arrow& elt );
717  virtual void visitStart ( S_bend& elt );
718  virtual void visitEnd ( S_bend& elt );
719  virtual void visitStart ( S_bend_alter& elt );
720  virtual void visitStart ( S_double_tongue& elt );
721  virtual void visitStart ( S_down_bow& elt );
722  virtual void visitStart ( S_fingering& elt );
723  virtual void visitStart ( S_fingernails& elt );
724  virtual void visitStart ( S_fret& elt );
725  virtual void visitStart ( S_hammer_on& elt );
726  virtual void visitStart ( S_handbell& elt );
727  virtual void visitStart ( S_harmonic& elt );
728  virtual void visitStart ( S_heel& elt );
729  virtual void visitStart ( S_hole& elt );
730  virtual void visitStart ( S_open_string& elt );
731  virtual void visitStart ( S_other_technical& elt );
732  virtual void visitStart ( S_pluck& elt );
733  virtual void visitStart ( S_pull_off& elt );
734  virtual void visitStart ( S_snap_pizzicato& elt );
735  virtual void visitStart ( S_stopped& elt );
736  virtual void visitStart ( S_string& elt );
737  virtual void visitStart ( S_tap& elt );
738  virtual void visitStart ( S_thumb_position& elt );
739  virtual void visitStart ( S_toe& elt );
740  virtual void visitStart ( S_triple_tongue& elt );
741  virtual void visitStart ( S_up_bow& elt );
742 
743  // ornaments
744  // ------------------------------------------------------
745 
746  virtual void visitStart ( S_ornaments& elt );
747  virtual void visitEnd ( S_ornaments& elt );
748  virtual void visitStart ( S_trill_mark& elt );
749  virtual void visitStart ( S_dashes& elt );
750  virtual void visitStart ( S_wavy_line& elt );
751  virtual void visitStart ( S_turn& elt );
752  virtual void visitStart ( S_inverted_turn& elt );
753  virtual void visitStart ( S_delayed_turn& elt );
754  virtual void visitStart ( S_delayed_inverted_turn& elt );
755  virtual void visitStart ( S_vertical_turn& elt );
756  virtual void visitStart ( S_mordent& elt );
757  virtual void visitStart ( S_inverted_mordent& elt );
758  virtual void visitStart ( S_schleifer& elt );
759  virtual void visitStart ( S_shake& elt );
760  virtual void visitStart ( S_accidental_mark& elt );
761 
762  // tremolos
763  // ------------------------------------------------------
764 
765  virtual void visitStart ( S_tremolo& elt );
766 
767  // dynamics
768  // ------------------------------------------------------
769 
770  virtual void visitStart ( S_f& elt);
771  virtual void visitStart ( S_ff& elt);
772  virtual void visitStart ( S_fff& elt);
773  virtual void visitStart ( S_ffff& elt);
774  virtual void visitStart ( S_fffff& elt);
775  virtual void visitStart ( S_ffffff& elt);
776 
777  virtual void visitStart ( S_p& elt);
778  virtual void visitStart ( S_pp& elt);
779  virtual void visitStart ( S_ppp& elt);
780  virtual void visitStart ( S_pppp& elt);
781  virtual void visitStart ( S_ppppp& elt);
782  virtual void visitStart ( S_pppppp& elt);
783 
784  virtual void visitStart ( S_mf& elt);
785  virtual void visitStart ( S_mp& elt);
786  virtual void visitStart ( S_fp& elt);
787  virtual void visitStart ( S_fz& elt);
788 
789  virtual void visitStart ( S_rf& elt);
790  virtual void visitStart ( S_sf& elt);
791  virtual void visitStart ( S_rfz& elt);
792  virtual void visitStart ( S_sfz& elt);
793 
794  virtual void visitStart ( S_sfp& elt);
795  virtual void visitStart ( S_sfpp& elt);
796  virtual void visitStart ( S_sffz& elt);
797 
798  virtual void visitStart ( S_other_dynamics& elt);
799 
800  virtual void visitStart ( S_wedge& elt);
801 
802  // harp pedals tuning
803  // ------------------------------------------------------
804 
805  virtual void visitStart ( S_harp_pedals& elt);
806  virtual void visitStart ( S_pedal_tuning& elt);
807  virtual void visitEnd ( S_pedal_tuning& elt);
808  virtual void visitStart ( S_pedal_step& elt);
809  virtual void visitStart ( S_pedal_alter& elt);
810 
811  virtual void visitStart ( S_damp& elt);
812  virtual void visitStart ( S_damp_all& elt);
813 
814  // cue notes
815  // ------------------------------------------------------
816 
817  virtual void visitStart ( S_cue& elt );
818 
819  // grace notes
820  // ------------------------------------------------------
821 
822  virtual void visitStart ( S_grace& elt );
823 
824  // ???
825  // ------------------------------------------------------
826 
827  virtual void visitStart ( S_type& elt);
828 
829  // note heads
830  // ------------------------------------------------------
831 
832  virtual void visitStart ( S_notehead& elt);
833 
834 
835  // notes
836  // ------------------------------------------------------
837 
838  virtual void visitStart ( S_accidental& elt);
839 
840  virtual void visitStart ( S_stem& elt);
841 
842  virtual void visitEnd ( S_note& elt);
843 
844  virtual void visitStart ( S_rest& elt);
845 
846  virtual void visitEnd ( S_unpitched& elt);
847  virtual void visitStart ( S_display_step& elt);
848  virtual void visitStart ( S_display_octave& elt);
849 
850  // chords
851  // ------------------------------------------------------
852 
853  virtual void visitStart ( S_chord& elt);
854 
855  // time
856  // ------------------------------------------------------
857 
858  virtual void visitStart ( S_time_modification& elt);
859  virtual void visitStart ( S_actual_notes& elt);
860  virtual void visitStart ( S_normal_notes& elt);
861  virtual void visitStart ( S_normal_type& elt);
862 
863  // tuplets
864  // ------------------------------------------------------
865 
866  virtual void visitStart ( S_tuplet& elt);
867  virtual void visitStart ( S_tuplet_actual& elt);
868  virtual void visitEnd ( S_tuplet_actual& elt);
869  virtual void visitStart ( S_tuplet_normal& elt);
870  virtual void visitEnd ( S_tuplet_normal& elt);
871  virtual void visitStart ( S_tuplet_number& elt);
872  virtual void visitStart ( S_tuplet_type& elt);
873  virtual void visitStart ( S_tuplet_dot& elt);
874 
875  // glissandos
876  // ------------------------------------------------------
877 
878  virtual void visitStart ( S_glissando& elt);
879 
880  // slides
881  // ------------------------------------------------------
882 
883  virtual void visitStart ( S_slide& elt);
884 
885  // rehearsals
886  // ------------------------------------------------------
887 
888  virtual void visitStart ( S_rehearsal& elt);
889 
890  // sound & MIDI
891  // ------------------------------------------------------
892 
893  virtual void visitStart ( S_sound& elt);
894  virtual void visitEnd ( S_sound& elt);
895 
896  virtual void visitStart ( S_instrument_sound& elt);
897  virtual void visitStart ( S_virtual_instrument& elt);
898  virtual void visitStart ( S_midi_device& elt);
899  virtual void visitStart ( S_midi_instrument& elt);
900 
901  private:
902 
903 
904  // the MSR score we are populating
905  // ------------------------------------------------------
906 
907  S_msrScore fMsrScore;
908 
909  // the log output stream
910  // ------------------------------------------------------
911 
912  indentedOstream& fLogOutputStream;
913 
914  // divisions per quarter note
915  // ------------------------------------------------------
916 
917  int fCurrentDivisionsPerQuarterNote;
918  S_msrDivisions fCurrentDivisions;
919 
920  // print
921  // ------------------------------------------------------
922 
923  string fCurrentDisplayText;
924  bool fOnGoingPrint;
925 
926  // part handling
927  // ------------------------------------------------------
928 
929  S_msrPart fCurrentPart;
930 
931  // measures
932  // ------------------------------------------------------
933 
934  // we need to count the measures for option fSeparatorLineEveryNMeasures,
935  // since measure numbers are actually strings
936 
937  int fPartMeasuresCounter;
938  string fScoreFirstMeasureNumber;
939  string fPartFirstMeasureNumber;
940  string fCurrentMeasureNumber;
941 
942  // measure style handling
943  // ------------------------------------------------------
944 
945  msrSlashTypeKind fCurrentSlashTypeKind;
946  msrUseDotsKind fCurrentUseDotsKind;
947  msrSlashUseStemsKind fCurrentSlashUseStemsKind;
948 
949  msrDurationKind fCurrentSlashGraphicDurationKind;
950  int fCurrentSlashDotsNumber;
951 
952  // beats repeats
953  int fCurrentBeatRepeatSlashes;
954 
955  // rest measures
956  int fCurrentRestMeasuresMeasuresNumber;
957  int fRemainingRestMeasuresMeasuresNumber;
958  bool fOnGoingRestMeasures;
959  bool fCurrentRestMeasuresHasBeenCreated;
960 
961  // measures repeats
962  msrMeasuresRepeat::msrMeasuresRepeatKind
963  fCurrentMeasuresRepeatKind;
964  int fCurrentMeasuresRepeatMeasuresNumber;
965  int fCurrentMeasuresRepeatSlashesNumber;
966 
967  // staff details handling
968  // ------------------------------------------------------
969 
970  msrStaffDetails::msrStaffTypeKind
971  fCurrentStaffTypeKind;
972  msrStaffDetails::msrShowFretsKind
973  fCurrentShowFretsKind;
974  msrPrintObjectKind fCurrentPrintObjectKind;
975  msrStaffDetails::msrPrintSpacingKind
976  fCurrentPrintSpacingKind;
977 
978  int fCurrentStaffDetailsCapo;
979 
980  int fCurrentStaffDetailsStaffSize; // JMI
981 
982  int fCurrentStaffLinesNumber;
983 
984  int fStaffDetailsStaffNumber;
985 
986  int fCurrentStaffTuningLine;
987  msrDiatonicPitchKind fCurrentStaffTuningDiatonicPitchKind;
988  msrAlterationKind fCurrentStaffTuningAlterationKind;
989  int fCurrentStaffTuningOctave;
990 
991  S_msrStaffDetails fCurrentStaffDetails;
992 
993  bool fOnGoingStaffTuning;
994 
995  // staff handling
996  // ------------------------------------------------------
997 
998  int fCurrentMusicXMLStaffNumber; // used throughout
999 
1000  S_msrStaff fetchStaffFromCurrentPart (
1001  int inputLineNumber,
1002  int staffNumber);
1003 
1004  // voice handling
1005  // ------------------------------------------------------
1006 
1007  int fCurrentMusicXMLVoiceNumber; // used throughout
1008 
1009  S_msrVoice fetchVoiceFromCurrentPart (
1010  int inputLineNumber,
1011  int staffNumber,
1012  int voiceNumber);
1013 
1014  // clef handling
1015  // ------------------------------------------------------
1016 
1017  int fCurrentClefStaffNumber;
1018  string fCurrentClefSign;
1019  int fCurrentClefLine;
1020  int fCurrentClefOctaveChange;
1021 
1022  // key handling
1023  // ------------------------------------------------------
1024 
1025  msrKey::msrKeyKind fCurrentKeyKind;
1026 
1027  // traditional
1028  int fCurrentKeyStaffNumber;
1029  int fCurrentKeyFifths;
1030  int fCurrentKeyCancelFifths;
1031  msrKey::msrKeyModeKind fCurrentKeyModeKind;
1032 
1033  S_msrKey handleTraditionalKey (
1034  int inputLineNumber);
1035 
1036  // Humdrum-Scot
1037  S_msrHumdrumScotKeyItem fCurrentHumdrumScotKeyItem;
1038  vector<S_msrHumdrumScotKeyItem>
1039  fCurrentHumdrumScotKeyItemsVector;
1040 
1041  S_msrKey handleHumdrumScotKey (
1042  int inputLineNumber);
1043 
1044  // harmonies, figured basses and frames are pending
1045  // before the note itself is found in the MusicXML data
1046  // ------------------------------------------------------
1047  void attachPendingHarmoniesFiguredBassesAndOrFramesToNote (
1048  int inputLineNumber,
1049  S_msrNote newNote,
1050  S_msrVoice voiceToInsertInto);
1051 
1052  S_msrNote createNote (
1053  int inputLineNumber);
1054 
1055  void populateNote (
1056  int inputLineNumber,
1057  S_msrNote newNote);
1058 
1059  void createAStaffChangeIfNecessary (
1060  int inputLineNumber,
1061  S_msrNote newNote,
1062  S_msrVoice voiceToInsertInto);
1063 
1064 
1065  // transpose handling
1066  // ------------------------------------------------------
1067 
1068  int fCurrentTransposeNumber;
1069  int fCurrentTransposeDiatonic;
1070  int fCurrentTransposeChromatic;
1071  int fCurrentTransposeOctaveChange;
1072  bool fCurrentTransposeDouble;
1073 
1074 
1075  // direction handling
1076  // ------------------------------------------------------
1077 
1078  int fCurrentDirectionStaffNumber;
1079  int fCurrentDirectionVoiceNumber;
1080  msrPlacementKind fCurrentDirectionPlacementKind;
1081 
1082  bool fOnGoingDirection;
1083 
1084 
1085  // direction-type handling
1086  // ------------------------------------------------------
1087 
1088  bool fOnGoingDirectionType;
1089 
1090  void attachPendingVoiceLevelElementsToVoice (
1091  S_msrVoice voice);
1092 
1093 
1094  // rehearsal handling
1095  // ------------------------------------------------------
1096  // rehearsals remain pending until the next note:
1097  // in MusicXML, they precede the note and
1098  // may occur when no current voice exists
1099  list<S_msrRehearsal> fPendingRehearsalsList;
1100 
1101  void attachPendingRehearsalsToVoice (
1102  S_msrVoice voice);
1103 
1104 
1105  // segnos handling
1106  // ------------------------------------------------------
1107  // segnos remain pending until the next note:
1108  // in MusicXML, they precede the note and
1109  // may occur when no current voice exists
1110  list<S_msrSegno> fPendingSegnosList;
1111 
1112  void attachPendingSegnosToNote (
1113  S_msrNote note);
1114 
1115  // codas handling
1116  // ------------------------------------------------------
1117  // codas remain pending until the next note:
1118  // in MusicXML, they precede the note and
1119  // may occur when no current voice exists
1120  list<S_msrCoda> fPendingCodasList;
1121 
1122  void attachPendingCodasToNote (
1123  S_msrNote note);
1124 
1125 
1126  // eyeglasses handling
1127  // ------------------------------------------------------
1128  // eyeglasses remain pending until the next note:
1129  // in MusicXML, they precede the note and
1130  // may occur when no current voice exists
1131  list<S_msrEyeGlasses> fPendingEyeGlassesList;
1132 
1133  void attachPendingEyeGlassesToNote (
1134  S_msrNote note);
1135 
1136 
1137  // damp handling
1138  // ------------------------------------------------------
1139  // damps remain pending until the next note:
1140  // in MusicXML, they precede the note and
1141  // may occur when no current voice exists
1142  list<S_msrDamp> fPendingDampsList;
1143 
1144  void attachPendingDampsToNote (
1145  S_msrNote note);
1146 
1147 
1148  // damp all handling
1149  // ------------------------------------------------------
1150  // damp alls remain pending until the next note:
1151  // in MusicXML, they precede the note and
1152  // may occur when no current voice exists
1153  list<S_msrDampAll> fPendingDampAllsList;
1154 
1155  void attachPendingDampAllsToNote (
1156  S_msrNote note);
1157 
1158 
1159  // accordion-registration handling
1160  // ------------------------------------------------------
1161 
1162  int fCurrentAccordionHigh;
1163  int fCurrentAccordionMiddle;
1164  int fCurrentAccordionLow;
1165  int fCurrentAccordionNumbersCounter;
1166 
1167 
1168  // metronome handling
1169  // ------------------------------------------------------
1170 
1171  msrDurationKind fCurrentMetronomeBeatUnitDurationKind;
1172 
1173  vector<msrDottedDuration> fCurrentMetronomeBeatUnitsVector;
1174  string fCurrentMetrenomePerMinute;
1175  msrTempo::msrTempoParenthesizedKind
1176  fCurrentMetronomeParenthesedKind;
1177 
1178  int fCurrentMetrenomeDotsNumber;
1179  msrTempo::msrTempoRelationKind
1180  fCurrentMetrenomeRelationKind;
1181  msrDurationKind fCurrentMetronomeDurationKind;
1182  string fCurrentMetronomeBeamValue;
1183 
1184  bool fOnGoingMetronomeNote;
1185 
1186  list<S_msrBeam> fPendingMetronomeBeamsList; // stack JMI ???
1187  void attachCurrentMetronomeBeamsToMetronomeNote (
1188  S_msrTempoNote tempoNote);
1189 
1190  msrTempoTuplet::msrTempoTupletTypeKind
1191  fCurrentTempoTupletTypeKind;
1192  msrTempoTuplet::msrTempoTupletBracketKind
1193  fCurrentTempoTupletBracketKind;
1194  msrTempoTuplet::msrTempoTupletShowNumberKind
1195  fCurrentTempoTupletShowNumberKind;
1196 
1197  int fCurrentMetrenomeNormalDotsNumber;
1198  int fCurrentMetronomeNoteActualNotes;
1199  int fCurrentMetronomeNoteNormalNotes;
1200  string fCurrentMetronomeNoteNormalType; // JMI ???
1201 
1202  rational fCurrentMetronomeNoteWholeNotesFromMetronomeType;
1203 
1204  S_msrTempoTuplet fCurrentMetronomeTuplet;
1205  bool fOnGoingMetronomeTuplet;
1206 
1208  fCurrentMetronomeRelationLeftElements;
1210  fCurrentMetronomeRelationRightElements;
1211 
1212  S_msrTempo fCurrentMetronomeTempo;
1213  // tempos remain pending until the next note:
1214  // in MusicXML, they precede the note and
1215  // may occur when no current voice exists
1216  list<S_msrTempo> fPendingTemposList;
1217 
1218  void attachPendingTemposToVoice (
1219  S_msrVoice voice);
1220 
1221 
1222  // line breaks handling
1223  // ------------------------------------------------------
1224 
1225  list<S_msrLineBreak> fPendingLineBreaksList;
1226 
1227  void attachLineBreaksToVoice (
1228  S_msrVoice voice);
1229 
1230 
1231  // page breaks handling
1232  // ------------------------------------------------------
1233 
1234  list<S_msrPageBreak> fPendingPageBreaksList;
1235 
1236  void attachPageBreaksToVoice (
1237  S_msrVoice voice);
1238 
1239 
1240  // octave shift handling
1241  // ------------------------------------------------------
1242 
1243  // octave shifts remain pending until the next note
1244  // (they precede the note in MusicXML and
1245  // may occur when no current voice exists)
1246  list<S_msrOctaveShift> fPendingOctaveShiftsList;
1247  void attachPendingOctaveShiftsToNote (
1248  S_msrNote note);
1249 
1250 
1251  // scordatura handling
1252  // ------------------------------------------------------
1253 
1254  S_msrScordatura fCurrentScordatura;
1255 
1256  // scordaturas remain pending until the next note:
1257  // in MusicXML, they precede the note and
1258  // may occur when no current voice exists
1259  list<S_msrScordatura> fPendingScordaturasList;
1260 
1261  void attachPendingScordaturasToNote (
1262  S_msrNote note);
1263 
1264  int fCurrentStringTuningNumber;
1265 
1266  msrDiatonicPitchKind fCurrentStringTuningDiatonicPitchKind;
1267  msrAlterationKind fCurrentStringTuningAlterationKind;
1268  int fCurrentStringTuningOctave;
1269 
1270  bool fOnGoingAccord;
1271 
1272 
1273  // time handling
1274  // ------------------------------------------------------
1275 
1276  msrTime::msrTimeSymbolKind
1277  fCurrentTimeSymbolKind;
1278 
1279  int fCurrentTimeStaffNumber;
1280  string fCurrentTimeBeats;
1281  bool fCurrentTimeSenzaMisura;
1282 
1283  vector<S_msrTimeItem>
1284  fCurrentTimeItemsVector;
1285 
1286  S_msrTime fCurrentTime;
1287 
1288  msrTime::msrTimeSymbolKind
1289  fCurrentInterchangeableSymbolKind;
1290  msrTime::msrTimeSeparatorKind
1291  fCurrentInterchangeableSeparatorKind;
1292  msrTime::msrTimeRelationKind
1293  fCurrentInterchangeableRelationKind;
1294 
1295  bool fOnGoingInterchangeable;
1296 
1297 
1298  // lyrics handling
1299  // ------------------------------------------------------
1300 
1301  bool fOnGoingLyric;
1302  string fCurrentSyllabic;
1303  msrSyllable::msrSyllableKind
1304  fCurrentSyllableKind;
1305  msrSyllable::msrSyllableKind
1306  fFirstSyllableInSlurKind;
1307  msrSyllable::msrSyllableKind
1308  fFirstSyllableInLigatureKind;
1309  list<string> fCurrentLyricTextsList;
1310 
1311  msrSyllable::msrSyllableExtendKind
1312  fCurrentSyllableExtendKind;
1313  bool fOnGoingSyllableExtend;
1314 
1315  string fCurrentStanzaNumber;
1316  string fCurrentStanzaName;
1317 
1318  bool fCurrentNoteHasLyrics;
1319  bool fASkipSyllableHasBeenGeneratedForcurrentNote;
1320 
1321  bool fCurrentStanzaHasText;
1322 
1323  list<S_msrSyllable> fCurrentNoteSyllables;
1324 
1325  bool fLastHandledNoteInVoiceHasLyrics;
1326 
1327  void handleLyricsForNote (
1328  S_msrVoice currentVoice,
1329  S_msrNote newNote);
1330 
1331  // harmonies handling
1332  // ------------------------------------------------------
1333 
1334  int fHarmonyVoicesCounter;
1335  list<S_msrHarmony> fPendingHarmoniesList;
1336  void handlePendingHarmonies (
1337  S_msrNote newNote,
1338  S_msrVoice voiceToInsertInto);
1339 
1340  int fCurrentHarmonyInputLineNumber;
1341 
1342  msrDiatonicPitchKind fCurrentHarmonyRootDiatonicPitchKind;
1343  msrAlterationKind fCurrentHarmonyRootAlterationKind;
1344 
1345  msrHarmonyKind fCurrentHarmonyKind;
1346  string fCurrentHarmonyKindText;
1347 
1348  int fCurrentHarmonyInversion;
1349 
1350  msrDiatonicPitchKind fCurrentHarmonyBassDiatonicPitchKind;
1351  msrAlterationKind fCurrentHarmonyBassAlterationKind;
1352  msrHarmonyDegree::msrHarmonyDegreeTypeKind
1353  fCurrentHarmonyDegreeTypeKind;
1354 
1355  list<S_msrHarmonyDegree> fCurrentHarmonyDegreesList;
1356 
1357 
1358  int fCurrentHarmonyDegreeValue;
1359  msrAlterationKind fCurrentHarmonyDegreeAlterationKind;
1360 
1361  msrQuarterTonesPitchKind fCurrentHarmonyRootQuarterTonesPitchKind;
1362  msrQuarterTonesPitchKind fCurrentHarmonyBassQuarterTonesPitchKind;
1363 
1364  int fCurrentHarmonyStaffNumber;
1365 
1366  rational fCurrentHarmonyWholeNotesOffset;
1367 
1368  bool fOnGoingHarmony;
1369 
1370  // figured bass handling
1371  // ------------------------------------------------------
1372 
1373  int fFiguredBassVoicesCounter;
1374  list<S_msrFiguredBass> fPendingFiguredBassesList;
1375  void handlePendingFiguredBasses (
1376  S_msrNote newNote,
1377  S_msrVoice voiceToInsertInto);
1378 
1379  bool fOnGoingFiguredBass;
1380 
1381  int fCurrentFiguredBassInputLineNumber;
1382 
1383  msrFigure::msrFigurePrefixKind
1384  fCurrentFigurePrefixKind;
1385  int fCurrentFigureNumber;
1386  msrFigure::msrFigureSuffixKind
1387  fCurrentFigureSuffixKind;
1388 
1389  rational fCurrentFiguredBassSoundingWholeNotes;
1390  rational fCurrentFiguredBassDisplayWholeNotes;
1391 
1392  msrFiguredBass::msrFiguredBassParenthesesKind
1393  fCurrentFiguredBassParenthesesKind;
1394 
1395  list<S_msrFigure> fPendingFiguredBassFiguresList;
1396 
1397  // frames handling
1398  // ------------------------------------------------------
1399 
1400  int fCurrentFrameStrings;
1401  int fCurrentFrameFrets;
1402  int fCurrentFrameFirstFret;
1403  bool fOnGoingFrame;
1404 
1405  list<S_msrFrame> fPendingFramesList;
1406 
1407  int fCurrentFrameNoteStringNumber;
1408  int fCurrentFrameNoteFretNumber;
1409  int fCurrentFrameNoteFingering;
1410 
1411  msrFrameNote::msrBarreTypeKind
1412  fCurrentFrameNoteBarreTypeKind;
1413 
1414  bool fOnGoingFrameNote;
1415 
1416  list<S_msrFrameNote> fPendingFramesNotesList;
1417 
1418  // barline handling
1419  // ------------------------------------------------------
1420 
1421  bool fOnGoingBarline;
1422  int fRepeatEndCounter;
1423 
1424  msrBarline::msrBarlineHasSegnoKind
1425  fCurrentBarlineHasSegnoKind;
1426  msrBarline::msrBarlineHasCodaKind
1427  fCurrentBarlineHasCodaKind;
1428  string fCurrentBarlineEndingNumber; // vector<string> ??? JMI
1429  // may be "1, 2"
1430 
1431  msrBarline::msrBarlineLocationKind
1432  fCurrentBarlineLocationKind;
1433  msrBarline::msrBarlineStyleKind
1434  fCurrentBarlineStyleKind;
1435  msrBarline::msrBarlineEndingTypeKind
1436  fCurrentBarlineEndingTypeKind;
1437  msrBarline::msrBarlineRepeatDirectionKind
1438  fCurrentBarlineRepeatDirectionKind;
1439  msrBarline::msrBarlineRepeatWingedKind
1440  fCurrentBarlineRepeatWingedKind;
1441 
1442  int fCurrentBarlineTimes;
1443 
1444  // repeats handling
1445  // ------------------------------------------------------
1446 
1447  string fCurrentRepeatStartMeasureNumber; // stack ??? JMI
1448  S_msrBarline fCurrentRepeatEndingStartBarline; // stack ??? JMI
1449 
1450  void handleRepeatStart (
1451  S_msrBarline& barline);
1452 
1453  void handleRepeatEnd (
1454  S_msrBarline& barline);
1455 
1456  void handleRepeatEndingStart (
1457  S_msrBarline& barline);
1458 
1459 /* JMI
1460  void handleRepeatHookedEndingStart (
1461  S_barline elt,
1462  S_msrBarline& barline);
1463 */
1464  void handleRepeatHookedEndingEnd (
1465  S_msrBarline& barline);
1466  /* JMI
1467  void handleRepeatHooklessEndingStart (
1468  S_barline elt,
1469  S_msrBarline& barline);
1470 */
1471  void handleRepeatHooklessEndingEnd (
1472  S_msrBarline& barline);
1473 
1474  // notes/rests handling
1475  // ------------------------------------------------------
1476 
1477  // map<S_msrVoice, S_msrNote> seems buggy in g++ 4.9.x,
1478  // so we use a pair containing the staff and voice numbers:
1479  map<pair<int, int>, S_msrNote>
1480  fVoicesLastMetNoteMap;
1481 
1482  void printVoicesLastMetNoteMap (
1483  int inputLineNumber,
1484  string context);
1485 
1486  void checkStep (
1487  int inputLineNumber,
1488  string stepValue);
1489 
1490  // notes
1491  msrDiatonicPitchKind fCurrentNoteDiatonicPitchKind;
1492  msrAlterationKind fCurrentNoteAlterationKind;
1493 
1494  int fCurrentNoteOctave;
1495 
1496  int fCurrentDisplayOctave;
1497  msrDiatonicPitchKind fCurrentDisplayDiatonicPitchKind;
1498 
1499  // note print object kind
1500  msrPrintObjectKind fCurrentNotePrintObjectKind;
1501 
1502  // note heads
1503  msrNote::msrNoteHeadKind fCurrentNoteHeadKind;
1504  msrNote::msrNoteHeadFilledKind
1505  fCurrentNoteHeadFilledKind;
1506  msrNote::msrNoteHeadParenthesesKind
1507  fCurrentNoteHeadParenthesesKind;
1508 
1509  // accidentals
1510  msrNote::msrNoteAccidentalKind
1511  fCurrentNoteAccidentalKind;
1512  msrNote::msrNoteEditorialAccidentalKind
1513  fCurrentNoteEditorialAccidentalKind;
1514  msrNote::msrNoteCautionaryAccidentalKind
1515  fCurrentNoteCautionaryAccidentalKind;
1516 
1517  // note color
1518  string fCurrentNoteRGB;
1519  string fCurrentNoteAlpha;
1520 
1521  // ongoing note
1522  bool fOnGoingNote;
1523 
1524  // glissandos
1525 
1526  // slides
1527 
1528  // note sound
1529  msrQuarterTonesPitchKind fCurrentNoteQuarterTonesPitchKind;
1530  rational fCurrentNoteSoundingWholeNotesFromDuration;
1531  rational fCurrentNoteSoundingWholeNotes;
1532 
1533  // note display
1534  msrQuarterTonesPitchKind fCurrentNoteQuarterTonesDisplayPitchKind;
1535  rational fCurrentNoteDisplayWholeNotesFromType;
1536  rational fCurrentNoteDisplayWholeNotes;
1537 
1538  // augmentation dots
1539  int fCurrentNoteDotsNumber;
1540 
1541  // graphic duration
1542  msrDurationKind fCurrentNoteGraphicDurationKind;
1543 
1544  // rests
1545  bool fCurrentNoteIsARest;
1546  bool fCurrentRestMeasure;
1547 
1548  // unpitched notes
1549  bool fCurrentNoteIsUnpitched;
1550 
1551  // cue notes
1552  bool fCurrentNoteIsACueNote;
1553 
1554  // grace notes
1555  bool fCurrentNoteIsAGraceNote;
1556  string fCurrentStealTimeFollowing;
1557  string fCurrentStealTimePrevious;
1558  string fCurrentMakeTime;
1559 
1560  // staff
1561  // notes always keep their initial staff number
1562  int fPreviousNoteMusicXMLStaffNumber;
1563 
1564  // staff changes
1565  // MusicXMl contains sequences of elements on one and the same staff,
1566  // until a <backup/> or <forward/> markup may change the latter;
1567  // we keep track of the current sequence staff number
1568  // for the previous and current notes:
1569  // a staff change occurs when they are different,
1570  // but the note itself keeps its staff number in that case
1571  int fCurrentStaffNumberToInsertInto;
1572 
1573  // cross staff chords
1574  int fCurrentChordStaffNumber;
1575  bool fCurrentNoteIsCrossStaves;
1576 
1577  enum staffChangeKind {
1578  k_NoStaffChange,
1579  kStaffChangeChordMemberNote,
1580  kStaffChangeOtherNote };
1581 
1582  staffChangeKind fCurrentStaffChangeKind;
1583 
1584  // elements attached to the note
1585  S_msrStem fCurrentStem;
1586 
1587  string fCurrentBeamValue;
1588  int fCurrentBeamNumber;
1589 
1590  // initialization
1591  void initializeNoteData ();
1592 
1593  // notes
1594  void handleNote (
1595  int inputLineNumber,
1596  S_msrNote newNote);
1597 
1598  // detailed notes handling
1599  void handleStandaloneOrDoubleTremoloNoteOrGraceNoteOrRest (
1600  S_msrNote newNote);
1601 
1602  void handleNoteBelongingToAChord (
1603  S_msrNote newChordNote);
1604 
1605  void handleNoteBelongingToATuplet (
1606  S_msrNote newNote);
1607 
1608  void handleNoteBelongingToAChordInATuplet (
1609  S_msrNote newChordNote);
1610 
1611  void handleNoteBelongingToAChordInAGraceNotesGroup (
1612  S_msrNote newChordNote);
1613 
1614  // grace notes handling
1615  // ------------------------------------------------------
1616 
1617  bool fCurrentGraceIsSlashed;
1618  S_msrGraceNotesGroup fPendingGraceNotesGroup;
1619 
1620  // articulations handling
1621  // ------------------------------------------------------
1622 
1623  list<S_msrArticulation> fCurrentArticulations;
1624 
1625  void attachCurrentArticulationsToNote (
1626  S_msrNote note);
1627 
1628  /* JMI
1629  void attachCurrentArticulationsToChord ( // JMI
1630  S_msrChord chord);
1631  */
1632 
1633  void copyNoteArticulationsToChord (
1634  S_msrNote note, S_msrChord chord);
1635 
1636  // dynamics, words and wedges remain pending until the next note
1637  // (they precede the note in MusicXML but follow it in LilyPond)
1638  // ------------------------------------------------------
1639 
1640  list<S_msrDynamics> fPendingDynamicsList;
1641  list<S_msrOtherDynamics> fPendingOtherDynamicsList;
1642  list<S_msrWords> fPendingWordsList;
1643  list<S_msrSlur> fPendingSlursList;
1644  list<S_msrLigature> fPendingLigaturesList;
1645  list<S_msrWedge> fPendingWedgesList;
1646  list<S_msrSlash> fPendingSlashesList;
1647 
1648  void attachPendingNoteLevelElementsToNote (
1649  S_msrNote note);
1650 
1651  void attachPendingDynamicsToNote (
1652  S_msrNote note);
1653  void attachPendingOtherDynamicsToNote (
1654  S_msrNote note);
1655  void attachPendingWordsToNote (
1656  S_msrNote note);
1657  void attachPendingSlursToNote (
1658  S_msrNote note);
1659  void attachPendingLigaturesToNote (
1660  S_msrNote note);
1661  void attachPendingPedalsToNote (
1662  S_msrNote note);
1663  void attachPendingWedgesToNote (
1664  S_msrNote note);
1665  void attachPendingSlashesToNote (
1666  S_msrNote note);
1667 
1668  void attachPendingGlissandosToNote (
1669  S_msrNote note);
1670  void attachPendingSlidesToNote (
1671  S_msrNote note);
1672 
1673  void copyNoteElementsToChord (
1674  S_msrNote note, S_msrChord chord);
1675 
1676  void copyNoteDynamicsToChord (
1677  S_msrNote note, S_msrChord chord);
1678  void copyNoteOtherDynamicsToChord (
1679  S_msrNote note, S_msrChord chord);
1680  void copyNoteWordsToChord (
1681  S_msrNote note, S_msrChord chord);
1682  void copyNoteTieToChord (
1683  S_msrNote note, S_msrChord chord);
1684  void copyNoteSlursToChord (
1685  S_msrNote note, S_msrChord chord);
1686  void copyNoteLigaturesToChord (
1687  S_msrNote note, S_msrChord chord);
1688  void copyNotePedalsToChord (
1689  S_msrNote note, S_msrChord chord);
1690  void copyNoteSlashesToChord (
1691  S_msrNote note, S_msrChord chord);
1692  void copyNoteWedgesToChord (
1693  S_msrNote note, S_msrChord chord);
1694  void copyNoteOctaveShiftToChord (
1695  S_msrNote note, S_msrChord chord);
1696 
1697  void copyNoteGraceNotesGroupsToChord (
1698  S_msrNote note, S_msrChord chord);
1699 
1700  void copyNoteHarmoniesToChord (
1701  S_msrNote note, S_msrChord chord);
1702 
1703  // technicals handling
1704  // ------------------------------------------------------
1705 
1706  list<S_msrTechnical> fCurrentTechnicalsList;
1707  list<S_msrTechnicalWithInteger>
1708  fCurrentTechnicalWithIntegersList;
1709  list<S_msrTechnicalWithFloat>
1710  fCurrentTechnicalWithFloatsList;
1711  list<S_msrTechnicalWithString>
1712  fCurrentTechnicalWithStringsList;
1713 
1714  bool fOnGoingTechnical;
1715 
1716  float fBendAlterValue;
1717 
1718  void attachCurrentTechnicalsToNote (
1719  S_msrNote note);
1720  void attachCurrentTechnicalWithIntegersToNote (
1721  S_msrNote note);
1722  void attachCurrentTechnicalWithFloatsToNote (
1723  S_msrNote note);
1724  void attachCurrentTechnicalWithStringsToNote (
1725  S_msrNote note);
1726 
1727 // void attachCurrentTechnicalsToChord ( // JMI
1728  // S_msrChord chord);
1729 
1730  void copyNoteTechnicalsToChord (
1731  S_msrNote note, S_msrChord chord);
1732  void copyNoteTechnicalWithIntegersToChord (
1733  S_msrNote note, S_msrChord chord);
1734  void copyNoteTechnicalWithFloatsToChord (
1735  S_msrNote note, S_msrChord chord);
1736  void copyNoteTechnicalWithStringsToChord (
1737  S_msrNote note, S_msrChord chord);
1738 
1739  // ornaments handling
1740  // ------------------------------------------------------
1741 
1742  list<S_msrOrnament> fCurrentOrnamentsList;
1743 
1744  void attachCurrentOrnamentsToNote (
1745  S_msrNote note);
1746 
1747 // void attachCurrentOrnamentsToChord ( // JMI
1748  // S_msrChord chord);
1749 
1750  void copyNoteOrnamentsToChord (
1751  S_msrNote note, S_msrChord chord);
1752 
1753  // spanners handling
1754  // ------------------------------------------------------
1755 
1756  S_msrSpanner fCurrentWavyLineSpannerStart;
1757 
1758  list<S_msrSpanner> fCurrentSpannersList;
1759 
1760  void attachCurrentSpannersToNote (
1761  S_msrNote note);
1762 
1763  void copyNoteSpannersToChord (
1764  S_msrNote note, S_msrChord chord);
1765 
1766  // stems handling
1767  // ------------------------------------------------------
1768 
1769  vector<S_msrStem> fPendingStemsVector; // stack JMI ???
1770 
1771  void copyNoteStemToChord (
1772  S_msrNote note, S_msrChord chord);
1773 
1774  // beams handling
1775  // ------------------------------------------------------
1776 
1777  list<S_msrBeam> fPendingBeamsList;
1778 
1779  void attachPendingBeamsToNote (
1780  S_msrNote note);
1781  void copyNoteBeamsToChord (
1782  S_msrNote note, S_msrChord chord);
1783 
1784  // glissandos handling
1785  // ------------------------------------------------------
1786 
1787  list<S_msrGlissando> fPendingGlissandosList;
1788 
1789  // slides handling
1790  // ------------------------------------------------------
1791 
1792  list<S_msrSlide> fPendingSlidesList;
1793 
1794  // tremolos handling
1795  // ------------------------------------------------------
1796 
1797  bool fCurrentNoteBelongsToADoubleTremolo; // JMI ???
1798 
1799  msrTremoloTypeKind fCurrentTremoloTypeKind;
1800 
1801  S_msrSingleTremolo fCurrentSingleTremolo;
1802 
1803  S_msrDoubleTremolo fCurrentDoubleTremolo;
1804 
1805  void attachCurrentSingleTremoloToNote (
1806  S_msrNote note);
1807 
1808  void copyNoteSingleTremoloToChord (
1809  S_msrNote note, S_msrChord chord);
1810 
1811  // chords handling
1812  // ------------------------------------------------------
1813 
1814  bool fCurrentNoteBelongsToAChord;
1815 
1816 /* JMI
1817  // map<S_msrVoice, S_msrChord> // seems buggy in g++ 4.9.x, so
1818  // we use a pair containing the staff and voice numbers:
1819  map<pair<int, int>, S_msrChord>
1820  fVoicesCurrentChordMap;
1821  */
1822 
1823  S_msrChord fCurrentChord;
1824  bool fOnGoingChord;
1825 
1826  S_msrChord createChordFromItsFirstNote (
1827  int inputLineNumber,
1828  S_msrVoice voice,
1829  S_msrNote chordFirstNote,
1830  msrNote::msrNoteKind noteKind);
1831 
1832 /* JMI
1833  void registerVoiceCurrentChordInMap (
1834  int inputLineNumber,
1835  S_msrVoice voice,
1836  S_msrChord chord);
1837 
1838  void printVoicesCurrentChordMap ();
1839  */
1840  void printCurrentChord ();
1841 
1842  // tuplets handling
1843  // ------------------------------------------------------
1844 
1845  bool fCurrentNoteHasATimeModification;
1846 
1847  int fCurrentNoteActualNotes;
1848  int fCurrentNoteNormalNotes;
1849  msrDurationKind fCurrentNoteNormalTypeDuration;
1850 
1851  // nested tuplets are numbered 1, 2, ...
1852  int fCurrentTupletNumber;
1853  int fPreviousTupletNumber;
1854 
1855  bool fOnGoingTupletActual;
1856  int fCurrentTupletActualNumber;
1857  string fCurrentTupletActualType;
1858  int fCurrentTupletActualDotsNumber;
1859 
1860  bool fOnGoingTupletNormal;
1861  int fCurrentTupletNormalNumber;
1862  string fCurrentTupletNormalType;
1863  int fCurrentTupletNormalDotsNumber;
1864 
1865  msrTuplet::msrTupletTypeKind
1866  fCurrentTupletTypeKind;
1867  msrTuplet::msrTupletLineShapeKind
1868  fCurrentTupletLineShapeKind;
1869  msrTuplet::msrTupletBracketKind
1870  fCurrentTupletBracketKind;
1871  msrTuplet::msrTupletShowNumberKind
1872  fCurrentTupletShowNumberKind;
1873  msrTuplet::msrTupletShowTypeKind
1874  fCurrentTupletShowTypeKind;
1875  int fCurrentTempoTupletNumber;
1876 
1877  bool fCurrentNoteBelongsToATuplet;
1878 
1879  list<S_msrTuplet> fTupletsStack;
1880  void displayTupletsStack (string context);
1881 
1882  bool fCurrentATupletStopIsPending;
1883 
1884  void createTupletWithItsFirstNoteAndPushItToTupletsStack (
1885  S_msrNote note);
1886 
1887  void handlePendingTupletStopIfAny (
1888  int inputLineNumber,
1889  S_msrNote note);
1890 
1891  void finalizeTupletAndPopItFromTupletsStack (
1892  int inputLineNumber);
1893 
1894  void handleTupletsPendingOnTupletsStack (
1895  int inputLineNumber);
1896 
1897  // map<S_msrVoice, S_msrTuplet> seems buggy in g++ 4.9.x, so
1898  // we use a pair containing the staff and voice numbers:
1899 // map<S_msrVoice, S_msrTuplet>
1900  map<pair<int, int>, S_msrTuplet>
1901  fLastHandledTupletInVoiceMap;
1902 
1903  void displayLastHandledTupletInVoiceMap (
1904  string header);
1905 
1906  // ties handling
1907  // ------------------------------------------------------
1908 
1909 // JMI string fCurrentTiedType;
1910  msrTie::msrTieKind fCurrentTieKind;
1911  string fCurrentTiedOrientation; // JMI
1912  S_msrTie fCurrentTie;
1913 
1914  // slurs handling
1915  // ------------------------------------------------------
1916 
1917  string fCurrentSlurType;
1918  msrSlur::msrSlurTypeKind fCurrentSlurTypeKind;
1919  bool fOnGoingSlur;
1920  bool fOnGoingSlurHasStanza;
1921 
1922  list<S_msrSlur> fSlurStartsStack;
1923  void displaySlurStartsStack (
1924  string context);
1925 
1926  // ligatures handling
1927  // ------------------------------------------------------
1928 
1929  S_msrLigature fCurrentLigatureStartAbove;
1930  S_msrLigature fCurrentLigatureStartBelow;
1931 
1932  string fCurrentLigaturePlacement;
1933  msrLigature::msrLigatureKind
1934  fCurrentLigatureKind;
1935  bool fOnGoingLigature;
1936  bool fOnGoingLigatureHasStanza;
1937 
1938  // piano pedals handling
1939  // ------------------------------------------------------
1940 
1941  list<S_msrPedal> fPendingPedalsList;
1942 
1943 /* JMI
1944  msrDamperPedal::damperPedalKind
1945  fCurrentDamperPedalKind;
1946  int fCurrentDamperPedalIntegerValue;
1947 
1948  msrDamperPedal::damperPedalKind
1949  fCurrentDamperPedalKind;
1950  int fCurrentDamperPedalIntegerValue;
1951 
1952  msrDamperPedal::damperPedalKind
1953  fCurrentDamperPedalKind;
1954  int fCurrentDamperPedalIntegerValue;
1955 */
1956 
1957  // harp pedals handling
1958  // ------------------------------------------------------
1959 
1960  msrDiatonicPitchKind fCurrentHarpPedalDiatonicPitchKind;
1961  msrAlterationKind fCurrentHarpPedalAlterationKind;
1962  S_msrHarpPedalsTuning fCurrentHarpPedalsTuning;
1963 
1964  // backup handling
1965  // ------------------------------------------------------
1966 
1967  int fCurrentBackupDivisions;
1968  bool fOnGoingBackup;
1969 
1970  void handleBackup (
1971  int inputLineNumber);
1972 
1973  // forward handling
1974  // ------------------------------------------------------
1975 
1976  int fCurrentForwardDivisions;
1977  int fCurrentForwardVoiceNumber;
1978  int fCurrentForwardStaffNumber;
1979  bool fOnGoingForward;
1980 
1981 
1982  // current ongoing values display
1983  // ------------------------------------------------------
1984  void displayCurrentOnGoingValues ();
1985 };
1986 
1987 
1988 }
1989 
1990 
1991 #endif
Definition: utilities.h:213
Definition: mxmlTree2MsrTranslator.h:403
Definition: visitor.h:27
Rational number representation.
Definition: rational.h:25