Beispiel #1
0
 public Score()
 {
     MasterBars          = new FastList <MasterBar>();
     Tracks              = new FastList <Track>();
     _currentRepeatGroup = new RepeatGroup();
     Album = Artist = Copyright = Instructions = Music = Notices = SubTitle = Title = Words = Tab = TempoLabel = "";
     Tempo = 120;
 }
Beispiel #2
0
        internal void RebuildRepeatGroups()
        {
            var currentGroup = new RepeatGroup();

            foreach (var bar in MasterBars)
            {
                // if the group is closed only the next upcoming header can
                // reopen the group in case of a repeat alternative, so we
                // remove the current group
                if (bar.IsRepeatStart || (_currentRepeatGroup.IsClosed && bar.AlternateEndings <= 0))
                {
                    currentGroup = new RepeatGroup();
                }
                currentGroup.AddMasterBar(bar);
            }
        }
Beispiel #3
0
        public void AddMasterBar(MasterBar bar)
        {
            bar.Score = this;
            bar.Index = MasterBars.Count;
            if (MasterBars.Count != 0)
            {
                bar.PreviousMasterBar = MasterBars[MasterBars.Count - 1];
                bar.PreviousMasterBar.NextMasterBar = bar;
                bar.Start = bar.PreviousMasterBar.Start + bar.PreviousMasterBar.CalculateDuration();
            }

            // if the group is closed only the next upcoming header can
            // reopen the group in case of a repeat alternative, so we
            // remove the current group
            if (bar.IsRepeatStart || (_currentRepeatGroup.IsClosed && bar.AlternateEndings <= 0))
            {
                _currentRepeatGroup = new RepeatGroup();
            }
            _currentRepeatGroup.AddMasterBar(bar);
            MasterBars.Add(bar);
        }
Beispiel #4
0
 public Score()
 {
     MasterBars          = new FastList <MasterBar>();
     Tracks              = new FastList <Track>();
     _currentRepeatGroup = new RepeatGroup();
 }
Beispiel #5
0
 public Score()
 {
     MasterBars = new FastList<MasterBar>();
     Tracks = new FastList<Track>();
     _currentRepeatGroup = new RepeatGroup();
 }
Beispiel #6
0
        public void AddMasterBar(MasterBar bar)
        {
            bar.Score = this;
            bar.Index = MasterBars.Count;
            if (MasterBars.Count != 0)
            {
                bar.PreviousMasterBar = MasterBars[MasterBars.Count - 1];
                bar.PreviousMasterBar.NextMasterBar = bar;
                bar.Start = bar.PreviousMasterBar.Start + bar.PreviousMasterBar.CalculateDuration();
            }

            // if the group is closed only the next upcoming header can
            // reopen the group in case of a repeat alternative, so we 
            // remove the current group 
            if (bar.IsRepeatStart || (_currentRepeatGroup.IsClosed && bar.AlternateEndings <= 0))
            {
                _currentRepeatGroup = new RepeatGroup();
            }
            _currentRepeatGroup.AddMasterBar(bar);
            MasterBars.Add(bar);
        }