Module Duplex.Applications.GridPie

Grid Pie lets you combine different parts of song, non-linearly, in real time.

Inheritance: Duplex.Application > Duplex.Application.GridPie

Discussion

Tool discussion is located on the Renoise forum

Changes

0.98.32

- FEATURE Support for blinking LEDs on monochrome devices

0.98.29

- FIXME Ignore pattern switching, when arriving in the last line of pattern
 (this avoids that using the Navigator will cause the pattern to switch)

0.99.23

- FIXME (Recording) better handling of patt. cloning near boundaries
- TWEAK “Keep the beat” changed to modify playback-pos less often
- FIXME Sess-rec.: “Stuttering” after short pattern (incremental_update)
- FIXME Assign to slot: use patt-idx, not seq-idx (doh!)
- FIXME Do not block “trigger gestures” in separate tracks
- FEATURE Record: when triggering a pattern, use incremental updates
- FEATURE Shorten pattern instead of modifying playback-pos (when possible)
- FEATURE skip group tracks when temp-muting
- FEATURE When muting track, delay note-off (to keep existing instr.)
- FIXME Incremental updates should use the master slot range only
- FIXME Don’t signal “dun goofed” when not started
- USABILITY Restore matrix state when GP pattern is “dun goofed”

0.99.22

- Overview of new features:
 - Realtime recording (including session recording)
 - Multitouch gestures (assign/resolve aliases, save combination, etc.)
 - Visualization of aliased slots, current track + pattern etc.
 - Configurable initialization and shutdown process (options)
 - Many smaller bug fixes, cleaner code ...
- Feature: assign an alias by pressing and holding a slot button (source), and
  then pressing another button in the same track. The procedure will only
  work when the source slot is already aliased or empty (to avoid accidents)
- Feature: to complement the assignment gesture just mentioned, you can hold
  the button pressed to “force-assign” slots that are empty, or unique
- Feature: resolve any aliased slots in the gridpie pattern to it’s master slot
  by pressing a slot in the gridpie pattern (the last pattern). Conceptually
  similar to the pattern-editor (arrow in the lower part of an aliased track)
- Feature: quickly store “homeless” content (a track in the gridpie pattern with
  no master slot), either by creating a new pattern to hold the data or by
  assigning the content to an existing slot
- Feature: hold a gridpie button to save the combination as a new pattern
- Feature: make an alias unique (un-alias) by holding it, then it’s gridpie slot
- Tweak: highlight the selected alias master slot (if any exists)
- Tweak: better visualization of the current track/sequence position
- New option: “highlight”, toggles track/sequence highlighting on/off
- New option: auto-start has been expanded into “initialization”
- New option: “shutdown”, use it to control the shutdown procedure
- Fixed: de-activating a group track will not send the brief mute (avoid click)
- Fixed: properly update mute state when gridpie is cloned
- Fixed: line notifiers could get lost when scrolling through the song
- Fixed: UI integration with Renoise pattern-matrix is gone (buggy)
- Restructured code, simplified things...

0.99.21

- Fixed: retain mute state when toggling a pattern off (hold x2)
- Fixed: track navigation could show wrong track on startup
- Feature: turbocharged mode (using a pattern cache along with aliased slots)
- Feature/workflow: (even) closer integration into Renoise
  + detect changes to mute states in the Renoise matrix (mouse+alt-click)
  + detect when a pattern has been scheduled in Renoise
  + disable pattern loop to allow song to play, pattern-by-pattern (1)
- Feature/workflow: ability to clone gridpie pattern while playing

(1) This, and pattern scheduling via Renoise can be considered experimental as
we can’t reliably detect a scheduled pattern. As a result, the first few
note(s) might be skipped!

0.99.20

- Edit-sync: automatic background-synchronization of pattern data
- Edit-sync: detect changes to the pattern length (source tracks)
- Update grid display as content is created or removed in the matrix
- Visualize the currently selected pattern (when the controller is able to)
- Attempt to maintain pattern matrix slot mute states at all times (1)
- Ability to clone the __GRID PIE__ pattern without stopping the application
- New option: Beat-measures (related to the improved ‘keep the beat’ feature)
- Fixed: removed display-glitch in the virtual UI (on startup)
- Fixed: remove all notifiers when app is stopped

