Exemplo n.º 1
0
        /// <summary>
        /// Creates an ABC player. Uses static properties DefaultOctave and DefaultAccidentalPropagation and strict=true if
        /// arguments are left blank.
        /// </summary>
        public ABCPlayer(bool strict = true, int?octave = null, AccidentalPropagation?accidentalProp = null)
            : base()
        {
            AutoDetectLotro  = true;
            settings         = new ABCSettings();
            settings.MaxSize = 1024 * 12;

            this.strict = strict;
            accidentals = new Dictionary <string, int>();
            tiedNotes   = new Dictionary <string, int>();

            if (octave.HasValue)
            {
                this.octave = octave.Value;
            }
            else
            {
                this.octave = DefaultOctave;
            }

            if (accidentalProp.HasValue)
            {
                this.accidentalPropagation = accidentalProp.Value;
            }
            else
            {
                this.accidentalPropagation = DefaultAccidentalPropagation;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an ABC player. Uses static properties DefaultOctave and DefaultAccidentalPropagation and strict=true if
        /// arguments are left blank.
        /// </summary>
        public ABCPlayer(bool strict = true, int? octave = null, AccidentalPropagation? accidentalProp = null)
            : base()
        {
            AutoDetectLotro = true;
            settings = new ABCSettings();
            settings.MaxSize = 1024 * 12;

            this.strict = strict;
            accidentals = new Dictionary<string, int>();
            tiedNotes = new Dictionary<string, int>();

            if (octave.HasValue)
                this.octave = octave.Value;
            else
                this.octave = DefaultOctave;

            if (accidentalProp.HasValue)
                this.accidentalPropagation = accidentalProp.Value;
            else
                this.accidentalPropagation = DefaultAccidentalPropagation;
        }