Commit Graph

205 Commits

Author SHA1 Message Date
nick_m
97c4c2a28c complete changes to tempo type.
- this implements in the intention behind the previous commit.
	  a tempo mark is constant until its end has been changed by a
	  shift-drag on the next marker.
2017-02-27 20:16:10 +01:00
nick_m
27b95300e2 add frame parameter for Meter ctor and TempoMap::replace_meter(). allow for various failures. 2016-12-19 04:02:01 +11:00
Robin Gareus
11464bfb18 Skip testing example lua scripts which are not bundled 2016-12-04 17:50:34 +01:00
Robin Gareus
48c470d51d Pass const references to plugin-list 2016-11-14 21:06:18 +01:00
nick_m
425fe93fde remove unused variable and debugging. 2016-11-11 03:37:08 +11:00
nick_m
e8042f5843 use note_type explicitly when constructing a Tempo in the hope that others follow.
- should be a no-op
2016-11-11 03:37:08 +11:00
nick_m
a432f6585c TempoSection::tempo_at methods return a Tempo, document the opposite direction. 2016-11-11 03:37:08 +11:00
nick_m
33e95a1577 rename Tempo _beats_per_minute to _note_types_per_minute, provide pulse helpers.
- adds quarter_notes_per_minute(), note_divisions_per_minute (double)
	  pulses_per_minute() and frames_per_quarter_note()

	- this should be a no-op except for the use of tempo by
	  the vst callback which definitely uses quarter notes per minute.

	- the XML node for TempoSection named 'beats-per-minute'
	  has been renamed.
2016-11-11 03:37:08 +11:00
nick_m
5788f42438 fix lock error in empoMap::quarter_note_at_bbt_rt(), expand constant tempo test. 2016-11-11 03:37:08 +11:00
nick_m
93ca7b42fb remove unused TempoMap::tempo_at_beat(). implement unused tempo_at_quarter_note(). 2016-11-11 03:37:08 +11:00
nick_m
1fa7c0d829 remove remaining frame api from TempoSection. 2016-11-11 03:37:08 +11:00
nick_m
594137f5cc remove public pulse methods from TempoMap.
- the only object whose musical position is not expressed in
	  quarter notes is MetricSection.
	  there is now no need to expose this.
2016-11-11 03:37:08 +11:00
nick_m
0e867b544b Refactor tempo api, include quarter-note distance in frames method.
- moves frame rounding up to TempoMap, which is needed
	  in order to calculate pulse distance without frame rounding.

	- the time unit for tempo is still minute, but this now also
	  applies to meter sections. (new audio locked meter sections no
	  longer require a frame position).

	- there is no longer a discontinuity
	  in the pulse for audio-locked meter/tempi.

	- temporarily add debugging output in Region::set_position()
	  to test for region beat not matching region frame.
2016-11-11 03:37:08 +11:00
nick_m
20d02c4c68 expand on existing tempo tests. 2016-10-25 04:02:58 +11:00
nick_m
c09e467595 Improve check in tempoAtPulseTest 2016-10-13 14:26:54 +11:00
nick_m
d824e696c0 Fix ramp test, add tempoAtPulseTest. 2016-10-13 14:14:27 +11:00
Robin Gareus
b997232aad skip Push2 unit-test for now:
The test segfaults due to missing screen and prevents other libardour
unit tests from running.
2016-10-11 00:05:08 +02:00
Robin Gareus
99e9382cdb Unit-tests to check Lua session+DSP scripts 2016-10-11 00:00:52 +02:00
nick_m
af289cab62 Remove unused methods, add tests to ensure meter divisors don't mess with Beats.
- TempoMap::framepos_minus_beats() was only used by its test,
	  so don't build the test.
2016-10-02 03:55:18 +11:00
Tim Mayberry
75ade6b2df Add test to create new Sessions with localized names and reopen them
This test is successful on Linux but fails on Windows currently because of the
incorrect realpath implementation for windows in pbd/path_expand.cc
2016-09-19 14:47:52 +10:00
Tim Mayberry
1a0ac52021 Copy UTF-8 test strings from libpbd tests into libardour test utils
Ideally these would be shared.
2016-09-19 14:47:52 +10:00
nick_m
13413c0b0f BBTTest::addTest() should add a meter rather than replacing the first one. 2016-08-10 01:56:55 +10:00
nick_m
9acfdb31a2 Make tempo tests use the api more correctly.
- TempoMap initially contains a tempo and meter.
	  using add_tempo/meter() using the position of an
	  existing section does the right thing, but prints a warning.
	  Use replace_tempo/meter().
