Exemplo n.º 1
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();

            dirnote.AddFirst(XElement.Parse("<direction><direction-type><wedge type=\"stop\"/></direction-type></direction>"));
            return(dirnote);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote   = SubRhythm.GetXml();
            XElement note      = dirnote.Element("note");
            XElement notations = note?.Element("notations");

            if (notations == null)
            {
                note?.Add(XElement.Parse("<notations><ornaments><tremolo type=\"single\">1</tremolo></ornaments></notations>"));
            }
            else
            {
                XElement orns = notations.Element("ornaments");
                if (orns == null)
                {
                    notations.Add(XElement.Parse("<ornaments><tremolo type=\"single\">1</tremolo></ornaments>"));
                }
                else
                {
                    XElement trem = orns.Element("tremolo");
                    if (trem == null)
                    {
                        orns.Add(XElement.Parse("<tremolo type=\"single\">1</tremolo>"));
                    }
                    else
                    {
                        if ((int)trem.Elements().First() != 1)
                        {
                            trem.ReplaceAll(1);
                        }
                    }
                }
            }
            return(dirnote);
        }
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote   = SubRhythm.GetXml();
            XElement note      = dirnote.Element("note");
            XElement notations = note?.Element("notations");

            if (notations == null)
            {
                note?.Add(XElement.Parse("<notations><articulations><strong-accent/></articulations></notations>"));
            }
            else
            {
                XElement artics = notations.Element("articulations");
                if (artics == null)
                {
                    notations.Add(XElement.Parse("<articulations><strong-accent/></articulations>"));
                }
                else
                {
                    if (artics.Element("strong-accent") == null)
                    {
                        artics.Add(XElement.Parse("<strong-accent/>"));
                    }
                }
            }
            return(dirnote);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();
            XElement note    = dirnote.Element("note");

            note?.Add(XElement.Parse("<rest/>"));
            return(dirnote);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();
            XElement note    = dirnote.Element("note");

            note?.Add(XElement.Parse("<beam number=\"" + number + "\">" + state + "</beam>"));
            return(dirnote);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();
            XElement note    = dirnote.Element("note");
            XElement dot     = note?.Element("dot");

            if (dot == null)
            {
                note?.Add(XElement.Parse("<dot/>"));
            }
            return(dirnote);
        }
Exemplo n.º 7
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();
            XElement note    = dirnote.Element("note");
            XElement head    = note?.Element("notehead");

            if (head == null)
            {
                note?.Add(XElement.Parse("<notehead font-weight=\"bold\">cross</notehead>"));
            }
            else
            {
                head.ReplaceAll("cross");
            }
            return(dirnote);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();
            XElement note    = dirnote.Element("note");

            if (note == null)
            {
                return(dirnote);
            }
            XElement notation = note.Element("notations");

            if (notation == null)
            {
                notation = new XElement("notations");
                note.Add(notation);
            }
            notation.Add(XElement.Parse("<tuplet type=\"stop\" bracket=\"yes\" number=\"" + number + "\"/>"));
            return(dirnote);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
        /// </summary>
        /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
        public XElement GetXml()
        {
            XElement dirnote = SubRhythm.GetXml();
            XElement note    = dirnote.Element("note");
            XElement head    = note?.Element("notehead");

            if (head == null)
            {
                note?.Add(XElement.Parse("<notehead>ti</notehead>"));
            }
            else
            {
                head.ReplaceAll("ti");
            }
            XElement pitch = note?.Element("unpitched");
            XElement step  = pitch?.Element("display-step");

            step?.ReplaceAll("D");
            return(dirnote);
        }
Exemplo n.º 10
0
 /// <summary>
 /// Does this note have the flat flam rudiment?
 /// </summary>
 /// <returns>bool answer</returns>
 public bool IsFlatFlam()
 {
     return(SubRhythm.IsFlatFlam());
 }
Exemplo n.º 11
0
 /// <summary>
 /// Retrieves the musicXml that corresponds to this class and all that it encapsulates.
 /// </summary>
 /// <returns><see cref="XElement"/> containing the required musicXml.</returns>
 public XElement GetXml()
 {
     return(SubRhythm.GetXml());
 }