Exemple #1
0
        public PsamContolLib()
        {
            durriation = new Dictionary <float, MusicalSymbolDuration>()
            {
                { 1, MusicalSymbolDuration.Whole },
                { 2, MusicalSymbolDuration.Half },
                { 4, MusicalSymbolDuration.Quarter },
                { 8, MusicalSymbolDuration.Eighth },
                { 16, MusicalSymbolDuration.Sixteenth },
                { 32, MusicalSymbolDuration.d32nd },
                { 64, MusicalSymbolDuration.d64th },
                { 128, MusicalSymbolDuration.d128th }
            };
            actions = new Dictionary <Type, Action>
            {
                { typeof(DomainModel.Note), DoNote },
                { typeof(DomainModel.BarLine), DoRepeat },
            };


            clefs = new Dictionary <DomainModel.Clef.Key, ClefType>
            {
                { DomainModel.Clef.Key.C, ClefType.CClef },
                { DomainModel.Clef.Key.F, ClefType.FClef },
                { DomainModel.Clef.Key.G, ClefType.GClef }
            };
            clef        = new DomainModel.Clef();
            reapeatType = new Dictionary <BarLine.TYPE, RepeatSignType>
            {
                { DomainModel.BarLine.TYPE.NORMAL, RepeatSignType.None },
                { DomainModel.BarLine.TYPE.START, RepeatSignType.Forward },
                { DomainModel.BarLine.TYPE.REPEAT, RepeatSignType.Backward }
            };
            timeSignature = new DomainModel.TimeSignature();
            semitones     = new Dictionary <Semitone.SEMITONE, int>
            {
                { Semitone.SEMITONE.MAJOR, -1 },
                { Semitone.SEMITONE.MINOR, 1 },
                { Semitone.SEMITONE.NORMAL, 0 }
            };
        }
Exemple #2
0
 public void SetClef(Clef clef)
 {
     this.clef = clef;
 }