示例#1
0
        public override IEnumerable <NoteWithDuration> Notes()
        {
            foreach (var nwd in Anacrusis)
            {
                yield return(nwd);
            }

            int i = 0;

            foreach (var fract in rhythm.Notes())
            {
                if (notes[i] is string)
                {
                    Note             note   = new Note(notes[i] as string);
                    NoteWithDuration notewd = new NoteWithDuration(note.note, note.alter, fract);
                    yield return(notewd);
                }
                else
                {
                    yield return(new NoteWithDuration((int)notes[i], fract));
                }
                i++;
            }
        }
示例#2
0
        public override IEnumerable <Fraction> Notes()
        {
            Fraction pos    = new Fraction(0, 0);
            int      lenght = pattern.Length - patternEnd.Length;

            foreach (var fract in pattern.Notes())
            {
                pos = pos + fract;

                if (((pos - lenght).p <= 0))
                {
                    yield return(fract);
                }
                else
                {
                    foreach (var f in patternEnd.Notes())
                    {
                        yield return(f);
                    }

                    yield break;
                }
            }
        }
示例#3
0
 public override IEnumerable <Fraction> Notes()
 {
     return(basePattern.Notes().Reverse());
 }