Example #1
0
 public override char GetCharacter(IMusicFont font)
 {
     if (BaseDuration == RhythmicDuration.Whole)
     {
         return(font.RestWhole);
     }
     else if (BaseDuration == RhythmicDuration.Half)
     {
         return(font.RestHalf);
     }
     else if (BaseDuration == RhythmicDuration.Quarter)
     {
         return(font.RestQuarter);
     }
     else if (BaseDuration == RhythmicDuration.Eighth)
     {
         return(font.RestEighth);
     }
     else if (BaseDuration == RhythmicDuration.Sixteenth)
     {
         return(font.RestSixteenth);
     }
     else if (BaseDuration == RhythmicDuration.D32nd)
     {
         return(font.Rest32nd);
     }
     return('\0');
 }
 public char GetNoteFlagCharacter(IMusicFont font, bool isReverse)
 {
     if (BaseDuration == RhythmicDuration.Eighth)
     {
         return(isReverse ? font.NoteFlagEighthRev : font.NoteFlagEighth);
     }
     else if (BaseDuration == RhythmicDuration.Sixteenth)
     {
         return(isReverse ? font.NoteFlagSixteenthRev : font.NoteFlagSixteenth);
     }
     else if (BaseDuration == RhythmicDuration.D32nd)
     {
         return(isReverse ? font.NoteFlag32ndRev : font.NoteFlag32nd);
     }
     else if (BaseDuration == RhythmicDuration.D64th)
     {
         return(isReverse ? font.NoteFlag64thRev : font.NoteFlag64th);
     }
     else if (BaseDuration == RhythmicDuration.D128th)
     {
         return(isReverse ? font.NoteFlag128thRev : font.NoteFlag128th);
     }
     else
     {
         return('\0');
     }
 }
Example #3
0
 public char GetCharacter(IMusicFont font)
 {
     if (SignatureType == TimeSignatureType.Common)
     {
         return(font.CommonTime);
     }
     else if (SignatureType == TimeSignatureType.Cut)
     {
         return(font.CutTime);
     }
     else
     {
         return('\0');
     }
 }
Example #4
0
 public char GetCharacter(IMusicFont font)
 {
     if (fifths > 0)
     {
         return(font.Sharp);
     }
     else if (fifths < 0)
     {
         return(font.Flat);
     }
     else
     {
         return('\0');
     }
 }
 public char GetCharacter(IMusicFont font)
 {
     if (RepeatSign == RepeatSignType.Backward)
     {
         return(font.RepeatBackward);
     }
     else if (RepeatSign == RepeatSignType.Forward)
     {
         return(font.RepeatForward);
     }
     else
     {
         return('\0');
     }
 }
        public override char GetCharacter(IMusicFont font)
        {
            switch (Size)
            {
            case NoteOrRestSize.Full:
                if (BaseDuration == RhythmicDuration.DoubleWhole)
                {
                    return(font.NoteDoubleWhole);
                }
                else if (BaseDuration == RhythmicDuration.Whole)
                {
                    return(font.NoteWhole);
                }
                else if (BaseDuration == RhythmicDuration.Half)
                {
                    return(font.NoteheadHalf);
                }
                else
                {
                    return(font.NoteheadBlack);
                }

            case NoteOrRestSize.Cue:
                if (BaseDuration == RhythmicDuration.DoubleWhole)
                {
                    return(font.NoteDoubleWholeCue);
                }
                else if (BaseDuration == RhythmicDuration.Whole)
                {
                    return(font.NoteWholeCue);
                }
                else if (BaseDuration == RhythmicDuration.Half)
                {
                    return(font.NoteheadHalfCue);
                }
                else
                {
                    return(font.NoteheadBlackCue);
                }

            case NoteOrRestSize.Large:
                if (BaseDuration == RhythmicDuration.DoubleWhole)
                {
                    return(font.NoteDoubleWholeLarge);
                }
                else if (BaseDuration == RhythmicDuration.Whole)
                {
                    return(font.NoteWholeLarge);
                }
                else if (BaseDuration == RhythmicDuration.Half)
                {
                    return(font.NoteheadHalfLarge);
                }
                else
                {
                    return(font.NoteheadBlackLarge);
                }

            default:
                throw new Exception($"Note size {Size} not supported.");
            }
        }
 public char GetCharacter(IMusicFont font)
 {
     if (typeOfClef == ClefType.GClef && OctaveChange == 1)
     {
         return(font.GClef8va);
     }
     else if (typeOfClef == ClefType.GClef && OctaveChange == -1)
     {
         return(font.GClef8vb);
     }
     else if (typeOfClef == ClefType.GClef && OctaveChange == 2)
     {
         return(font.GClef15ma);
     }
     else if (typeOfClef == ClefType.GClef && OctaveChange == -2)
     {
         return(font.GClef15mb);
     }
     else if (typeOfClef == ClefType.GClef)
     {
         return(font.GClef);
     }
     else if (typeOfClef == ClefType.FClef && OctaveChange == 1)
     {
         return(font.FClef8va);
     }
     else if (typeOfClef == ClefType.FClef && OctaveChange == -1)
     {
         return(font.FClef8vb);
     }
     else if (typeOfClef == ClefType.FClef && OctaveChange == 2)
     {
         return(font.FClef15ma);
     }
     else if (typeOfClef == ClefType.FClef && OctaveChange == -2)
     {
         return(font.FClef15mb);
     }
     else if (typeOfClef == ClefType.FClef)
     {
         return(font.FClef);
     }
     else if (typeOfClef == ClefType.CClef && OctaveChange == 1)
     {
         return(font.CClef8va);
     }
     else if (typeOfClef == ClefType.CClef && OctaveChange == -1)
     {
         return(font.CClef8vb);
     }
     else if (typeOfClef == ClefType.CClef && OctaveChange == 2)
     {
         return(font.CClef15ma);
     }
     else if (typeOfClef == ClefType.CClef && OctaveChange == -2)
     {
         return(font.CClef15mb);
     }
     else if (typeOfClef == ClefType.CClef)
     {
         return(font.CClef);
     }
     else if (typeOfClef == ClefType.Percussion)
     {
         return(font.PercussionClef);
     }
     else
     {
         return('\0');
     }
 }
Example #8
0
 public char GetCharacter(IMusicFont font)
 {
     return(IsInverted ? font.MordentInverted : font.Mordent);
 }