public PsamViewBuilder() { _notes = new List <MusicalSymbol>(); _symbols = new List <MusicalSymbol>(); _buffer = new List <NoteBeams>(); _meter = null; }
public void Reset() { _notes.Clear(); _symbols.Clear(); _buffer.Clear(); _meter = null; }
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; } }