13
0
Commit Graph

245 Commits

Author SHA1 Message Date
b757756e92 BBT ruler: fix error in setting beat count 2021-08-13 12:51:32 -06:00
9412130c01 use cleaned up Temporal ::quarters*_at* API (GUI edition) 2021-08-13 12:51:31 -06:00
3c00fab75e remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) (GUI edition) 2021-08-13 12:51:30 -06:00
749a49c278 incorporating new tempo map API 2021-08-13 12:51:29 -06:00
9d69fa3820 another day or two's work on timeline type conversion 2021-08-13 12:51:29 -06:00
f4490f54c5 change Timecode::BBT_Time to use Temporal namespace, plus a couple of other minor changes to enable compilation
This still uses the tempo map object in libs/ardour, not the new one in libs/temporal, and isn't likely to be functional
(though it could be)
2021-08-13 12:51:28 -06:00
74e21e942e Remove unused variables (Wunused-variable) 2021-05-30 20:09:35 -04:00
bcb3e75cec GUI to remove xrun markers 2021-03-16 16:49:49 -06:00
e4e21f4d07 snap revisited: somewhat better choice of ruler scale for 3,5,7 2021-02-21 12:14:27 -06:00
129e654500 fix(?) rulers for 3,5,7 divisions 2021-02-21 08:18:14 -06:00
efd0d65acb when window size technically, just the window containing the editor canvas, or the canvas itself) changes, recompute BBT ruler stuff 2021-02-20 17:41:32 -07:00
7e196e7559 snap-revisited: Fix occasional variance between the visible ruler and the snap grid
code changes:
  bbt_ variables don't need to be global to editor; we only use these in compute_bbt_ruler_scale now anyway
  drive the ruler with the same coarse-ified bbt_ruler_scale that we calculate for the snap grid
2021-02-20 10:35:36 -06:00
d644bb16f6 snap-revisited: Add finer (64ths and 128ths) Ruler scalings to match those Grid selections 2021-02-20 10:35:36 -06:00
aa9698ba58 snap-revisited: a less kludgy way to enforce the coarseness of the user's grid selection
should be a no-op
2021-02-20 10:35:28 -06:00
21a66c01ea snap-revisited: replace hardcoded ruler-density with a configgable value 2021-02-20 10:25:10 -06:00
2e25148136 fix up previous commit, which contained API from nutempo2 branch 2021-01-22 10:50:16 -07:00
99817e1170 change grid display when grid is bars
All lines are shown, all lines are numbered, all have same visual density
2021-01-22 09:52:42 -07:00
7c27f617dc use bold font for major (bar) marks in BBT ruler to heighten contrast 2021-01-03 17:14:35 -07:00
14318dd342 use larger font for bars on BBT ruler 2021-01-03 16:50:18 -07:00
aa564efa86
using std::max was removed from header 2020-06-18 01:21:31 +02:00
4050ca5633
Update GPL boilerplate and (C)
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.
2019-08-03 15:53:15 +02:00
1a05bf08fc Ruler visibility is not really a session-prop.
This fixes an issue with the session being marked as dirty without
any actual change. Also this method indirectly called during session-load
when the UI state is restored, a potential race with "Session::Loading"
being unset.
2018-07-30 17:47:29 +02:00
808dc8ad64 new_grid: fix some thinkos in ruler math, to better match sensible grid lines.
Tweak enums to better match the Grid values they represent.
2018-07-27 00:26:21 +02:00
e1b380b302 Rename SMPTE enum back to Timecode. 2018-02-26 18:38:18 -06:00
22819b8d2f Fix a rather large naming thinko: GridTypeSamples should be CDFrames. 2018-02-26 17:02:24 -06:00
ceac42cc03 NO-OP: whitespace
- 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)
2018-02-24 13:55:20 +01:00
dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
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.
2018-02-09 09:59:39 -06:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
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
2017-09-18 12:39:17 -04:00
Thomas Brand
63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
42441d322d Remove dead assignment in Editor::metric_get_bbt 2017-05-23 09:13:27 +10:00
a8420d4b6b Use XMLNode::get/set_property API in EditorRulers class 2017-04-19 09:36:56 +10:00
55e6d3b40d Fix likely thinko in bbt ruler.
This fixes a bug for me:
  Measure lines appear & disappear during playback, at certain zoom scales.
  I think this is because the unecessary offset was causing beat_density to vary unnecessarily while rolling.
