summaryrefslogtreecommitdiff
path: root/libs/evoral
AgeCommit message (Collapse)Author
2015-09-24Add some casting to keep MSVC happyJohn Emmas
2015-09-19no c99Robin Gareus
2015-09-19speed-up smf_track_delete() from O(N^2) to O(n)Robin Gareus
2015-09-18Midi CC events have no event-IDRobin Gareus
Prior to this change the last iterator's ID was used. (event's ID was not updated for CCs)
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-15another note-off fix.Robin Gareus
For nearly coincident note-on the sequence does not matter, but note-off must be sent before a new note-on in strict order (could be the same note).
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-09-13hack around a bug in cppunit/mingw/windows.Robin Gareus
2015-09-13adjust precision to specified value, avoid "0".Robin Gareus
2015-09-13allow to run unit-test under wine from srcdir.Robin Gareus
2015-07-30Replace "%z" modifier with glib macro for portability.Robin Gareus
2015-07-16merge fixBen Loftis
2015-06-29remove const warning in SMF C code by changing function parameter argument ↵Paul Davis
qualifier
2015-06-29Revert "add operator bool() to Evoral::Beats"Paul Davis
This reverts commit f8b5263af5e4d5088f1d5551e999679515add432. OS X compiler gets confused by this change.
2015-06-29add operator bool() to Evoral::BeatsPaul Davis
2015-06-18Fix ControlList::editor_add () wrt guard points.nick_m
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-06-09Add the new (UINTSDEFINED) preprocessor directive to all out MSVC projects ↵John Emmas
(just to be on the safe side)
2015-05-24Make Evoral::Event ids unique always.nick_m
- probably fixes a lot of cases where note ids are assumed to be unique (they weren't for copies and some others). - wrong branch, but it needs testing.
2015-05-03don't install static library libsmf.aNils Philippsen
2015-04-20SMF::end_write() is a no-op if there is no _smf structurePaul Davis
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-11mingw: all code is position independentRobin Gareus
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-19Normalize notes on all channels.David Robillard
Probably.
2015-02-19Fix record/import of note ons with velocity 0.David Robillard
Best to just do this as early as possible to avoid having to deal with this situation all over the code. Also fixes violation of LV2 MIDI specification, which requires no such events are delivered to plugins.
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-02-19Remove unused ifdef gunk.David Robillard
2015-02-13Add a test for the constrained cubic interpolation of Evoral::CurveColin Fletcher
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-01-20few more basic ControList/Curve TestsRobin Gareus
2015-01-19Curve::_get_vector: fix return value when veclen == 1Guido Aulisi
When the crossfade length is only 1 frame, I got strange gain coefficients from get_vector (63 in my case). The function wrongly returned the x axis value.
2015-01-192-point Curve Linear Interpolation TestRobin Gareus
2015-01-19minimalistic Evoral::Curve Unit Test.Robin Gareus
2015-01-10Add a newly introduced header file to our MSVC project (libevoral)John Emmas
This change is MSVC specific and shouldn't affect the other builds.
2015-01-07MusicalTime => Beats.David Robillard
2015-01-05Fix MIDI file descriptor leaks.David Robillard
Pretty sure this is the cause of MIDI data going missing on save for optimized builds. Introduced in 294b99aabf3eb96323a3159b7a5e1b4bfc1ff04a.
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-29Blind fix for MIDI iteration bug.David Robillard
2014-12-18Mute automation via normal mute button.David Robillard
2014-12-17Remove some aborts that don't really need to be.David Robillard
Enforce PatchPrimaryKey sanity at the type level rather than attempting to check for it everywhere. Remove dead file.
2014-12-17Fix oops in previous commit.David Robillard
Professionalism is overrated.
2014-12-17Fix occasional crash when recording MIDI.David Robillard