This amends 730a0954 and b27bb586.
This also restores the original API for do_import()
and do_embed() as used by Lua scripts.
Note that this uses distinct IDs when importing both audio
and MIDI in the same DnD request.
* Expose API via Public Editor
* Skip hidden tracks in calculation
* Use a single call to query playlist extents.
This way the playlist read-lock is needed at most once per track
which speeds up calculation.
This is in preparation to subscribe to playhead cursor position
changes in the recorder-UI.
This change also clean up the API, replacing a public variable
with a const access method and follows #12 of
https://ardour.org/styleguide.html
Previously only drag/drop to existing tracks used the target
time-position and files imported as new tracks using the drop-zone
were placed at 00:00:00:00.
Copyright-holder and year information is extracted from git log.
git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
- remove trailing whitespace
- remove space after opening brackets and before closing brackets
- add space around operators
- do not use '//' for multi-line comments, do not use "//" on line-start
to comment-out code breaking indenting (-Wmisleading-indent)
- do add a single space after comment-start /*{SPACE}... or //{SPACE}...
- reserve duplicate whitespace " " for alignment, remove other duplicate
whitespace
- use established "TODO" and "XXX" (highlighted keywords)
- remove equal-sign series "====" (those indicate merge conflicts)
Separate Snap from Grid. Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers. Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers. If you are zoomed out, grid becomes coarser.
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences: snap_threshold and show_snap_cursor.
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
Add config setting for playhead-scroll-speed.
Default to 100% for now, but for new users we might later default it to something slower.
If you want to scroll quickly, it is preferred to zoom out first, then scroll.
New function session_gui_extents() reports the extents of all playlists.
ToDo: include region playlists, when they become available.
also: slow-down autoscroll (ToDo: make a config variable for this)
This is necessary to allow calculation of correct intersection of visible
canvas area and items for the new Item::prepare_for_render() API.
samples_per_pixel must be set first to calculate the new horizontal canvas
position in Editor::set_horizontal_position and then
WaveView::set_samples_per_pixel will eventually call
WaveView::prepare_for_render for those items that are visible on the new canvas
position at the new position.
Or if there is not a change to zoom state then call Canvas::prepare_for_render
explicitly.
Also changes so that each method is only called once during
Editor::visual_changer
First visual change will be processed as normal and then blocked until the
canvas renders the change. If further visual changes need processing then
Editor::pre_render callback will schedule another expose/redraw/render.
This prevents an issue where idle_visual_changer is called many times in
response to events(keys/motion/etc) but the canvas does not get a chance to
render any but the last one which results in a big pause/jump.
This results in a more responsive canvas and in particular a smoother and more
predictable zooming experience.
snap now fills in a struct (MusicFrame) which contins a snapped frame
along with a music divisor.
this gives useful information wrt magnetic snap which may or may not
have rounded to an exact musical position.
region position may now be set musically (using quarter notes for now).
this patch fixes several problems in the current code:
- dragging a list of music-locked regions now maintains correct
musical offsets within the list.
- splitting regions using magnetic snap works correctly (#7192)
- cut drag should now work correctly with magnetic snap.
- musical length of split midi regions is no longer frame based.
Using is_mapped() is wrong, since if the editor was not visible (i.e. program has not yet shown the editor
"tab", then _group_tabs will have is_visible() == true but is_mapped() == false