(1) GridPie will attempt to retain as much information about the mute state of
the song as possible, as this is restored when we exit GridPie. Note however
that using drag-and-drop within the pattern sequence will cause the mute state
to become lost for the rearranged patterns. Simple insert/clone and delete
actions should not cause this to happen.

0.98.18

- Disable of “follow_player” now only enforced outside the grid-pie pattern

0.98.17

- fixed a bug in the “running start” feature (when switching away from Grid
  without having run the application)

0.98.16

- Features: “Keep the beat” and “running start”

0.98

- First release

Functions

__init (VarArg) Constructor method
_add_pending_update (src_patt_idx, pos) Method for adding pending updates, called whenever a pattern which is being monitored has changed and a track requires a copy-expansion.
_apply_pending_updates () copy/expand tracks once the scheduled updates have timed out
adapt_gridpie_pattern () prepare a newly cloned Grid Pie pattern before playback reaches it
is_session_recording () helper method to determine if we are currently recording a session
clear_lines (track_idx, patt_idx, start_line, end_line) clear lines using iterator
alias_slot (track_idx, alias_p_idx) set one of the recombination pattern-tracks as aliased
set_pattern_cache (patt_idx, track_idx, num_lines) update the internal pattern cache, called immediately after copy-expand
get_pattern_cache (patt_idx, track_idx) retrieve value from internal pattern cache
_set_page_sizes () apply the current settings to pagesizev and pagesizeh variables
_get_v_limit () figure out the upper boundary
_get_h_limit () Figure out the lower boundary
set_vertical_pos (idx) set the vertical position of the grid
set_horizontal_pos (idx) set the horizontal position of the grid
set_vertical_pos_page (seq_idx) set a pattern sequence index, quantized to page size
update_h_buttons () update buttons for horizontal navigation
update_v_buttons () update buttons for vertical navigation
update_v_slider () update slider for vertical navigation
update_h_slider () update slider for horizontal navigation
goto_prev_track_page () go to previous track-page
goto_next_track_page () go to next track-page
goto_first_track_page () go to first track-page
goto_last_track_page () go to last track-page
goto_next_seq_page () go to next sequence-page
goto_prev_seq_page () go to previous sequence-page
goto_first_seq_page () go to first sequence-page
goto_last_seq_page () go to last sequence-page
can_mute_pattern (seq_idx) check if a hold event should perform a "pattern toggle" this is only possible when every track is active & aligned
_slots_are_aligned (seq_idx) function to check if all slots are aligned to the same sequence index
is_garbage_pos (track_idx, seq_idx) is garbage PM position?
matrix_cell (x, y) access a cell in the Grid Pie
init_pm_slots_to (val) toggle all slot mutes in Pattern Matrix (called when starting and stopping the application)
init_gp_pattern () initialize Grid Pie Pattern (called when starting the application)
check_recording_status () realtime recording, check if conditions have changed and call either start/stop_recording (will also update the pattern-sequence loop) this method is called by various notifiers
build_cache () build the initial pattern cache - called on application startup.
make_slot_unique (ptrack, track_idx) makes the target slot unique, update gridpie (first button that has been pressed is the target)
get_idx_from_coords (x, y) translate X/Y into track/sequence position
get_ptrack_from_coords (x, y, skip_garbage) get a pattern-track (slot) from provided coordinates
get_ptrack (seq_idx, track_idx) safely obtain a pattern-track by it's sequence/track index
adjust_grid () update the grid display (used sparingly, as this will paint each and every slot in the grid)
paint_cell (cell, x, y) standalone method for painting individual cells in the grid used by adjustgrid and updatehomeless_tracks
clear_track (track_idx) clear a given track, and briefly mute it
brief_track_mute (track_idx) this is a hackaround, fix when API is updated See: http://www.renoise.com/board/index.php?showtopic=31927
copy_and_expand (patt_idx, dest_patt_idx, track_idx, num_lines, offset, lines_total, start_line, end_line) copy and expand a track
goto_slot (track_idx) show the first/master occurrence of the indicated GP slot, update display (nothing will happen if the slot isn't aliased)
clone_pattern () Call this method to clone the GP pattern, insert at the end patternsequenceobservable will take care of the rest...
toggler (x, y, pattern) toggle position in grid
_toggle_slot (seq_idx, track_idx) toggle a particular slot, auto-detect if we should toggle on or off also, update the pattern-matrix mute state...
_toggle_pattern (seq_idx, track_idx) Toggle a particular pattern
has_aliased_master (ptrk, track_idx) determine if a (gridpie) slot has an aliased master
toggle_slot_record (gridpie_patt, track_idx, mute, master_p_idx) method for toggling slots while realtime recording
set_record_patt_length (gridpie_patt, num_lines, old_num_lines) when recording, we need to pay special attention to the pattern length
remove_buffer_pattern () remove buffer, turn back into gridpie pattern
_update_pm_mutes (seq_idx, track_idx, muted) update PM mute state, called after toggling slot/pattern
_build_app () inherited from Application
assign_to_slot (bt, force) unified method for multi-touch assign/unassign of slot aliases (is using the src_button variable to determine combinations)
start_app (start_running) inherited from Application
stop_app () inherited from Application
abort () song has somehow become invalid - shut down active application
_attach_line_notifiers () attach line notifier to selected pattern, including any aliased patterns
_remove_line_notifiers () remove current set of line notifiers
_restrict_to_pattern_length (num_lines, patt) safe way to set pattern length
_track_changes (pos) Decide if we need to update the recombination/source pattern note: this method might be called hundreds of times when doing edits like cutting all notes from a pattern, so we need it to be really simple
resolve_patt_idx (patt_idx, track_idx) resolve aliasing of a given pattern-track
on_new_document () inherited from Application
update_homeless_tracks () update display of homeless tracks
on_idle () inherited from Application
incremental_update (track_idx) Call this to produce output for one of the realtime tracks
get_gridpie_seq_pos () quick'n'dirty method for obtaining the gridpie sequence index (it will not check if the pattern is actually the right one)
edit_pos_in_gridpie () determine if edit-position is inside the GRID PIE pattern
mute_selected_track_slot (track_idx) mute existing selected slot (if any) in the pattern matrix
get_grid_x_pos (track_idx) determine the x-position of a track within the grid
get_grid_y_pos (patt_idx) determine the y-position of a pattern within the grid
playback_pos_to_gridpie (restart) move playback position to the GRID PIE pattern
reset_tables () prepare a bunch of values/tables
_attach_to_song (new_song) attach notifiers to the song
_attach_to_pattern (new_song) attach notifiers to the pattern
set_writeahead () To produce continous output to a pattern, we need to have an idea about how much the song-position is advancing within a period of time (the method is called when BPM/LPB is changed)
_keep_the_beat (old_lines, old_pos) Keep the beat: perform a number of tricks in order to keep the playback inside the GRID PIE pattern steady, even as it's size is being changed note: to avoid glitches, call this method before doing anything heavy
_remove_notifiers (new_song, observables) detach all attached notifiers in list, but don't even try to detach when a new song arrived - old observables will no longer be alive then...

Fields

self.matrix_height width/height of the "grid" control-map group
self.matrix_cells references to the grid's buttons
self.gridpie_patt_idx pattern index of gridpie pattern
self.gp_buffer_seq_pos sequence-pos/pattern-index of former gridpie pattern (assigned when session recording)
self.skip_gp_notifier true when we shouldn't listen for changes to the gridpie pattern (when copying pattern data)
self.last_playback_line remember playback-pos line on each idle (for detecting when we arrive at the beginning of a pattern)
self.realtime_record when we record changes in realtime (no aliasing)
self.realtime_tracks list of tracks that should be output as incremental updates (during idle loop) trackidx (int) srcpattidx (int) lastoutput_pos (int or nil)
self.writeahead_length (int) number of lines to output, each time an incremental update is written to the pattern
self.writeahead_interval (int) number of lines between incremental updates
self.skip_line_updates table of lines that should be skipped (for when we have written a note-off)
self.poly_counter list of lengths (pattern-lines) for each track the value is nil when the track isn't active
self.revert_pm_slot memorized state of the matrix
self.homeless_tracks indexed list of homeless tracks
self._blink the state of our slow blink rate (alternates between true and false)
self.x_pos these indicate the upper-left corner of the area currently displayed on the controller
self.active_slots remember the slot sequence indices, set by toggler() (this is set, no matter if the track is active or not, check the poly_counter to see if the track is active)
self._track_count (int) remember the number of sequencer tracks, so we can tell when tracks have been removed or inserted before the tracks_observable is invoked
self.patt_cache

the pattern cache: a table with this structure

[patt_idx] = {
  [track_idx] = {
    cached_length (int)
  }
}
self.pending_updates

when we have edited content that needs copy-expansion:

[track_index] = {
  src_patt_idx (int)
  pos (line notifier table)
}
self._update_task (Scheduler) delayed updates for copy-expanding
self.held_buttons

keep track of held buttons in the matrix

[x][y] = {
  obj (UIButton)
  ptrack (PatternTrack)
  track_idx (int)
  seq_idx (int)
  void (bool)
}
self.src_button the button which was first pressed
self._is_monochrome set once application has been initialized (if true then use alternative draw method)
self.page_size_v page size (horizontal/vertical)
self._current_seq_index remember the current pattern
self._aligned_playpos pattern seq.
self._playing_seq_idx internal value for keeping track of playback progress through the pattern sequence...
self._has_been_started (bool) true once application has been initialized
self.play_requested various flags used by idle loop
self._pattern_observables song observables
self._line_notifiers pattern observables
self._bt_prev_seq UIComponent references


Functions

__init (VarArg)
Constructor method

Parameters:

  • VarArg )