2017-03-10 09:09:30 -06:00
61c7af141d Clarify "frames" (video, timecode) vs "samples" (audio) 2016-12-08 12:45:44 +01:00
da32ae4e1f prevent infinite loop when calculating tick marks on low zoom levels 2016-11-02 17:54:24 +01:00
nick_m
715b178130 Improve bbt ruler drawing performance for large time ranges.
- when the timeline displays many bars, zoom/autoscroll
	  speed is improved by calculating the bbt ruler scale first
	  then requesting a suitably scaled grid.
2016-10-19 03:56:43 +11:00
nick_m
5c2ccc4f3e Allow negative return in TempoMap::beat_at_frame() and its exact_ variant.
- audio-locked midi regions can be start-trimmed properly
	  when close to 1|1|0
	- a midi region placed before the first meter
	  will continue the tempo curve and first meter.

Only a couple of callers require change, as bbt_at_beat() already
deals with this.
2016-08-14 03:04:53 +10:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
nick_m
34c9ac9dd7 Tempo ramps - rename bbt_time() -> bbt_at_frame(), frame_time() -> frame_at_bbt() 2016-05-27 23:38:17 +10:00
nick_m
72812d2cd0 Tempo ramps - rulers don't request negative bbt.
- i'm reluctant to fix this at the map level.
2016-05-27 23:38:14 +10:00
nick_m
58f01bb3f7 Tempo rambo - more bbt scale fiddling. 2016-05-27 23:38:12 +10:00
nick_m
a84527cd17 Tempo ramps - bbt ruler scale tweaks. 2016-05-27 23:38:12 +10:00
nick_m
1be5a42737 Tempo ramps - small tweak to ruler scale. 2016-05-27 23:38:12 +10:00
nick_m
e2c97ab9b8 Tempo ramps- bbt ruler scale accounts for non-beat ranges for consistent results. 2016-05-27 23:38:12 +10:00
nick_m
b415b59f79 Tempo ramps - respect tempo note type and meter note divisor correctly.
- tempo and meter position is now pulse-based,
	  although meter still has a beat for convenience.
2016-05-27 23:38:11 +10:00
nick_m
a0558694df Tempo ramps - audio-locked meters have a bbt of 1|1|0
- possibly lots going wrong with this due to multiple occurences
	  of 1|1|0.
2016-05-27 23:38:11 +10:00
nick_m
7fc3b0c34c Initial stab at tempo ramps.
Replaces the list of points in TempoMap with TempoSection functions, which
compute tempo-at or tick-at time relative to tempo section start.
TempoMap consults them additively to determine things like bbt_time(),
frame_time() get_grid() etc.
This has a marked effect on scrolling speed along with the code simplification
in the places it has been attempted.

Several things are broken here.
Currently every ramp except the last one is an exponential ramp. this may
be simple to fix :).
Mouse-over midi grid doesn't match mouse click grid. should also be simple.

Many things seem to work, but their accuracy should be in question until
each area has been addressed.
2016-05-27 23:38:09 +10:00
17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
56770ff0af change GTKOSX macro constant to use __APPLE__ instead 2016-02-22 15:31:25 -05:00
6991a07902 remove all trace of SAE from source code.
This had become incoherent over time, and posed a development hazard and burden going forward
2016-02-22 15:31:24 -05:00
André Nusser
d0cdf9660a Remove two useless separator elements from editor ruler popups. 2015-12-09 21:52:00 +01:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
ahellquist
80d8e86f1c Update editor_rulers.cc
Change ruler context actions from "Make Loop range" to "New Loop range"
change ruler context actions from "Make Punch range" to "New Loop range"

