13
0
Commit Graph

73 Commits

Author SHA1 Message Date
cba53a2023 add _locked() variants to new tempo experiment 2017-09-18 11:40:54 -04:00
5ab2e34b2c Update evoral test suite 2016-12-04 18:49:56 -05:00
1438191938 Improve coverage of evoral tests 2016-12-04 15:40:21 -05:00
9dbc524060 Improve coverage of evoral tests 2016-12-04 15:17:08 -05:00
454df30ae5 Fix Sequence test 2016-12-03 15:49:13 -05:00
398a318934 Fix event type and parameter type confusion
I'm not sure if this is really the best way to do event types (should it
just be a completely static enum in evoral, or completely dynamic and
provided by the type map, or a mix like currently?), but previously the
event type was frequently set to either total garbage, or parameter
types, which are a different thing.

This fixes all those cases, and makes Evoral::EventType an enum so the
compiler will warn about implicit conversions from int.
2016-12-03 15:28:19 -05:00
08fffeffec Remove Evoral::MIDIEvent
It is slightly questionable whether type specific methods like
velocity() belong on Event at all, these may be better off as free
functions.  However the code currently uses them as methods in many
places, and it seems like a step in the right direction, since, for
example, we might some day have events that have a velocity but aren't
stored as MIDI messages (e.g. if Ardour uses an internal musical model
that is more expressive).

In any case, the former inheritance and plethora of sloppy casts is
definitely not the right thing.
2016-12-03 15:18:21 -05:00
eaca325ce8 Trim dependence on evoral types.hpp and Beats.hpp 2016-03-21 18:58:31 -04:00
96b45d4909 only subdivide plugin-cycle when automation is playing
PluginInsert::automation_run() subdivides plugin-run on every
control-port automation event (without splitting the process cycle).

libevoral has no automation-control context, hence this function
must be implemented by Automatable.
2015-10-07 14:21:29 +02:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4178db5f63 globally remove all trailing whitespace from .cpp and .hpp files missed by previous commit 2015-10-04 15:11:15 -04:00
d83889079b hack around a bug in cppunit/mingw/windows. 2015-09-13 20:23:12 +02:00
e45db26d97 adjust precision to specified value, avoid "0". 2015-09-13 20:12:10 +02:00
8e8f8d92c2 allow to run unit-test under wine from srcdir. 2015-09-13 15:30:00 +02:00
cb3961d953 Add a test for the constrained cubic interpolation of Evoral::Curve
Add a test, based on the worked example in www.korf.co.uk/spline.pdf, for
the constrained cubic spline interpolation.

The delta values for the float comparisons are rather arbitrary, I'm sorry
to say: they're basically chosen so that everything passes.
2015-02-13 12:25:51 +00:00
9c992fa97c few more basic ControList/Curve Tests 2015-01-20 00:46:58 +01:00
5190cbc9b2 2-point Curve Linear Interpolation Test 2015-01-19 23:55:52 +01:00
2a7389d8df minimalistic Evoral::Curve Unit Test. 2015-01-19 22:15:28 +01:00
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05:00
9eb8b73b43 Call PBD::init from evoral testrunner
This is needed to set _fmode = O_BINARY for libsmf/fread and
fixes takeFiveTest on windows
2014-12-03 17:31:05 +07:00
61f9ca9f3c Use test utility function to find evoral test files
either via EVORAL_TEST_PATH env var or on windows via directory relative
to dll
2014-12-03 17:31:04 +07:00
f6e15a3b6b Use PBD::tmp_writable_directory to write evoral test file into
no need to remove directory as it is temporary
2014-12-03 17:31:04 +07:00
7a3c54f031 Fix evoral test suite. 2014-12-02 23:30:16 -05:00
767c0238a3 Replace half-baked param metadata with descriptor.
Among other things, this means that automation controls/lists have the actual
min/max/normal/toggled of parameters, and not those inferred from the Parameter
ID, which is not correct for things like plugin parameters.

Pushing things down to the Evoral::ParmeterDescriptor may be useful in the
future to have lists do smarter things based on parameter range, but currently
I have just pushed down the above-mentioned currently used attributes.
2014-12-01 23:35:24 -05:00
47d329ca40 Make tests of Evoral::Range functions include both endpoints in Range
Some of the tests for Evoral::RangeList::subtract() assume that ranges
don't contain their end (->to) point. This appears inconsistent with how
they are used elsewhere.

Add some ASCII art comments to the tests to try to clarify what they're
really testing for, and amend subtractTest1, subtractTest4, & subtractTest5
to incorporate the assumption that ranges include their end points.
2014-12-01 16:52:58 +00:00
0ffeaa6d6a Remove braindead Parameter inheritance abuse. 2014-11-30 23:56:20 -05:00
4358b8db79 Add test for Evoral::coverage()
Add a test function to test Evoral::coverage() with all possible overlap
types. The first test (line 161) that expects OverlapExternal will fail
with the current implementation of coverage().

