/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <summary> /// Does this note have the flat flam rudiment? /// </summary> /// <returns>bool answer</returns> public bool IsFlatFlam() { return(SubRhythm.IsFlatFlam()); }
/// <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()); }