See also:

_add_pending_update (src_patt_idx, pos)
Method for adding pending updates, called whenever a pattern which is being monitored has changed and a track requires a copy-expansion.

Parameters:

  • src_patt_idx (int) "unresolved" source pattern index
  • pos (Table) pos.pattern, pos.track, pos.line
_apply_pending_updates ()
copy/expand tracks once the scheduled updates have timed out
adapt_gridpie_pattern ()
prepare a newly cloned Grid Pie pattern before playback reaches it
is_session_recording ()
helper method to determine if we are currently recording a session
clear_lines (track_idx, patt_idx, start_line, end_line)
clear lines using iterator

Parameters:

  • track_idx (int)
  • patt_idx (int)
  • start_line (int)
  • end_line (int)
alias_slot (track_idx, alias_p_idx)
set one of the recombination pattern-tracks as aliased

Parameters:

  • track_idx (int)
  • alias_p_idx (int)
set_pattern_cache (patt_idx, track_idx, num_lines)
update the internal pattern cache, called immediately after copy-expand

Parameters:

  • patt_idx (int), the pattern index
  • track_idx (int), the track index (0 to copy all tracks in pattern)
  • num_lines (int), amount of lines or nil to clear
get_pattern_cache (patt_idx, track_idx)
retrieve value from internal pattern cache

