Commit Graph

29 Commits

Author SHA1 Message Date
Paul Davis 0162d3f9d6 GUI changes to *try* to adapt to a world without explicit beats<->samples converter objects (i.e. use AutomationLine::get_origin() instead 2021-08-13 12:51:34 -06:00
Robin Gareus 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
Robin Gareus 37aaa2d11b
NO-OP: whitespace, alignment 2019-04-08 22:39:22 +02:00
Paul Davis 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
nick_m b4ddbce1ff Fix incorrect positioning of tempo line subdivisions if first meter is non-zero
Commit cebefe6 assumed that frame 0 was the music origin.
Silly me.
2017-06-09 11:05:56 +10:00
nick_m b086d33937 TempoLines deletes its bfc on destruction 2017-06-09 01:56:28 +10:00
nick_m cebefe69d9 Tempo lines display subdivisions correctly over a tempo change
TempoMap::get_grid() supplies a list of beat positions, leaving the lines
to work out any subdivision positions.
This is fine, unless a tempo section falls in between beats.
Use a BeatsFramesConverter along with a quarter note position
(in the BBTPointsList) to make this easier.
2017-06-09 01:44:48 +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
Paul Davis 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
Tim Mayberry 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
David Robillard 84412e1367 Draw beat sudivisions according to snap setting. 2015-01-07 19:05:41 -05:00
David Robillard 91c650bc29 High resolution tempo lines. 2015-01-07 08:37:20 -05:00
David Robillard ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
Paul Davis 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
Paul Davis 0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
Paul Davis c8ab1aaf7d use Canvas::LineSet for tempolines rather than N different Canvas::Line items plus a cache 2014-06-09 15:39:57 -04:00
Paul Davis 20d7c58b83 make measure line positioning use Editor::sample_to_pixel() and avoid extra 0.5 pixel shift 2014-02-12 15:14:19 -05:00
Paul Davis 0a2a876248 remove probably premature-or-no-longer-necessary optimization of measure line drawing 2013-04-21 15:35:20 -04:00
Paul Davis b02a7445bf Revert "add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed)"
This reverts commit a4df65a56f83823aba27432685977f420458a213.
2013-04-21 15:35:20 -04:00
Paul Davis fca81c9a6a add Group::clear(), do not clear _canvas member of Item when unparented (only the parent is changed) 2013-04-21 15:35:20 -04:00
Paul Davis d1a05240ef fix clamping of line and rect coordinates to avoid issues with cairo when drawing way outside a surface's dimensions; move various coordinate methods down to Canvas, because they don't require GTK information; make visible_area() a Canvas virtual method so that we don't have to cast to call it 2013-04-17 10:53:17 -04:00
Paul Davis aaea166135 initial commit of hand merging, plus getting "ancient" waf script to work correctly 2013-04-04 00:32:52 -04:00
Paul Davis 2a200bdc0e return two iterators into the Bars|Beats list of the tempo map rather than making a copy; use iterators in the GUI
git-svn-id: svn://localhost/ardour2/branches/3.0@11146 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-03 18:43:58 +00:00
David Robillard bb9cc45cd2 Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red.  I don't know the emacs equivalent...


git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14 16:10:01 +00:00
David Robillard e0aaed6d65 *** NEW CODING POLICY ***
All #include statements that include a header that is a part of a library
bundled with ardour MUST use quotes, not angle brackets.

Do this:

#include "ardour/types.h"

NOT this:

#include <ardour/types.h>

Rationale:

This is best practice in general, to ensure we include the local version
and not the system version.  That quotes mean "local" (in some sense)
and angle brackets mean "system" (in some sense) is a ubiquitous
convention and IIRC right in the C spec somewhere.

More pragmatically, this is required by (my) waf (stuff) for dependencies
to work correctly.  That is:

!!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!!

Failure to comply is punishable by death by torture. :)

P.S. It's not that dramatic in all cases, but this (in combination with some
GCC flags specific to the include type) is the best way I have found to be
absolutely 100% positive the local ones are being used (and we definitely
want to be absolutely 100% positive on that one).


git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25 18:26:51 +00:00
Sakari Bergen c5f9501e50 Fix more compiling/linking errors on OS X
git-svn-id: svn://localhost/ardour2/branches/3.0@4360 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-30 17:51:21 +00:00
Nick Mainsbridge a8baa20be8 Make tempo lines physical_screen_height high, add xml null check, Use clicked_regionview directly to calculate region movement. Using drag_info.data may result in the wrong regionbiew being used, don't use canvas coords for region_drag_finished_callback x calculation (eliminates speed adjustment), prevent incorrect updates on dropped regions by updating canvas before placing region copies.
git-svn-id: svn://localhost/ardour2/branches/3.0@3965 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-14 13:35:17 +00:00
David Robillard 95d82d7a16 An actual tempo line cache (not quite perfect when scrolling left, but miles ahead of the previous one didn't really help at all).
Tempo line updating done immediately/directly rather than in an idle handler.
Looking for feedback how this works for other people, performance wise...
Feel-wise, the obvious lag between scrolling and tempo lines being drawn is now gone.


git-svn-id: svn://localhost/ardour2/branches/3.0@3799 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-23 22:23:39 +00:00
David Robillard 7c950f279b Pulled tempo line stuff out into it's own relatively self-contained class.
Draw tempo lines on time canvas and connect them up all pretty-like to the ruler ticks.
Still needs some visual tweaking, but... they draw!  Finally!


git-svn-id: svn://localhost/ardour2/trunk@2247 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-08-05 21:31:02 +00:00