There's possibly still a discussion to be had about what the overlap type of
ranges with negative lengths should be: there are currently places in the main
Ardour code base where coverage() is called with ranges where start > end.
2014-11-25 17:49:51 +00:00
3a6c9e3bb9 Fix build of evoral tests
Fix compile errors in libs/evoral/test/, by explicitly calling
Evoral::MusicalTime::to_double() wherever a double value is required of a
MusicalTime.

Some of the double variables should probably really be made into MusicalTime
ones instead, but I don't want to mess with this too much.

takeFiveTest still fails for me after this, but a failing test is probably
more informative in the long run than a test that won't even compile.
2014-11-25 14:59:48 +00:00
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
8c9749e42f merge with master and fix 4 conflicts by hand 2014-06-02 11:32:13 -04:00
Sakari Bergen
2482361d88 Fix buffer size mismatch in evoral tests 2014-04-07 21:27:56 +03:00
350bd56a06 Fix evoral test to compile with mingw 2013-07-11 13:03:55 -04:00
cc960c4f07 remove executable mode-bit from files 2013-06-16 21:54:08 +02:00
fa8d0268eb Fix compilation with --test.
Make midnam test suite pass again.

The Ardour test suite does not pass.  I commented out old crossfade stuff, but
I am not familiar enough with the parts that fail to fix it.  It might be a
good idea for someone to look into this.  Ideally we'd have the test integrated
into everyone's workflow, but they add quite a few files to compile...


git-svn-id: svn://localhost/ardour2/branches/3.0@13931 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-20 18:23:42 +00:00
c3ccff8d05 fix up part of the remaining details with automation, so that touch/write over-writes work correctly
git-svn-id: svn://localhost/ardour2/branches/3.0@13041 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-14 15:42:10 +00:00
Carl Hetherington
a6786a6dd2 Hopefully less bad version of Evoral::RangeList::subtract,
with more tests.


git-svn-id: svn://localhost/ardour2/branches/3.0@12514 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-31 20:23:31 +00:00
Carl Hetherington
a2897ecef6 Fairly major change to the way in which crossfades are handled;
they are now done with region fades, rather than separate objects.
After this commit, Ardour will try to convert your session files
to the new crossfade format, but will make a backup in your
session folder first.

If you have works in progress using Ardour 3 it is
***STRONGLY RECOMMENDED*** that you back up session files before
updating to this commit.


git-svn-id: svn://localhost/ardour2/branches/3.0@11986 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-16 16:32:22 +00:00
Carl Hetherington
7c2b3171c2 Further GCC 4.7.0 fixes.
git-svn-id: svn://localhost/ardour2/branches/3.0@11768 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-30 01:21:08 +00:00
efe14fbd52 Fix broken whitespace via merciless application of the emacs hammer.
git-svn-id: svn://localhost/ardour2/branches/3.0@10782 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-23 00:17:31 +00:00
bf8f0b2cb5 Apply patch from timbyr to fix building with --test.
git-svn-id: svn://localhost/ardour2/branches/3.0@10561 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-13 03:54:29 +00:00
Carl Hetherington
eb43f2d0eb Fix up build of tests.
git-svn-id: svn://localhost/ardour2/branches/3.0@9943 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-07-31 13:58:26 +00:00
Carl Hetherington
623f37fd36 Fix test compile.
git-svn-id: svn://localhost/ardour2/branches/3.0@7516 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-28 00:42:43 +00:00
Carl Hetherington
963bc50a8b Fix up evoral test suite.
git-svn-id: svn://localhost/ardour2/branches/3.0@7483 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-25 00:39:04 +00:00
82a0c02af1 Fix controller iteration / linear interpolation.
Add unit test for controller iteration / linear interpolation.


git-svn-id: svn://localhost/ardour2/branches/3.0@5886 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-23 04:24:20 +00:00
03b0d3f328 Testing how anal retentive I can be without anyone saying anything.
git-svn-id: svn://localhost/ardour2/branches/3.0@5882 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-23 02:53:47 +00:00
70ad8b059a Better test for iterator seek.
git-svn-id: svn://localhost/ardour2/branches/3.0@5802 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19 16:14:55 +00:00
0a9b982620 Add unit test for Sequence iterator seeking.
git-svn-id: svn://localhost/ardour2/branches/3.0@5801 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19 16:09:20 +00:00
a2c434d5cd Fix insane formatting/whitespace in evoral test stuff. C'mon Hans ;)
git-svn-id: svn://localhost/ardour2/branches/3.0@5799 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19 15:26:56 +00:00
cb8407d26f Use set over vector for Sequence::Notes, for logarithmic search by time.
git-svn-id: svn://localhost/ardour2/branches/3.0@5798 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19 15:23:42 +00:00
Carl Hetherington
7b14a4230b Fix some warnings.
git-svn-id: svn://localhost/ardour2/branches/3.0@5663 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-15 15:23:59 +00:00