Commit Graph

53 Commits

Author SHA1 Message Date
Paul Davis 16dfb95617 tempo/meter edits: no position fields if marker is part of a BBT marker 2023-08-02 15:23:43 -06:00
Robin Gareus 6319980746
Fix TempoDialog port-list when devices are hotplugged 2023-06-13 17:03:27 +02:00
Paul Davis 05c29e25f9 reorder tempo dialog contents, provide non-presented var to control focus behavior 2023-06-12 18:00:21 -06:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus 54e1827e79
Allow to tap-tempo using a MIDI keyboard 2022-12-31 00:07:09 +01:00
Paul Davis b5e0bce101 tempo dialog should use integer notes types, not double
The days of "it's in Pi" are over.
2021-08-13 12:51:32 -06:00
Paul Davis 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
Paul Davis f0d055ad4d more updates for new tempo map API 2021-08-13 12:51:30 -06:00
Paul Davis f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
Paul Davis 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
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
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
Robin Gareus ed4d17a8ff Update Tempo Tapping:
* Allow tap with keyboard (Space, Enter)
* Ignore double-clicks (2nd rapid event skewed calculation)
2017-05-04 16:13:10 +02:00
nick_m 30dd692d13 rework tempo dialog formatting, add end bpm entry. 2017-03-07 03:59:42 +11:00
nick_m 278ad73259 Tempo ramps - check for impossible locations tempo dialog bbt entry. reorganise code. 2016-05-27 23:38:11 +10:00
nick_m bc42dea451 Tempo ramps - first stab at metric marks locked to frames or beats.
- pretty much untested.
2016-05-27 23:38:10 +10:00
nick_m 87d49cd6ec Tempo ramps - api rename, fix various meter and tempo dialog bugs. 2016-05-27 23:38:10 +10:00
nick_m 7898435d3f Tempo ramps - define_one_bar() delivers constant tempo.
- also some renaming and code review
2016-05-27 23:38:09 +10:00
nick_m dbfe991cd8 Tempo ramps - fix changing from const to ramp in the gui.
- also fixes some midi mouse over problems
	- start using replacements for frames_per_bar() frames_per_beat() etc.
2016-05-27 23:38:09 +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
Pavel Potocek 8d408d000d Change the tap tempo estimator to least-squares regression 2016-02-18 10:32:49 +10:00
Colin Fletcher 3127587f9a Go back to using g_get_monotonic_time() for tap tempo
Using ev->time doesn't work as well as I'd hoped, so revert to the previous
method with g_get_monotonic_time().
2015-03-27 13:22:38 +00:00
Colin Fletcher ee959e73fd tap-tempo: try to make it work properly from the very first click 2015-03-21 12:19:25 +00:00
Colin Fletcher 37b0e8ac90 Use ev->time rather than g_get_monotonic_time() for tap tempo
Connect signal_button_press_event of 'Tap Tempo' button rather than
signal_clicked so we can use the time member of GdkEventButton to calculate
the tapped tempo. It seems to me that this is the right thing to do.
2015-03-09 19:19:16 +00:00
Julien de Kozak 444ec162ae Fix crash if new tempo is set to start at bar #0 2014-12-18 10:49:12 -05:00
Colin Fletcher 7815aa1e89 Make tap tempo use g_get_monotonic_time(), and fix minimum BPM
gettimeofday() is not guaranteed to be monotonic: use
g_get_monotonic_time() instead.

Also, fix calculation of slowest tap tempo BPM so that the slowest tempo
which can be set by tapping is 10 BPM rather than 240.
2014-07-05 21:47:49 +01:00
Colin Fletcher 61d413ada4 Make 'Tap tempo' set the bpm to a running average
Keep a running average of the interval between clicks on the 'Tap tempo'
button, and use that average to set the bpm value.
2014-07-05 21:47:49 +01:00
Colin Fletcher e0eaea6471 Add 'Tap tempo' button to 'Edit tempo' dialogue
Add a 'Tap tempo' button to the 'Edit tempo' dialogue box that uses
gettimeofday() to time the interval between successive clicks and sets the
beats-per-minute appropriately.
2014-07-05 21:47:48 +01:00
Paul Davis 06320b2ed3 use the same kludge-removal approach in the prior commit for the meter dialog too, and fix a minor bug in the tempo dialog setup
git-svn-id: svn://localhost/ardour2/branches/3.0@11028 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-20 16:56:07 +00:00
Paul Davis 6227b5d473 rework tempo dialog to (a) allow selection of pulse note type (b) avoid awful kludge to get note type from the combobox; show pulse note type in tempo markers
git-svn-id: svn://localhost/ardour2/branches/3.0@11027 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-20 16:29:44 +00:00
David Robillard ed626628b5 Delete trailing whitespace
git-svn-id: svn://localhost/ardour2/branches/3.0@9656 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01 17:00:29 +00:00
David Robillard 4b861e6039 Rename libmusictime libtimecode (consistent with already used namespace "Timecode").
Move BBT_Time to libtimecode.