Parameters:

  • patt_idx (int), the pattern index
  • track_idx (int), the track index

Returns:

    (int or nil), amount of lines with valid data
_set_page_sizes ()
apply the current settings to pagesizev and pagesizeh variables
_get_v_limit ()
figure out the upper boundary

Returns:

    int
_get_h_limit ()
Figure out the lower boundary

Returns:

    int
set_vertical_pos (idx)
set the vertical position of the grid

Parameters:

  • idx (int)
set_horizontal_pos (idx)
set the horizontal position of the grid

Parameters:

  • idx (int)
set_vertical_pos_page (seq_idx)
set a pattern sequence index, quantized to page size

Parameters:

  • seq_idx (int)

Returns:

    (int)
update_h_buttons ()
update buttons for horizontal navigation
update_v_buttons ()
update buttons for vertical navigation
update_v_slider ()
update slider for vertical navigation
update_h_slider ()
update slider for horizontal navigation
goto_prev_track_page ()
go to previous track-page
goto_next_track_page ()
go to next track-page
goto_first_track_page ()
go to first track-page
goto_last_track_page ()
go to last track-page
goto_next_seq_page ()
go to next sequence-page
goto_prev_seq_page ()
go to previous sequence-page
goto_first_seq_page ()
go to first sequence-page
goto_last_seq_page ()
go to last sequence-page
can_mute_pattern (seq_idx)
check if a hold event should perform a "pattern toggle" this is only possible when every track is active & aligned

