// Duration in number of notes, simply to draw in the piano roll. public int GetSlideNoteDuration(Note note, int patternIdx, int noteIdx) { Debug.Assert(note.IsMusical); FindNextNoteForSlide(patternIdx, noteIdx, 256, out var nextPatternIdx, out var nextNoteIdx); // 256 is kind of arbitrary. return(Song.CountNotesBetween(patternIdx, noteIdx, nextPatternIdx, nextNoteIdx)); }