Module xNoteCapture
[Static] Capture the note at the current position, or previous if no previous is found, find the next one
Functions
previous (compare_fn, notepos, end_seq_idx) | [Static] Capture the previous note, starting from (but not including) pos |
next (compare_fn, notepos, end_seq_idx) | [Static] Capture the next note, starting from (but not including) pos |
search_track (notepos, compare_fn, reverse) | [Static] Iterate from notepos to end of pattern, or when reversed, notepos to patt.start |
compare_line (lines, count, line_idx, notepos, compare_fn) | [Static] Invoke the callback method to compare a given line |
Functions
- previous (compare_fn, notepos, end_seq_idx)
-
[Static] Capture the previous note, starting from (but not including) pos
Parameters:
- compare_fn (function)
- notepos (xCursorPos)
- end_seq_idx (int)[optional], stop searching at this sequence index
Returns:
- xCursorPos or nil
- number (lines travelled) or nil
- next (compare_fn, notepos, end_seq_idx)
-
[Static] Capture the next note, starting from (but not including) pos
Parameters:
- compare_fn (function)
- notepos (xCursorPos)
- end_seq_idx (int)[optional], stop searching at this sequence index
Returns:
- xCursorPos or nil
- number (lines travelled) or nil
- search_track (notepos, compare_fn, reverse)
-
[Static] Iterate from notepos to end of pattern, or when reversed, notepos to patt.start
Parameters:
- notepos (xCursorPos)
- compare_fn (function)
- reverse (boolean) reverse iteration
Returns:
-
xCursorPos or nil if not matched
- compare_line (lines, count, line_idx, notepos, compare_fn)
-
[Static] Invoke the callback method to compare a given line
Parameters:
- lines
(table
) - count (number)
- line_idx (number)
- notepos (xCursorPos)
- compare_fn (function)
Returns:
-
xCursorPos or nil if not matched
- lines
(table