Parameters:

  • seq_idx (int)

Returns:

    bool
_slots_are_aligned (seq_idx)
function to check if all slots are aligned to the same sequence index

Parameters:

  • seq_idx (int)

Returns:

    bool
is_garbage_pos (track_idx, seq_idx)
is garbage PM position?

Parameters:

  • track_idx (int)
  • seq_idx (int)

Returns:

    bool
matrix_cell (x, y)
access a cell in the Grid Pie

Parameters:

  • x (int)
  • y (int)

Returns:

    Duplex.UIButton
init_pm_slots_to (val)
toggle all slot mutes in Pattern Matrix (called when starting and stopping the application)

Parameters:

  • val (bool) true when starting, false when stopping (restore)
init_gp_pattern ()
initialize Grid Pie Pattern (called when starting the application)
check_recording_status ()
realtime recording, check if conditions have changed and call either start/stop_recording (will also update the pattern-sequence loop) this method is called by various notifiers
build_cache ()
build the initial pattern cache - called on application startup.
make_slot_unique (ptrack, track_idx)
makes the target slot unique, update gridpie (first button that has been pressed is the target)

Parameters:

  • ptrack (PatternTrack) the target slot (destination)
  • track_idx (int)

Returns:

    bool, true when slot was made unique
get_idx_from_coords (x, y)
translate X/Y into track/sequence position

Parameters:

  • x (int)
  • y (int)

Returns:

    int,int
get_ptrack_from_coords (x, y, skip_garbage)
get a pattern-track (slot) from provided coordinates

Parameters:

  • x (int) grid x coordinate
  • y (int) grid y coordinate
  • skip_garbage (bool) skip garbage pos, including gridpie

Returns:

    renoise.PatternTrack or nil, int, int
get_ptrack (seq_idx, track_idx)
safely obtain a pattern-track by it's sequence/track index

Parameters:

  • seq_idx (int)
  • track_idx (int)

Returns:

    renoise.PatternTrack or nil
adjust_grid ()
update the grid display (used sparingly, as this will paint each and every slot in the grid)
paint_cell (cell, x, y)
standalone method for painting individual cells in the grid used by adjustgrid and updatehomeless_tracks

Parameters:

clear_track (track_idx)
clear a given track, and briefly mute it

Parameters:

  • track_idx (int)
brief_track_mute (track_idx)
this is a hackaround, fix when API is updated See: http://www.renoise.com/board/index.php?showtopic=31927

Parameters:

  • track_idx (int)
copy_and_expand (patt_idx, dest_patt_idx, track_idx, num_lines, offset, lines_total, start_line, end_line)
copy and expand a track

Parameters:

  • patt_idx (Pattern) source pattern index
  • dest_patt_idx (int) optional, destination pattern index - defined when realtime recording, will use the source pattern index if not defined
  • track_idx (int) the track index
  • num_lines (int) optional, lines to copy before repeating - use source pattern length if not defined
  • offset (int) optional, the source line offset - 0 is the default
  • lines_total (int) optional, use destination pattern length if not defined
  • start_line (int) optional, start output from this line
  • end_line (int) optional, stop output at this line
