- if (sym == "Discant")
- {
- Molecule r = fm->find_by_name ("accordion-accDiscant");
- m.add_molecule (r);
- if (reg.left_string (1) == "F")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- int eflag = 0x00;
- if (reg.left_string (3) == "EEE")
- {
- eflag = 0x07;
- reg = reg.right_string (reg.length ()-3);
- }
- else if (reg.left_string (2) == "EE")
- {
- eflag = 0x05;
- reg = reg.right_string (reg.length ()-2);
- }
- else if (reg.left_string (2) == "Eh")
- {
- eflag = 0x04;
- reg = reg.right_string (reg.length ()-2);
- }
- else if (reg.left_string (1) == "E")
- {
- eflag = 0x02;
- reg = reg.right_string (reg.length ()-1);
- }
- if (eflag & 0x02)
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
- m.add_molecule (d);
- }
- if (eflag & 0x04)
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
- d.translate_axis (0.8 * staff_space PT, X_AXIS);
- m.add_molecule (d);
- }
- if (eflag & 0x01)
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
- d.translate_axis (-0.8 * staff_space PT, X_AXIS);
- m.add_molecule (d);
- }
- if (reg.left_string (2) == "SS")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (0.5 * staff_space PT, Y_AXIS);
- d.translate_axis (0.4 * staff_space PT, X_AXIS);
- m.add_molecule (d);
- d.translate_axis (-0.8 * staff_space PT, X_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-2);
- }
- if (reg.left_string (1) == "S")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (0.5 * staff_space PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- }
- else if (sym == "Freebase")
- {
- Molecule r = fm->find_by_name ("accordion-accFreebase");
- m.add_molecule (r);
- if (reg.left_string (1) == "F")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- if (reg == "E")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
- m.add_molecule (d);
- }
- }
- else if (sym == "Bayanbase")
- {
- Molecule r = fm->find_by_name ("accordion-accBayanbase");
- m.add_molecule (r);
- if (reg.left_string (1) == "T")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- /* include 4' reed just for completeness. You don't want to use this. */
- if (reg.left_string (1) == "F")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- if (reg.left_string (2) == "EE")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
- d.translate_axis (0.4 * staff_space PT, X_AXIS);
- m.add_molecule (d);
- d.translate_axis (-0.8 * staff_space PT, X_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-2);
- }
- if (reg.left_string (1) == "E")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- }
- else if (sym == "Stdbase")
- {
- Molecule r = fm->find_by_name ("accordion-accStdbase");
- m.add_molecule (r);
- if (reg.left_string (1) == "T")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 3.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- if (reg.left_string (1) == "F")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 2.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- if (reg.left_string (1) == "M")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 2 PT, Y_AXIS);
- d.translate_axis (staff_space PT, X_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- if (reg.left_string (1) == "E")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 1.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- if (reg.left_string (1) == "S")
- {
- Molecule d = fm->find_by_name ("accordion-accDot");
- d.translate_axis (staff_space * 0.5 PT, Y_AXIS);
- m.add_molecule (d);
- reg = reg.right_string (reg.length ()-1);
- }
- }
- /* ugh maybe try to use regular font for S.B. and B.B and only use one font
- for the rectangle */
- else if (sym == "SB")
- {
- Molecule r = fm->find_by_name ("accordion-accSB");
- m.add_molecule (r);
- }
- else if (sym == "BB")
- {
- Molecule r = fm->find_by_name ("accordion-accBB");
- m.add_molecule (r);
- }
- else if (sym == "OldEE")
- {
- Molecule r = fm->find_by_name ("accordion-accOldEE");
- m.add_molecule (r);
- }
- else if (sym == "OldEES")
- {
- Molecule r = fm->find_by_name ("accordion-accOldEES");
- m.add_molecule (r);
- }
- return m;
-}