View Issue Details

IDProjectCategoryView StatusLast Update
0001419ardourfeaturespublic2007-01-12 04:16
Reportermtaht Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Summary0001419: refactoring Editor::snap_to to be more common and in libardour would help on surfaces, might help gui performance
Description
Editor::snap_to and related variables could be used by more common code (surfaces).

Proposal: moving much of Editor::snap_to to Session::calculate_move (or something like that) into a separate function and header file to commonalize potential movements and their calculations.

Pseudo struct to return

struct move_increment {
     snap_to mode; (beat/smtp_minute, etc, as defined in the header file)
     long increment; // how many of these to move by (int32_t?)
     nframes_t now;
     nframes_t next_by_increment;
     nframes_t prev_by_increment;
     nframes_t prev; // you get these anyway as a side effect of calculating
     nframes_t next; // the increment. These could also be vectors of the steps inbetween
     move_time; // how long it takes/took to move (just a random thought, ignore)
}

Session::calculate_move_to ()

The region_buffer code in Editor::snap_to might have to move elsewhere or be calculated differently.

Note: these comments are based on me reading code rather than understanding it.

Additional InformationUse cases on a surface:

Either "slave mode" where the surface tracks the XML Editor "snap-to" property, or
peer mode where the surface maintains it's own move-by and snap-to properties.

Shuttle wheel could move playahead or editor by the move_by increment (instead of .2 of the screen)
Having "Add Marker" align to the snap-to
a move marker mode, move loop markers, etc.

Use cases on a gui:

Calculations can run separately from work, and skip display based on keyboard buffering. Example:

get event (keystroke)
calculate move_by - signal do_move (of whatever)
get event (keystroke)
am still moving? buffer up event
get event
am still moving in the gui?
merge with previous event if move not complete - or interrupt the do move with the new one

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2007-01-12 04:16 mtaht New Issue