Example #1
0
            internal MusicObject SelectMethod(T input)
            {
                MusicObject temporary = _selectorFunction(input, _count);

                _count++;
                return(temporary);
            }
Example #2
0
        /// <summary>
        /// Plays the MusicObject at the given start time, using this instrument.
        /// Start time is measured in beats from the start of the music. Get the curent time by calling CurrentTime from the orchestra.
        /// </summary>
        /// <param name="startTime">The moment when the music should play. </param>
        /// <param name="music">The music to play. </param>
        public void Play(double startTime, MusicObject music)
        {
            List <SingleBeat> singleBeats = new List <SingleBeat>(
                music
                .GetChildren(this, startTime)
                .Where(x => !(x.ToneVelocity == 0xff && x.Tone == 0xff))
                //.Select(offsetByOctave)
                );

            _orchestra.CopyToOutput(singleBeats);
        }
Example #3
0
 /// <summary>
 /// Plays the MusicObject using this instrument.
 /// </summary>
 /// <param name="music"> The music that the user wants played</param>
 public void Play(MusicObject music)
 {
     Play(_orchestra.CurrentTime(), music);
 }
Example #4
0
 public void Play (MusicObject music)
 {
     throw new NotImplementedException();
 }