예제 #1
0
        public PsamViewBuilder()
        {
            _notes   = new List <MusicalSymbol>();
            _symbols = new List <MusicalSymbol>();
            _buffer  = new List <NoteBeams>();

            _meter = null;
        }
예제 #2
0
        public void Reset()
        {
            _notes.Clear();
            _symbols.Clear();
            _buffer.Clear();

            _meter = null;
        }
예제 #3
0
        private void AddTimeSignature(TimeSignature ts)
        {
            if (_buffer.Count > 0)
            {
                FlushBuffer();
            }
            if (_notes.Count > 0)
            {
                Build();
            }

            if (_meter != ts) // only add meter when it is different from the previous one
            {
                if (_meter != null)
                {
                    _symbols.Add(new Barline());
                }
                _symbols.Add(new PSAMTimeSignature(TimeSignatureType.Numbers, (uint)ts.Ticks,
                                                   (uint)ts.Beat));
                _meter = ts;
            }
        }