diff --git a/Parser/Music/IMusicParser.cs b/Parser/Music/IMusicParser.cs
index 53a1d8d..d6e6f9c 100644
--- a/Parser/Music/IMusicParser.cs
+++ b/Parser/Music/IMusicParser.cs
@@ -11,40 +11,41 @@
using Irony.Parsing;
-using PGSoftwareSolutions.PGIrony;
-
namespace PGSoftwareSolutions.Music {
- /// TODO
+ /// TODO
public interface IMusicParser {
- /// TODO
+ /// TODO
T Parse(string music);
- /// TODO
+ /// TODO
T Parse(TextReader reader);
}
- /// TODO
+ /// Note types.
+ ///
+ /// Note length can be calculated as Math.Pow(2,-Value).
+ ///
public enum NoteType {
- /// TODO
+ /// A quadruple whole note.
Longa = -2,
- /// TODO
+ /// A double whole note.
Breve = -1,
- /// TODO
+ /// A whole note.
SemiBreve,
- /// TODO
+ /// A half note.
Minim,
- /// TODO
+ /// A quarter note.
Crotchet,
- /// TODO
+ /// An Eighth note.
Quaver,
- /// TODO
+ /// A 16th note.
SemiQuaver,
- /// TODO
+ /// A 32nd Note.
DemiSemiQuaver,
- /// TODO
+ /// A 64th note.
HemiDemiSemiQuaver
}
- /// TODO
+ /// TODO
public static class NoteTypeExtensions {
- /// TODO
+ /// TODO
public static NoteType GetNoteType (this NoteType type, Int16 length) {
var i = (int)Math.Floor(Math.Log(length,2));
var n = (NoteType)(i);
@@ -54,13 +55,13 @@ public static NoteType GetNoteType (this NoteType type, Int16 length) {
}
}
- /// TODO
+ /// TODO
public interface IPitch {
- /// TODO
+ /// TODO
PianoKey PianoKey { get; }
- /// TODO
+ /// TODO
NoteLetter NoteLetter { get; }
- /// TODO
+ /// TODO
SharpFlat SharpFlat { get; }
}
@@ -68,68 +69,72 @@ public interface IPitch {
public enum Octave { _0, _1, _2, _3, _4, _5, _6, _7, _8 }
#pragma warning restore
- /// Play styles
- public struct Style {
- /// Legato
- public static Style L => new Style(_enum.L, "Legato", 0.950F);
- /// Normal
- public static Style N => new Style(_enum.N, "Normal", 0.875F);
- /// Staccato
- public static Style S => new Style(_enum.S, "Staccato", 0.750F);
+ /// Play styles
+ public struct Style {
+ /// Legato
+ public static Style L => new Style(_enum.L, "Legato", 0.950F);
+ /// Normal
+ public static Style N => new Style(_enum.N, "Normal", 0.875F);
+ /// Staccato
+ public static Style S => new Style(_enum.S, "Staccato", 0.750F);
- /// TODO
- public static Style ConvertValue(ParsingContext c, string s) =>
- _values[(int)(System.Enum.Parse(typeof(_enum), s.ToUpper()))];
+ /// TODO
+ public static Style ConvertValue(ParsingContext c, string s) =>
+ _values[(int)(System.Enum.Parse(typeof(_enum), s.ToUpper()))];
- private enum _enum {L,N,S};
- private static IList