13
0
Commit Graph

667 Commits

Author SHA1 Message Date
0301c47f6b
Update core library GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
8dbbc19567
Update MIDI Event precedence
A patch-change that is concurrent with a note-on event should be sent
before the given Note-on event.

As follow up: CCs also need to be prioritize to send bank-select first.

see also https://discourse.ardour.org/t/midi-strangeness-patch-setting-and-first-notes/101415
2019-07-30 21:17:15 +02:00
2f91bdfa53
NO-OP: <tab> after <space> fixes in libs 2019-04-13 19:19:29 +02:00
57ebb5c1ba
Remove cruft: unused typedef 2019-04-09 02:23:17 +02:00
6f95dfdc31
Fix MIDI Aftertouch (import, record and play) in the backend 2019-04-02 15:35:57 +02:00
6fa1c58cec
Add guard-points when shifting automation 2018-12-22 02:04:17 +01:00
616f7f40b6
Properly remove-time automation
Previously "remove time" was able to produce overlapping, not
ordered automation.
2018-12-22 01:09:24 +01:00
c98fc1099d Fix some Wimplicit-fallthrough
A "fall through" comment is most portable way to indicate
"no break, fallthru" cases.

 * __attribute__ ((fallthrough))  // is not portable
 * [[fallthrough]]; // is C++17
2018-10-26 14:53:44 +02:00
8ed33f1bc7 remove use of hardcoded -fPIC compiler flag, and use compiler flag dict instead 2018-10-14 22:06:11 -04:00
9506a294c7 Adapt our remaining MSVC projects for 'boost::atomic' (in case it later gets extended to the other libs)
Stage 1 of 3 (more to follow)
2018-09-30 08:56:12 +01:00
79f01bc889 Initial changes needed for building Mixbus (with MSVC) as version 5
(Mixbus itself will probably need extra changes)
2018-09-10 07:14:59 +01:00
43c76ff23b Fix crash when testing invalid MIDI file.
smf_delete() does not handle NULL pointers. This fixes a crash when
checking if a MIDI source is valid.
2018-07-26 16:59:27 +02:00
9da1253288 system common and system realtime messages are not valid in SMF files 2018-07-05 13:45:17 -04:00
1a25672239 change all use of g_critical() in libsmf() to g_warning()
g_critical translates to a fatal error in ardour, which is not true for any of these
errors.
2018-07-05 13:45:17 -04:00
870625973e remove debug output 2018-06-21 15:27:58 -04:00
8a18929d57 remove Session::controllable_by_descriptor() and move code into GenericMIDI code (the only user).
This also removes enums introduced to describe well-known parameters for Mixbus. Lookup now involves string
parsing every time, but this is not likely to be a notable cost.
2018-06-21 13:05:58 -04:00
dd5f124c60 Fix crash when testing unsupported MIDI file
smf_delete() does not handle NULL, and segfaults instead.