This to make it consistent with other ruler context actions eg. "New....."
2015-04-21 17:38:27 +02:00
91fac4c96d merge fix for tempo branch 2015-04-21 08:35:20 -05:00
ffd32ae5e1 Right-clicking on the Loop/Punch ruler should "Do Something". 2015-03-13 16:25:59 -05:00
8445e8c283 add video-monitor to timeline context-menu 2015-03-11 21:19:19 +01:00
1973243a98 Separate out creation of xrun markers from Editor::mouse_add_new_marker()
Remove the is_xrun parameter from Editor::mouse_add_new_marker(), and just
create the marker directly in ARDOUR_UI::create_xrun_marker(), so that xrun
markers don't become automatically selected when they appear.
2015-02-12 18:06:16 +00:00
fa72223268 restore ardour-style ruler labels for timecode ruler.
Also reduce font size used to a cross-platform single definition.
2014-12-21 11:55:08 -05:00
9278ae23c4 tweaks to minsec and timecode ruler display, especially at very high zoom.
Imported from work on Tracks done in Tel Aviv, November 2014
2014-12-11 12:51:01 -05:00
dcf632d99f assign minsec_ruler_scale and minsec_mark_modulo when zoomed very far out
Avoids crash when computing % minsec_mark_modulo.
2014-11-23 14:36:38 +02:00
ba4d1cd1c1 remove "canvasvar_" from all functions related to obtaining values from ARDOUR_UI::config() 2014-10-21 22:58:58 -04:00
bb69a55784 try to get font size for rulers right or at least better on OS X 2014-07-15 17:48:30 -04:00
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00
bbd4f83604 do not include ruler visibility items in context click menu on timebars 2014-06-25 15:32:42 -04:00
298085eec2 use new ruler dialog class for context clicks on ruler labels area 2014-06-25 15:23:25 -04:00
6a5d805b38 more canvas refactoring.
Remove Canvas::Layout, use Canvas::Container for the same purpose, move child-rendering into Item::render_children() so that it
could theoretically be used by any derived type.
2014-06-22 11:41:05 -04:00
0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
7d678604fa add all the fonts, and use the right name for the rulers as a result 2014-06-13 12:51:46 -04:00
fec46824bd use canvas ruler font specification rather than get_font_for_style() 2014-06-13 12:22:39 -04:00
6958409187 remove no-longer-used code 2014-06-12 16:18:38 -04:00
ea355bfe15 add canvas rulers event dispatch and reinstate scrolling behaviour 2014-06-12 15:58:05 -04:00
887e75260d use new ArdourCanvas::Ruler constructor 2014-06-12 10:35:32 -04:00
4b07d01532 remove header file includes of now-removed gtk custom ruler 2014-06-12 00:18:15 -04:00
b73352880e use canvas rulers now instead of gtk widgets
Some bugs that exist in master are still present.
2014-06-11 23:54:28 -04:00
da7a860256 remove useless groups from timebar area, clarify scroll group naming in editor 2014-06-03 16:11:24 -04:00
Devin J. Pohly
e7b3020294 fix rounding error in the min:sec ruler
When zoomed in to the millisecond level, the framerate was being divided
by 1000 as an integer to generate a ruler tick interval, which doesn't
work so well at things like 44100 or 88200.  Instead, just count this
value in milliseconds, dividing by 1000 when we are done.

