summaryrefslogtreecommitdiff
path: root/libs/evoral/evoral
AgeCommit message (Collapse)Author
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from .cpp and .hpp files missed by ↵Paul Davis
previous commit
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-09-18fix ever increasing MIDI event IDsRobin Gareus
Iterating over a const Midi-Sequence calls Evoral::Sequence::set_event(), which in turn used Evoral::Event::operator=() which always created a new event-ID (create copy of the event). Issues fixed: - Saving *unmodified* MIDI produced new event-IDs on every save; files changed with every save. - greetings to Deva. - all [GUI] operations that use IDs to refer to notes e.g. undo. invalid undo-history. Also clarify assignment operator name. Prefer explicit assign() over =.
2015-09-14note-off ordering - fixes #6340Robin Gareus
Evoral::Beats::operator>() rounds to (1.0 / PPQN), hardcoded 1/1920.0. If the time difference between two events is smaller than 1/PPQN, Beats::operator>() and Beats::operator<() produce ambiguous results. The same pair of values is both "less than" and "greater than" depending which operator is used. While it's fine for some cases to ignore the order of nearly concurent events, the std::priority_queue must be strictly ordered.
2015-06-17Automation -use editor_add in gui, record straight lines with fewer points.nick_m
- don't keep setting/unsetting write pass when transport frame remains the same (think larger jack buffer sizes) - insert guards are now 64 frames after when. - refactor previous approach.
2015-06-17Fix some workflow problems wrt automation.nick_m
- clearing automation points sets control to "off" rather than touch. - multiple touches on the same pass acts consistently (no more fader jumps on mouse button press - use actual value for initial point rather than some arbitrary default. clarify new semantics of add () (with_default->with_initial). - clean some whitespace - add guard points as needed in stop. - catch grab broken signal (i can't trigger it, but the docs seem to think it is essential).
2015-06-12We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG ↵Paul Davis
mechanism away from a 64bit integer and toward std::bitset. Clean up a few minor related PBD::DEBUG issues along the way
2015-04-20remove _file_path member from Evoral::SMFPaul Davis
2015-04-15Replace control list locks with RWLocks4.0-rc4Robin Gareus
towards fixing #6238 and #6096. GUI thread: #2 Glib::Threads::Mutex::Lock::Lock #3 Evoral::ControlList::eval #4 Evoral::Control::get_double #5 ARDOUR::AutomationControl::get_value #6 ProcessorEntry::Control::control_changed .. #15 PBD::Timer::timeout_handler at the same time: Audio Thread (try-lock, fails) #0 Evoral::Curve::rt_safe_get_vector #1 ARDOUR::Amp::setup_gain_automation #2 ARDOUR::Route::process_output_buffers Due to the failed try-lock.. AMP::_apply_gain_automation is false. and Amp::run() uses a different gain factor. -> click.
2015-03-26Follow MIDI control values with automation faders.David Robillard
Fixes bug #6166 (except record). This attempts to follow the "current" control value somewhat aggressively: * On locate, slider is set to the value from the top region at the new transport position. * Playback or MIDI input is followed "live". * Whenever the slider is moved (including automatically), that value is emitted as an immediate event to keep external gear in sync. General idea is that the Ardour slider should act as a mirror of an external hardware knob, and both should be synced to whatever the control is at the current transport position. Since we lack real playback/touch/etc modes for these for now, we must choose one behaviour, and this seems like the most reasonable one. Follow is handled in the audio thread, which is probably not ideal, but since these controls have no lists and do not record, should be fine. Probably.
2015-03-07Add a missing 'typename' specifier to the declaration for ↵John Emmas
'Evoral::Sequence::set_notes()'
2015-03-05Handle edits while playing precisely.David Robillard
This avoids stuck notes if active notes are edited, but without stopping all active notes in the region on any edit as before. This implementation injects note ons in places that aren't actually note starts. Depending on how percussive the instrument is, this may not be desired. In the future, an option for this would be an improvement, but there are other places where "start notes in the middle" is a reasonable option. I think that should be handled universally if we're to do it at all, so not considering it a part of this fix for now.
2015-02-19Don't allocate then discard notes on note off.David Robillard
Silly to make a junk Note just to pass to append_note_off_unlocked, which just uses the fields that are on the MIDIEvent anyway then throws it away. Also explicitly dispatch to append_note_off_unlocked in the caller for note ons with velocity 0 rather than make append_note_on_unlocked deal with it.
2015-01-07MusicalTime => Beats.David Robillard
2014-12-31fix incorrect test for valid MIDI events.Paul Davis
Only channel messages have the form <statusbyte>{<nonstatusbyte>..}
2014-12-31Fix range "arithmetic"Paul Davis
Subtracting anything from an empty range should return an empty range, not an assert() failure
2014-12-30Load what we can from broken/truncated MIDI files.David Robillard
We're still a very long way from tolerant of weird SMF files (libsmf takes a "crash if input is not exactly perfect" philosophy, if we're going to be polite and elevate such a thing to "philosophy"), but at least we'll get what's there from files truncated by old broken versions of Ardour or other situations.
2014-12-30Fix MIDI CC record/playback crash.David Robillard
2014-12-18Mute automation via normal mute button.David Robillard
2014-12-06Remove unnecessary includes.David Robillard
2014-12-06Adapt range when copying between automation types.David Robillard
For things like copying from pitch bender to a CC. Also things like fader to pan, but that seems a bit funny. The conversion probably needs to be a bit smarter here, perhaps taking the normal into consideration...
2014-12-02Fix range of pan controls.David Robillard
Set default range to [0,1] since [0,0] is problematic and useless anyway.
2014-12-02Fix lost MIDI events due to broken range check.David Robillard
2014-12-01Factor out copy-paste code.David Robillard
2014-12-01Replace half-baked param metadata with descriptor.David Robillard
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-01Tidy up comments in Evoral::coverageColin Fletcher
Remove old (already #if 0'ed) implementation of Evoral::coverage() and its comments. Tidy up the comment enumerating all the possible ways in which two ranges can overlap, note the Evoral::OverlapType corresponding to each one, and add comments to the if()s in coverage corresponding to the cases in the list of overlap types. Remove some commented-out assert()s that actually do happen, and re-instate one that really shouldn't. Fix a small typo (with -> within)
2014-12-01Simplify Evoral::RangeList::subtract(), and make it pass amended testsColin Fletcher
The various conditionals in Evoral::RangeList::subtract() appear to have been there to work around (a) coverage() not always returning the correct value, & (b) the test suite assuming that the ->to point lies outside the range Now that these are both fixed, the implementation of subtract() becomes quite a bit clearer. I replaced the if()s with assert()s for now, but these shouldn't trip if coverage() is working as I expect. Also (attempt to) clarify the comments in subtract.
2014-12-01Rework Evoral::coverage() to pass unit testsColin Fletcher
Rewrite Evoral::coverage() to (hopefully) do what it's supposed to. Return OverlapNone for invalid ranges: if either of the ranges passed to Evoral::coverage() have negative length (i.e. start > end), return OverlapNone - it seems reasonable to say that a negative-length range can't overlap anything. Also return OverlapNone from the fallthrough case, though this should never happen.
2014-11-30Remove braindead Parameter inheritance abuse.David Robillard
2014-11-30Replace thinning static state with parameter.David Robillard
2014-11-30Remove dead code.David Robillard
2014-11-30Move EventRingBuffer to libardour.David Robillard
This is not used anywhere in Evoral and is just a wrapper around the PBD RingBuffer anyway. Towards a (once again?) independently buildable/testable Evoral and fewer cross-dependencies.
2014-11-24Changes needed to accommodate building libevoral with MSVCJohn Emmas
Note that class 'MusicalTime' needn't be exportable (with a little work, this could be reverted if it affects the other builds)
2014-11-23Fix build with a certain awful broken compiler.David Robillard
2014-11-22Fix quantization and other time-related ops.David Robillard
2014-11-22Fix clang and MSVC build.David Robillard
2014-11-22Wrap MusicalTime in a class.David Robillard
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-16Don't add origin value to MIDI controller regions on initial insert.David Robillard
This should probably hijack the same modifier as the guard points and work the same on all automation tracks, but I did it this way to not change behaviour of track automation where a default is much more reasonable.
2014-11-16Make ControlList::paste const-correct.David Robillard
2014-11-14add abort() to non-reached codeRobin Gareus
This cleans up a lot of false-positives in static analysis and also helps compilers to optimize code paths in general. (tagging the fatal stingstream operator as ‘noreturn’ is far less trivial)
2014-11-13Fix crashes on various MIDI editing operations.David Robillard
Assertions assumed old strict ordering, no longer reflecting reality of fuzzy time comparison (introduced in 86f1b8).
2014-10-15add mutex/lock to all Evoral::SMF methods that use _smf/libsmf, to avoid ↵Paul Davis
inadvertent corruption via multithreaded access. Serialization of Session::save_state() will already protect against most of this, but there is really no good reason why Evoral::SMF's API should require single-threaded/explicit serialization.
2014-08-05Initial steps towards usable range-based automation editing.Ben Loftis
TODO: needs undo. only works in top quarter of automation lane. selection model feels weird sometimes. needs to show gain curve when you are using Range tool
2014-06-07remove some 1920 tick constants and leave notes for some others.Robin Gareus
2014-06-03fix two mysterious problems with stdint typesPaul Davis
2014-06-02merge with master and fix 4 conflicts by handPaul Davis
2014-04-29Fixed problem where importing invalid midi files caused crash.3.5.380Damien Zammit
2014-03-21Minor visibility changes to libevoral (template objects can be exported in ↵John Emmas
libevoral because they're always instantiated in the actual DLL).
2014-03-01remove mingw64 special case from evoral visibility header (might be ↵Paul Davis
appropriate everywhere, needs testing)