This only crashes with optimized builds.
libsmf will call g_critical() earlier and in that case debug-builds
call UI::handle_fatal() and ask the user to "click to exit".
2018-04-08 02:09:35 +02:00
b9c9777b9a When building with MSVC, allow for the fact that Mixbus and Ardour can be using different versions of the SESSION_FILE format 2018-02-15 09:03:32 +00:00
48c1a24284 Fix some clang warnings (argument with 'nonnull' attribute passed null) 2018-01-26 18:07:23 +01:00
70c4977ab3 remove *.orig files (accidentally added in cba53a202) 2017-09-29 21:05:06 +02:00
bcdb3aec3a Check in a few MSVC projects to accommodate the change from libtimecode to libtemporal
This is mostly to see if there'll be any problems when merging these changes into Mixbus. I'm guessing there'll be some conflicts in these projects (and a lot more to follow...)
2017-09-28 12:27:56 +01:00
7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04:00
9283bee867 new header file for audio-based time types 2017-09-24 12:03:13 -04:00
cba53a2023 add _locked() variants to new tempo experiment 2017-09-18 11:40:54 -04:00
5ef0135283 remove Evoral types.cpp since it is no longer required 2017-09-18 11:40:53 -04:00
9ea43bd5ad extend/fix/improve operator overloads and methods for Evoral::Beats 2017-09-18 11:40:53 -04:00
f4f0e70320 NOOP: formatting 2017-09-18 11:40:53 -04:00
3f50ace767 ::find_next_event() does not need to be a pure virtual in ControlSet (it can originate in AutomatableSequence) 2017-09-18 11:40:53 -04:00
d67056562b Fix write-pass re-start while in an active write-pass 2017-07-27 17:50:52 +02:00
a41198305e Update WritePass logic + AutomationList Undo
Fixes various issues when changing AutomationState while rolling.
2017-07-24 21:00:12 +02:00
2006701f73 Fix ctrl-list guard-points and concurrency issues
* lock list when editing (prevent concurrent modification of insert
  iterator
* don't add a guard-point if an event is already present between the
  target and guard-point-position
* remove existing automation-events (old guard points) when
  touching automation w/o change
* don't unset "new write pass" when not rolling
  (fixes issues when not rolling but locating with write-enabled)
2017-07-24 01:59:08 +02:00
deba170d6c Consistent ControlList freezing -- fixes #7419
AudioRegion::set_fade_in() freezes the original ControlList, then
assigns a new one and thaws that.
Frozen state needs to be retained during assignment.

Related: The overloaded assignment operator in AutomationList
performed duplicate signal emission and didn't freeze the list.
2017-07-07 02:35:00 +02:00
c4578db595 Compatibility with old out-of-range automation-lane data
Ardour may have ignored log-scale for parameters 0..N and allowed
writing '0'. Force those values into the valid range on session load.
Also mark the list as "needs sorting" which removes potential duplicates.
2017-07-04 20:12:51 +02:00
8dcc28c9ad Remove duplicates from ControlList 2017-06-21 18:12:31 +02:00
3d15499cda Clamp values in ControlList 2017-06-21 18:12:29 +02:00
d6c47def09 Implement additional ControlList interpolation methods.
The Control and ControlList uses the raw value (eg. coefficient for gain,
Hz for frequencies) and those Lists are stored in existing sessions.

In the vast majority of cases interpolating automation values using exp/log
scale for dB, freq makes more sense -- it's also what the fader does.

Adding additional interpolation methods is future proof (we might at allow
to even add different methods per automation point (to the next) like other
DAWs do.

Currently it's mainly used in preparation for consistent GUI automation-
lanes. Between 2 points there's always a visual straight line.
2017-06-21 18:12:26 +02:00
36e32e5641 Remove separate ControlList min/max/default, use ParameterDescriptor. 2017-06-21 18:12:23 +02:00
fe83e1e2ed Move logarithmic property into Evoral, add rangesteps
This allows complete mathematical description of a given parameter
and parameter values.

Semantic type abstraction is reserved for Ardour::ParameterDescriptor.
2017-06-21 18:12:14 +02:00
8b917c4c16 Add infrastructure to merge ControlLists 2017-06-14 02:40:09 +02:00
8e6f71b8c1 Apply master-value to automation on disconnect. 2017-06-13 20:57:37 +02:00
2bc2aea009 Implement slaved boolean automation and update mute special-case 2017-06-10 14:38:21 +02:00
nick_m
d455806a73 Do not duplicate note id in copy constructor
This fixes selection undo after copy-dragging notes, but there
are probably other cases where duplicate note ids may cause problems.
2017-06-08 23:11:56 +10:00
c2cb60ea03 add const-ness: Evaluating a curve does not change it.
Note that the ControlList's lock and cache are already mutable.
2017-06-03 13:55:02 +02:00
0b5db91ee9 AutomationLine time-unit conversion and paste API update
This fixes copy/paste of MIDI automation (time-unit: beat) from/to
Parameter automation (time-unit: samples).

It also fixes repeatedly pasting with tempo-ramps: pre-multiply length
before converting to samples.
2017-04-26 23:37:27 +02:00
ce2c3a9c70 c89 compat (gcc4, mingw..) 2017-02-28 21:33:13 +01:00
29fcca147b Fix loading SMF meta-data > 127 bytes (no more g_critical abort) 2017-02-28 16:29:10 +01:00
994f5cec0e centralize computation of tempo from SMF information 2017-02-08 19:07:10 +01:00
129708ad85 add clamp for adding points to a ControlList from a (G)UI 2017-01-09 12:42:08 +00:00
Nil Geisweiller
6431c4a6d9 More 8 whitespace to tab indentation fixes 2016-12-22 14:20:13 +02:00
Nil Geisweiller
c1127c245b Fix minor typo in comment 2016-12-21 23:09:40 +01:00
Nil Geisweiller
4c66e36b91 Fix indentation 8 whitespaces to tab 2016-12-21 23:09:40 +01:00
6a0ea65885 "toll free bridging" between smf_tempo_t and Evoral::SMF::Tempo 2016-12-16 13:45:43 +00:00
c0aa738395 expose SMF tempo information in Evoral::SMF 2016-12-16 10:43:52 +00:00
2378e7b60c add function to get number of tempos found in SMF tempo map 2016-12-16 10:43:41 +00:00
fe0761d404 unused but slightly tricky code to add track name/instrument to an SMF file when saved 2016-12-16 09:36:52 +00:00
76dca432f0 add comments about limitations for Evoral::SMF and tracks 2016-12-16 09:36:52 +00:00
d2fd01c241 add API to Evoral::SMF to retrieve all track/instrument names for use when importing 2016-12-14 11:46:26 +00:00
7e0dbd06db extract track and instrument names from SMF while loading 2016-12-14 11:46:26 +00:00
24160a3b85 add braces and warning for unlikely error 2016-12-14 11:46:26 +00:00
ff6f8ca6c4 fix incorrect test for textual meta events in libsmf 2016-12-14 11:46:26 +00:00
54ef5fadc2 braces please 2016-12-14 11:46:26 +00:00
d5074be4f1 braces, please 2016-12-14 11:46:26 +00:00
8002a0c66e free track name/instrument string memory when necessary 2016-12-14 11:46:26 +00:00
28caef7d81 add track and instrument name members to smf_track_t 2016-12-14 11:46:26 +00:00
f04c1ca4db I can't find a source file called MIDIXML.cpp (??) 2016-12-08 13:55:11 +00:00
fe45f9bc21 Set MidiPgmChangeAutomation control value 2016-12-07 12:45:01 +01:00
388765e8ce Remove boost_system test kludge 2016-12-04 19:15:29 -05:00
5ab2e34b2c Update evoral test suite 2016-12-04 18:49:56 -05:00
9a848d5ba6 Fix configuration 2016-12-04 18:26:30 -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
9aac954744 Add missing include 2016-12-04 15:16:08 -05:00
b51321bd7d Make libpbd and evoral capable of standalone build
Just an update to slightly rotten wscripts, shouldn't be any changes during an
ardour build.  Motivation being a short development cycle for working on evoral
and/or its test suite.
2016-12-04 15:15:11 -05:00
7d2ed46b63 Remove dead/annoying/unsafe code
Note the old Note::operator= was unsafe, since it made shallow copies of the on
and off events, which results in a double delete of events when the notes are
destructed.
2016-12-04 15:10:05 -05:00
454df30ae5 Fix Sequence test 2016-12-03 15:49:13 -05:00
d17f58e531 Remove dead code 2016-12-03 15:28:23 -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
875b1367b2 Factor out and extend MIDIXML implementation 2016-12-03 15:18:20 -05:00
0f5a73a7fd Fix Sequence/Event const-correctness issues 2016-12-03 15:18:20 -05:00
2f30d763ed Fix loading, recording & saving MIDI with PolyKeyPressure events.
GUI still does not handle this (neither automation lane, nor List Editor),
but the file loads, plays and exports correctly.
2016-11-27 17:25:42 +01:00
7c8ab05c09 Don't add initial points for MIDI-CC
eg. import a .mid that has a CC later in the file.
Arodur wrongly added an initial point, effectively moving the event
backwards to "0" (no virgin territory)
2016-10-23 14:21:24 +02:00
4d66c89b83 SMF add support for type-0 files (count channels, not tracks) 2016-10-05 20:08:26 +02:00
e05cb11bb0 extend Evoral::Range<T> to offer ::length() and ::squish()
The latter maps a T into a range, using loop semantics
2016-09-13 14:11:29 -05:00
0ff233d234 Update our MSVC project files to generate the most recent Ardour session file format (ver 5) rather than the older v3 format 2016-08-30 07:15:00 +01:00
d6691a80e9 attempt to handle poly-pressure (polyphonic aftertouch) similarly to other MIDI messages 2016-08-19 08:32:44 -04:00
eec294a97e the endless quest to plug memory leaks -- episode 378 2016-07-25 17:16:32 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
22de00b247 Remove a (no longer needed) source file from our MSVC project (evoral) 2016-07-14 09:42:55 +01:00
a6ee94ac52 remove old midi-note name API 2016-07-12 23:02:46 +02:00
b0200b23f2 Accommodate the fact that 'msvc_resources.rc.in' got moved to a new path 2016-05-21 10:33:18 +01:00
c23be46c15 use g_fopen() to avoid i18n errors with file paths/names 2016-05-10 15:55:45 -04:00
f5e4d3b032 NO-OP; document some more parameters.
Since headers only provide the declaration, function
parameters need to be documented.
2016-04-12 11:06:35 +02:00
09202249e1 NO-OP document Evoral::ControlList 2016-04-10 20:55:59 +02:00
2972fe0fc2 leave a ToDo note 2016-03-28 21:42:46 +02:00
eaca325ce8 Trim dependence on evoral types.hpp and Beats.hpp 2016-03-21 18:58:31 -04:00
ba78359129 prepare for update to waf 1.8
uselib is no longer implicit (inherited by .use). This is still incomplete,
some uselibs for non-linux variants may be missing.

bld.is_defined("HAVE_XXX") also no longer works and will have to be
changed (I think to bld.env["HAVE_XXX"]) in countless places.
2016-02-28 21:16:44 +01:00
f3179cc5e3 Modify the MSVC build project (for libevoral) such that it can find pthread.h
libevoral itself doesn't seem to need libpthread - but by some mechanism it #includes <pbd/event_loop.h> (which now does #include <pthread.h>). So let's make sure it can be found.
2015-12-30 10:17:55 +00:00
8d45eecd45 somewhat better solution to prev commit.
parse up to 32bit VLQs, match smf_format_vlq()
2015-12-27 03:40:48 +01:00
2c197fd89a work around midi-event counter 4 byte overflow. 2015-12-27 02:09:54 +01:00