This was purely a display issue - the grid was in the correct place.
2014-05-14 09:08:43 -04:00
Devin J. Pohly
db48bee3c7 fix major/minor ticks on min:sec ruler
All ticks from 0:00.000 to 0:00.999... were major, and everything after
was minor, instead of the correct distribution.
2014-05-14 09:08:14 -04:00
c04285addf convert canvas_event_frame() and window_event_frame() to canvas_event_sample() and window_event_sample() to go along with the convention adopted in cairocanvas code re: frames+samples 2014-02-26 08:43:53 -05:00
78801e12a6 indent/align 2014-02-25 12:02:51 -05:00
3020b224fa Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there 2014-01-10 16:07:57 -05:00
4f465d37b3 fix dragging playhead using time rulers 2014-01-04 16:28:00 +01:00
19bb2b33a8 Merge remote-tracking branch 'remotes/origin/cairocanvas' into windows
Conflicts (hopefully resolved):
	gtk2_ardour/marker.cc
	gtk2_ardour/midi_region_view.h
	gtk2_ardour/region_gain_line.h
	gtk2_ardour/utils.cc
	gtk2_ardour/video_image_frame.cc
	gtk2_ardour/wscript
	libs/backends/jack/wscript
2013-09-21 09:17:25 +01:00
22e15422e8 Fix ambiguous type CheckMenuItem that is also defined via windows.h 2013-07-17 16:48:40 +10:00
ddd21c110c fix various event coordinate system problems with button events on the rulers 2013-04-18 15:14:48 -04:00
fce1733808 fix playhead dragging from rulers 2013-04-17 15:29:03 -04:00
ec102f94e1 various work waveview amplitude mgmt; fix playhead cursor drag from timebar click 2013-04-17 15:22:09 -04:00
1227f2b73e vtl: get rid of one more unnecessary canvas-group 2013-04-17 02:27:06 +02:00
b05968fb4e change frames_per_pixel to samples_per_pixel 2013-04-12 11:31:50 -04:00
8877199ae0 leftmost_position => leftmost_sample, current_page_frames => current_page_samples 2013-04-12 11:21:12 -04:00
4258a34912 change all frame_to_pixel and pixel_to_frame to sample_to_pixel and pixel_to_sample 2013-04-12 11:15:45 -04:00
6ae4f10437 Merge branch 'master' into cairocanvas
Conflicts:
	gtk2_ardour/editor.h
	gtk2_ardour/editor_canvas.cc
	gtk2_ardour/wscript
2013-04-11 22:24:05 +02:00
66ee2c8e59 enable videotimeline by default 2013-04-11 19:49:48 +02:00
6830d83236 vtl: make videotimeline work with new cairo canvas
timeline thumbnail display, moving (drag/drop) and zoom works.

There still some crashes e.g. resizing the height of the timeline
and with off-screen image buffering when zooming in.
Likely due to concurrency issues:
VideoImageFrame::exposeimg() and direct access of the pixbuf:
"Assertion `!_bounding_box_dirty' failed." in canvas/item.cc:191

more work is needed..
2013-04-06 04:10:27 +02:00
aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00
0c3e840700 videotimline
squashed 694 commits from http://gareus.org/gitweb/?p=ardour3.git
2013-03-13 20:28:15 +01:00
8cbd5a8bec fix initial display of BBT ruler, i believe
git-svn-id: svn://localhost/ardour2/branches/3.0@13560 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-28 00:18:10 +00:00
b286b45ea8 adjust the way we use a pair of iterators into the tempo map so that the iterators are always local to the scope where they are used, which fixes at least one tempo-map related crash; also fix correct setting of join-object-range parameter, where the property wasn't actually used
git-svn-id: svn://localhost/ardour2/branches/3.0@13559 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-11-27 22:48:59 +00:00
3e59452fa0 fix computation of fixed ruler scales done before canvas width is set by allocation handler (fixes #5065 and #5095)
git-svn-id: svn://localhost/ardour2/branches/3.0@13307 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-18 15:38:04 +00:00
Carl Hetherington
d54fb5f54e Add option to add new range marker from the context menu without needing the keyboard (#4378).
git-svn-id: svn://localhost/ardour2/branches/3.0@12781 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-19 13:54:28 +00:00