Пример #1
0
 public PatternActionResult Invoke(long time, PatternContext context)
 {
     context.SaveTime(time);
     return(new PatternActionResult(Time != null
         ? TimeConverter.ConvertFrom(Time, context.TempoMap)
         : context.RestoreTime()));
 }
Пример #2
0
        public PatternActionResult Invoke(long time, PatternContext context)
        {
            context.SaveTime(time);

            var newContext = new PatternContext(context.TempoMap, context.Channel);

            return(Pattern.InvokeActions(time, newContext));
        }
Пример #3
0
        public PatternActionResult Invoke(long time, PatternContext context)
        {
            context.SaveTime(time);

            var noteLength = LengthConverter.ConvertFrom(Length, time, context.TempoMap);

            var note = new Note(NoteDefinition.NoteNumber, noteLength, time)
            {
                Channel  = context.Channel,
                Velocity = Velocity
            };

            return(new PatternActionResult(time + noteLength, new[] { note }));
        }
Пример #4
0
 public override PatternActionResult Invoke(long time, PatternContext context)
 {
     context.SaveTime(time);
     return(new PatternActionResult(time + LengthConverter.ConvertFrom(Step, time, context.TempoMap)));
 }