13
0
Commit Graph

81 Commits

Author SHA1 Message Date
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
baf8f37967 Tempo ramps - rename meter_at() -> meter_at_frame() & make the ticker slightly more efficient. 2016-05-27 23:38:17 +10:00
nick_m
8f3bc6f809 Tempo ramps - rename tempo_at() -> tempo_at_frame().. 3 decimals for the audioclock tempo display. 2016-05-27 23:38:17 +10:00
nick_m
74db6f6ad6 Tempo rampos -reorder tempo dialog. 2016-05-27 23:38:14 +10:00
nick_m
b4fce62651 Tempo ramps - newline fix. 2016-05-27 23:38:14 +10:00
nick_m
a117960480 Tempo ramps - first tempo and meter are always audio locked wrt gui.
- fixes some gtk warnings as well
2016-05-27 23:38:14 +10:00
nick_m
dabed0672d Tempo ranps - fix compilation 2016-05-27 23:38:14 +10:00
nick_m
3d07cd79e1 Tempo ramps - api change, remove some code. 2016-05-27 23:38:13 +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
4d9b6a4ced Tempo ramps - fix various thinkos. 2016-05-27 23:38:11 +10: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
38df1063d3 Tempo ramps - re-enabe audio-locked meter sections, fix more locking errors. 2016-05-27 23:38:10 +10:00
nick_m
b8b6d562a4 Tempo ramps - restore bbt settings in tempo dialog for audio-locked tempo markers
- see comments
2016-05-27 23:38:10 +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
a2495cdff3 Tempo ramps - fix more namespace confusion 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
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02: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
eafb66d001 update some calls to use new get_preferred_edit_position; needs testing 2015-04-21 10:22:28 -05:00
91fac4c96d merge fix for tempo branch 2015-04-21 08:35:20 -05:00
d3d7428a18 tap-tempo: reset running average whenever tapped tempo deviates by +/- 20% 2015-03-27 13:23:33 +00:00
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
nick_m
85587c19a4 Right align some more numeric entries in the meter/tempo dialogs. 2015-03-22 00:33:27 +11:00
ee959e73fd tap-tempo: try to make it work properly from the very first click 2015-03-21 12:19:25 +00:00
nick_m
4d349f3d3a Align number entry in the meter dialog to the right in lieu of finding
the reason behind ComboBoxText's apparent miscalculation of its' layout
width).
2015-03-14 03:56:14 +11:00
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
877492ef8a Give tempo dialog initial focus to BPM spinner. 2015-01-13 01:00:53 -05:00
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
Julien de Kozak
2c8a769aae Fix crash if new tempo is set to start at bar #0 / Follow-up for non movable meters 2014-12-18 10:49:12 -05:00
Julien de Kozak
d2e966aac4 Fix crash if new tempo is set to start at bar #0 / Follow-up for non movable tempos 2014-12-18 10:49:12 -05: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
fd9ccc7058 Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
2014-11-16 22:35:45 -05:00
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
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
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
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00
e6610e6ad8 i18n fixes from alexander prokoudine (#5016)
git-svn-id: svn://localhost/ardour2/branches/3.0@13050 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-17 13:11:15 +00:00
4235e9a1a2 a variety of mostly unused parameter errors from OS X Lion's compiler
git-svn-id: svn://localhost/ardour2/branches/3.0@12148 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-02 20:29:46 +00:00
68d62e8ec7 add sixteenths as note type for tempo and meter; fix cursor color, selection color etc, for tempo & meter dialogs
git-svn-id: svn://localhost/ardour2/branches/3.0@11186 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-01-07 15:28:58 +00:00
a85e0b0a2e a huge set of changes to tempo+meter handling. testing feedback requested. the_CLA, you know who i mean :)
git-svn-id: svn://localhost/ardour2/branches/3.0@11103 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-28 21:02:31 +00:00
24a29f61d9 provide config parameter to allow non-quarter note pulses; off by default; no GUI to reset it at this point
git-svn-id: svn://localhost/ardour2/branches/3.0@11046 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-21 02:33:38 +00:00
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
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
e0cf3b6354 more fun and games with meter and the tempo map: rename Meter::beats_per_bar() to Meter::divisions_per_bar() so that its clear(er) on what it is actually returning; use Meter::divisions_per_bar() in more (all?) places that need it; fix up dragging meter marks by removing the relevant meter section from the map while we drag; operator<< for some tempo-related objects
git-svn-id: svn://localhost/ardour2/branches/3.0@10995 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-13 02:46:36 +00:00
e70249ab65 Pack toolbar combo boxes with expand=false and remove size kludges.
Turns out gtk these days sizes combo boxes with precisely enough space if
packed to not expand, none of this mess is necessary any more.


git-svn-id: svn://localhost/ardour2/branches/3.0@10790 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-23 08:35:41 +00:00
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