public static byte GetId(this Tone tone, bool sharped) { var attrib = tone.GetAttribute <ToneInfoAttribute>(); byte id = (byte)(sharped && attrib.IsSharpable ? attrib.Id + 1 : attrib.Id); return((byte)(id % Note.TONES_COUNT)); }
public static bool IsSharpable(this Tone tone) { var attrib = tone.GetAttribute <ToneInfoAttribute>(); return(attrib.IsSharpable); }