goto_slot (track_idx)
show the first/master occurrence of the indicated GP slot, update display (nothing will happen if the slot isn't aliased)

Parameters:

  • track_idx (int)
clone_pattern ()
Call this method to clone the GP pattern, insert at the end patternsequenceobservable will take care of the rest...
toggler (x, y, pattern)
toggle position in grid

Parameters:

  • x (int)
  • y (int)
  • pattern (bool), whether to copy entire pattern
_toggle_slot (seq_idx, track_idx)
toggle a particular slot, auto-detect if we should toggle on or off also, update the pattern-matrix mute state...

Parameters:

  • seq_idx (int), the pattern-sequence index
  • track_idx (int), the track index
_toggle_pattern (seq_idx, track_idx)
Toggle a particular pattern

Parameters:

  • seq_idx (int)
  • track_idx (int)
has_aliased_master (ptrk, track_idx)
determine if a (gridpie) slot has an aliased master

Parameters:

  • ptrk (renoise.PatternTrack)
  • track_idx (int)

Returns:

    (bool[,int]) - isalias & aliaspattern_index (optional)
toggle_slot_record (gridpie_patt, track_idx, mute, master_p_idx)
method for toggling slots while realtime recording

Parameters:

  • gridpie_patt (renoise.Pattern) reference to gridpie pattern
  • track_idx (int) the track index
  • mute (bool) true when track should be muted
  • master_p_idx (int) index of the originating/master pattern
set_record_patt_length (gridpie_patt, num_lines, old_num_lines)
when recording, we need to pay special attention to the pattern length

Parameters:

  • gridpie_patt (renoise.Pattern) reference to gridpie pattern
  • num_lines (int)
  • old_num_lines (int)
remove_buffer_pattern ()
remove buffer, turn back into gridpie pattern
_update_pm_mutes (seq_idx, track_idx, muted)
update PM mute state, called after toggling slot/pattern

Parameters:

  • seq_idx (int)
  • track_idx (int or nil), leave out to target the whole pattern
  • muted (bool) true when we should mute the slot(s)
_build_app ()
inherited from Application

Returns:

    bool

See also:

assign_to_slot (bt, force)
unified method for multi-touch assign/unassign of slot aliases (is using the src_button variable to determine combinations)

Parameters:

  • bt (table) see GridPie.held_buttons
  • force (bool) force-assign (otherwise, unique slots are left alone)

Returns:

    bool, true when assigned, false when we need to force-assign
start_app (start_running)
inherited from Application

Parameters:

  • start_running

Returns:

    bool or nil

See also:

stop_app ()
inherited from Application

See also:

abort ()
song has somehow become invalid - shut down active application
_attach_line_notifiers ()
attach line notifier to selected pattern, including any aliased patterns
_remove_line_notifiers ()
remove current set of line notifiers
_restrict_to_pattern_length (num_lines, patt)
safe way to set pattern length

Parameters:

  • num_lines (int)
  • patt (renoise.Pattern)
_track_changes (pos)
Decide if we need to update the recombination/source pattern note: this method might be called hundreds of times when doing edits like cutting all notes from a pattern, so we need it to be really simple

Parameters:

  • pos (table with fields "pattern", "track" and "line")
resolve_patt_idx (patt_idx, track_idx)
resolve aliasing of a given pattern-track

Parameters:

  • patt_idx TRACE("GridPie
  • track_idx resolvepattidx()",pattidx,trackidx)

Returns:

    int, the resolived pattern index
on_new_document ()
inherited from Application

See also:

update_homeless_tracks ()
update display of homeless tracks
on_idle ()
inherited from Application

See also:

incremental_update (track_idx)
Call this to produce output for one of the realtime tracks

Parameters:

  • track_idx (int)
get_gridpie_seq_pos ()
quick'n'dirty method for obtaining the gridpie sequence index (it will not check if the pattern is actually the right one)
edit_pos_in_gridpie ()
determine if edit-position is inside the GRID PIE pattern

Returns:

    bool
mute_selected_track_slot (track_idx)
mute existing selected slot (if any) in the pattern matrix

Parameters:

  • track_idx (int)
get_grid_x_pos (track_idx)
determine the x-position of a track within the grid

Parameters:

  • track_idx (int)
get_grid_y_pos (patt_idx)
determine the y-position of a pattern within the grid

Parameters:

  • patt_idx (int)
playback_pos_to_gridpie (restart)
move playback position to the GRID PIE pattern

Parameters:

  • restart (bool) force pattern to play from the beginning
reset_tables ()
prepare a bunch of values/tables
_attach_to_song (new_song)
attach notifiers to the song

Parameters:

  • new_song (bool) when false, we attempt to remove existing notifiers
_attach_to_pattern (new_song)
attach notifiers to the pattern

Parameters:

  • new_song (bool) when false, we attempt to remove existing notifiers
set_writeahead ()
To produce continous output to a pattern, we need to have an idea about how much the song-position is advancing within a period of time (the method is called when BPM/LPB is changed)
_keep_the_beat (old_lines, old_pos)
Keep the beat: perform a number of tricks in order to keep the playback inside the GRID PIE pattern steady, even as it's size is being changed note: to avoid glitches, call this method before doing anything heavy

Parameters:

  • old_lines (int) the previous number of lines
  • old_pos (renoise.SongPos) the songposition to translate
_remove_notifiers (new_song, observables)
detach all attached notifiers in list, but don't even try to detach when a new song arrived - old observables will no longer be alive then...

Parameters:

  • new_song (bool), true to leave existing notifiers alone
  • observables (table)

Fields

self.matrix_height
width/height of the "grid" control-map group
self.matrix_cells
references to the grid's buttons
self.gridpie_patt_idx
pattern index of gridpie pattern
self.gp_buffer_seq_pos
sequence-pos/pattern-index of former gridpie pattern (assigned when session recording)
self.skip_gp_notifier
true when we shouldn't listen for changes to the gridpie pattern (when copying pattern data)
self.last_playback_line
remember playback-pos line on each idle (for detecting when we arrive at the beginning of a pattern)
self.realtime_record
when we record changes in realtime (no aliasing)
self.realtime_tracks
list of tracks that should be output as incremental updates (during idle loop) trackidx (int) srcpattidx (int) lastoutput_pos (int or nil)
self.writeahead_length
(int) number of lines to output, each time an incremental update is written to the pattern
self.writeahead_interval
(int) number of lines between incremental updates
self.skip_line_updates
table of lines that should be skipped (for when we have written a note-off)
self.poly_counter
list of lengths (pattern-lines) for each track the value is nil when the track isn't active
self.revert_pm_slot
memorized state of the matrix
self.homeless_tracks
indexed list of homeless tracks
self._blink
the state of our slow blink rate (alternates between true and false)
self.x_pos
these indicate the upper-left corner of the area currently displayed on the controller
self.active_slots
remember the slot sequence indices, set by toggler() (this is set, no matter if the track is active or not, check the poly_counter to see if the track is active)
self._track_count
(int) remember the number of sequencer tracks, so we can tell when tracks have been removed or inserted before the tracks_observable is invoked
self.patt_cache

the pattern cache: a table with this structure

[patt_idx] = {
  [track_idx] = {
    cached_length (int)
  }
}
self.pending_updates

when we have edited content that needs copy-expansion:

[track_index] = {
  src_patt_idx (int)
  pos (line notifier table)
}
self._update_task
(Scheduler) delayed updates for copy-expanding
self.held_buttons

keep track of held buttons in the matrix

[x][y] = {
  obj (UIButton)
  ptrack (PatternTrack)
  track_idx (int)
  seq_idx (int)
  void (bool)
}
self.src_button
the button which was first pressed
self._is_monochrome
set once application has been initialized (if true then use alternative draw method)
self.page_size_v
page size (horizontal/vertical)
self._current_seq_index
remember the current pattern
self._aligned_playpos
pattern seq. index from when we started, and the "aligned" song position (nil when all active tracks aren't aligned to the same sequence pos)
self._playing_seq_idx
internal value for keeping track of playback progress through the pattern sequence...
self._has_been_started
(bool) true once application has been initialized
self.play_requested
various flags used by idle loop
self._pattern_observables
song observables
self._line_notifiers
pattern observables
self._bt_prev_seq
UIComponent references
generated by LDoc 1.4.2