Beispiel #1
0
        public void setConnectedBars()
        {
            IChordBounds prev_chord = null;

            foreach (IChordBounds chord in Chords)
            {
                if (prev_chord != null && prev_chord.Bounds.Bar == chord.Bounds.Bar)
                {
                    int prev_conn = Math.Min(prev_chord.ChordBar.TotalBars, chord.ChordBar.TotalBars);
                    prev_chord.ChordBar.RightConnected = prev_conn;
                    chord.ChordBar.LeftConnected       = prev_conn;
                }
                prev_chord = chord;
            }
        }
Beispiel #2
0
        public List <IChordBounds> getBeat(List <IChordBounds> measure_chords)
        {
            var chords = new List <IChordBounds>();

            while (needsToAddChord())
            {
                IChordBounds to_add = measure_chords.FirstOrDefault();
                if (to_add is null)
                {
                    return(chords);
                }

                chords.Add(to_add);
                space_taken += to_add.getChord().Length.getLength();
                measure_chords.Remove(to_add);
            }

            return(chords);
        }