public MainPage() { this.InitializeComponent(); var score = Score.CreateOneStaffScore(Clef.Treble, MajorScale.C); score.FirstStaff.Elements.AddRange(StaffBuilder .FromPitches(Pitch.ChromaticRange(Pitch.C4, Pitch.C5, Pitch.MidiPitchTranslationMode.Auto).ToArray()) .AddRhythm(Enumerable.Repeat(4, 12).ToArray())); foreach (var element in score.FirstStaff.Elements) { } viewer.ScoreSource = score; }