2016-08-10 01:46:05 +10:00
nick_m
cde951f30f Fix counting thinko in tests.
- note that the negative framepos in
	  FrameposPlusBeatsTest::singleTempoTest() will
	  not pass. needs some thougt as to whether it is testing
	  the correct thing.
2016-06-25 01:37:48 +10:00
Robin Gareus
dd549bb09e another C++98 fix 2016-06-22 19:22:19 +02:00
Colin Fletcher
e27df63bc5 Fix a couple of build errors in the test suite.
The parameters to Session::new_audio_track() changed in e0ff70cf, and
Playlist::region_list() was renamed to region_list_property() in
fce6ac0e. Update calls to these functions in the test suite to match.

A couple of tests still fail after these changes.
2016-06-08 19:56:34 +01:00
nick_m
074db3b861 Tempo ramps - more code consolidation wrt add meter/tempo. 2016-05-27 23:38:16 +10:00
nick_m
2d3d7a5355 Tempo ramps - fix ambiguous api, fix flickering tempo curves. 2016-05-27 23:38:16 +10:00
nick_m
3d07cd79e1 Tempo ramps - api change, remove some code. 2016-05-27 23:38:13 +10:00
nick_m
8063b1ce3c Tempo ramps - make ramp test more challenging. 2016-05-27 23:38:13 +10:00
nick_m
d3f0e65199 Tempo ramps - tempo related tests pass, add ramp test. 2016-05-27 23:38:13 +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
36f04367df Tempo ramps - fix crazy compilable namespace thinko 2016-05-27 23:38:10 +10:00
nick_m
5c6e18e6a0 Tempo ramps - remove the concept of bars from tempo sections.
- this helps where tempo and meter have a somewhat circular
	  dependency.

MetricSection now has a musical position expressed in beats (a double).
MeterSection still has a bbt, but it really isn't needed as we have
enough information to discover the number of bars at a given beat without it.
TempoSection now has a hack to enable loading of legacy sessions, which will
ultimately be a lot cleaner than the current code.

Removing bars from tempo sections also allows us to place them
at arbitrary frames (implemented here).
2016-05-27 23:38:09 +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
2d649ceac1 Tempo ramps - get tests to comile again. 2016-05-27 23:38:09 +10:00
Tim Mayberry
44f46d2b0d Fix broken load-session utility and change it to load and save a session
Rename run-session-tests.sh script to load-save-session.sh and make it operate on
only a single session and add a separate load-save-session-collection.sh script

Add --massif option to load-save-session.sh script

Rename some poorly named variables and add some documentation to the
load-save-session.sh script
2015-12-01 15:44:10 +10:00
André Nusser
f048eb7d02 Make duplicate start at position, not position + 1. (libs part) 2015-11-04 17:50:12 -05:00
Robin Gareus
87026c871a add missing include 2015-10-06 21:32:55 +02:00
Robin Gareus
e78f0fe526 CPPUNIT workaround for mingw/wine/windows 2015-10-06 20:10:42 +02:00
Robin Gareus
dc36b063bf remove unused fstream includes 2015-10-05 22:15:18 +02:00
Robin Gareus
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02: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
Robin Gareus
6357770588 additional check for DSP falloff. 2015-10-03 17:46:55 +02:00
Robin Gareus
20038fedf4 less verbose unit-tests 2015-10-03 17:46:39 +02:00
Tim Mayberry
449b57d583 Add test for DSPLoadCalculator to libardour tests 2015-09-16 11:22:17 +10:00
Robin Gareus
8e8f8d92c2 allow to run unit-test under wine from srcdir. 2015-09-13 15:30:00 +02:00
Robin Gareus
d84bc9123f unit-test: set instance name to pre-configure dummy engine 2015-09-05 01:16:10 +02:00
Tim Mayberry
36e4c11a2a Add utility function to get windows packaging directory to avoid memory leaks
There were a few other small leaks in pbd and evoral test code but I didn't
bother changing them. Perhaps this function would be better off in PBD:: so it
can be used everywhere.
2015-08-18 15:10:55 +10:00
Robin Gareus
093df74a9c update unit-tests (new Dummy backend name since a9b6277) 2015-08-05 20:24:57 +02:00