git-svn-id: svn://localhost/ardour2/branches/3.0@8271 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-14 18:13:37 +00:00
Carl Hetherington 73192bc1a7 Remove all use of nframes_t.
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03 22:26:29 +00:00
Carl Hetherington c2da4ec8f9 Prevent multiple tempo / meter changes being inserted at the same point
on the timeline; adding a new change at the same time as an existing one
will replace the existing one.  Should prevent #769 from happening.

Some cleanups and tweaks to tempo / meter dialogues.  Desensitize Remove
menu option for those changes that can't be removed.



git-svn-id: svn://localhost/ardour2/branches/3.0@7045 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-02 23:14:43 +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
Carl Hetherington cb160c81fa Apply patch from mantis 2766 to fix apply sensitivity when editing the meter marker at 0. Cleanup visual appearance of tempo and meter dialogues.
git-svn-id: svn://localhost/ardour2/branches/3.0@5559 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-08-20 21:21:07 +00:00
Carl Hetherington 3b89d9eaa0 Remove most using declarations from header files.
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-12 17:03:42 +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
David Robillard 8fed7470f5 Merge with 2.0-ongoing R3077.
git-svn-id: svn://localhost/ardour2/branches/3.0@3078 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-02-17 17:49:38 +00:00
David Robillard 9f63ab9931 Merge with trunk R2978.
git-svn-id: svn://localhost/ardour2/branches/3.0@2988 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-02-02 03:57:35 +00:00
David Robillard 8a2e30816e Merge with 2.0-ongoing R2883.
git-svn-id: svn://localhost/ardour2/trunk@2885 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-01-10 22:22:29 +00:00
David Robillard bb457bb960 Merge libs/ardour and gtk2_ardour with 2.0-ongoing R2837.
git-svn-id: svn://localhost/ardour2/trunk@2883 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-01-10 21:20:59 +00:00
Paul Davis 87726495c3 Merged changes from trunk 1699:1751 into 2.1-staging
git-svn-id: svn://localhost/ardour2/branches/2.1-staging@1752 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-04-26 20:54:31 +00:00
Paul Davis dfc75e0561 new keyboard bindings for moving playhead to region starts+ends ; use spin button for tempo, as per #1449
git-svn-id: svn://localhost/ardour2/trunk@1409 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-02-02 20:55:16 +00:00
Paul Davis 93c7aeba04 fixes for destructive track offsets of various kinds; move from jack_nframes_t -> nframes_t
git-svn-id: svn://localhost/ardour2/trunk@933 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-09-28 17:23:52 +00:00
Nick Mainsbridge 1855ed57fd Plugin selector useability changes, fix mouse grab bug in plugin barcontroller, prevent alpah key entry in tempo/meter dialogs
git-svn-id: svn://localhost/trunk/ardour2@483 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-04-26 16:04:04 +00:00
Nick Mainsbridge 39f32134de Small tempo/meter dialog useability changes
git-svn-id: svn://localhost/trunk/ardour2@469 d708f5d6-7413-0410-9779-e7cbd77b26cf
2006-04-25 00:51:30 +00:00
Karsten Wiese 5c819462b8 s/stringcr_t/const string &/
git-svn-id: svn://localhost/trunk/ardour2@201 d708f5d6-7413-0410-9779-e7cbd77b26cf
2005-12-22 12:23:54 +00:00
Karsten Wiese 170d6b24ce use stringcr_t and gain 1/1000 binary size reduction. not thaat much...
git-svn-id: svn://localhost/trunk/ardour2@194 d708f5d6-7413-0410-9779-e7cbd77b26cf
2005-12-16 22:30:49 +00:00
Paul Davis cdd680f0b7 meter/tempo bars show again, fix tempo/meter dialogs, and more
git-svn-id: svn://localhost/trunk/ardour2@183 d708f5d6-7413-0410-9779-e7cbd77b26cf
2005-12-08 18:53:43 +00:00