AlphaTab.Audio.Generator.MidiFileGenerator.GenerateTremoloPicking C# (CSharp) Метод

GenerateTremoloPicking() приватный Метод

private GenerateTremoloPicking ( Note note, int noteStart, int noteDuration, int noteKey, DynamicValue dynamicValue ) : void
note AlphaTab.Model.Note
noteStart int
noteDuration int
noteKey int
dynamicValue DynamicValue
Результат void
        private void GenerateTremoloPicking(Note note, int noteStart, int noteDuration, int noteKey, DynamicValue dynamicValue)
        {
            var track = note.Beat.Voice.Bar.Staff.Track;
            var tpLength = note.Beat.TremoloSpeed.Value.ToTicks();
            var tick = noteStart;
            while (tick + 10 < (noteStart + noteDuration))
            {
                // only the rest on last trill play
                if ((tick + tpLength) >= (noteStart + noteDuration))
                {
                    tpLength = (noteStart + noteDuration) - tick;
                }
                _handler.AddNote(track.Index, tick, tpLength, (byte)noteKey, dynamicValue, (byte)track.PlaybackInfo.PrimaryChannel);
                tick += tpLength;
            }
        }