summaryrefslogtreecommitdiff
path: root/libs/evoral/evoral/Event.hpp
AgeCommit message (Collapse)Author
2016-12-07Set MidiPgmChangeAutomation control valueRobin Gareus
2016-12-03Remove dead codeDavid Robillard
2016-12-03Fix event type and parameter type confusionDavid Robillard
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-03Remove Evoral::MIDIEventDavid Robillard
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-04-12NO-OP; document some more parameters.Robin Gareus
Since headers only provide the declaration, function parameters need to be documented.
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-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.
2014-12-06Remove unnecessary includes.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-01-12'libs/evoral' - DLL visibility stuff and associated changes needed for ↵John Emmas
building with MSVC. Currently includes debugging information and things that are just commented out until we have known compatibility with the other platforms (i.e. contains stuff to be removed at a later date)
2013-10-17add export control to libevoralPaul Davis
2012-05-24Compile cleanly with clang.David Robillard
To compile Ardour with LLVM/clang, do the usual thing but set the CXX and CC environment variables, e.g.: CC=/usr/bin/clang CXX=/usr/bin/clang++ ./waf configure build git-svn-id: svn://localhost/ardour2/branches/3.0@12418 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-30fix up some const-ness issues starting from Evoral::Event::set(), and ↵Paul Davis
intersect with removing Mackie..MidiByteArray::bytes() method which made a copy of the data every time we wrote it git-svn-id: svn://localhost/ardour2/branches/3.0@12124 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-02revert recent change to Evoral::Event, and use static_cast<> to get from ↵Paul Davis
Event to MIDIEvent git-svn-id: svn://localhost/ardour2/branches/3.0@10870 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-02make Evoral::Event be polymorphic by adding virtual to its destructor (why ↵Paul Davis
was this not done already?) git-svn-id: svn://localhost/ardour2/branches/3.0@10861 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-19Remove dubious Evoral::Event methods that exposed non-const references to ↵David Robillard
members. git-svn-id: svn://localhost/ardour2/branches/3.0@10239 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-06Fix my name :)David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@9302 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-24Fix broken whitespace.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@8341 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-09Allow trim of midi regions to before the start of the source (better, this ↵Carl Hetherington
time). Fixes #3156. git-svn-id: svn://localhost/ardour2/branches/3.0@8229 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-07Revert previous ill-thought-out patch.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8213 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-07Allow trim of midi regions to before the start of the source. Fixes #3156.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8212 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-20add note IDs and use them for looking up notes during a history rebuild. ↵Paul Davis
NOTE: INVALIDATES OLDER HISTORY FILES git-svn-id: svn://localhost/ardour2/branches/3.0@7449 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19Fix set_notes prototype to use typedef.David Robillard
Fix spacey tabs. git-svn-id: svn://localhost/ardour2/branches/3.0@5795 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-16do not allow smf_source's reads to stomp on cached read_end position in ↵Paul Davis
parent class, which creates chaos by being out of sync with MidiSource::_model_iterator. this doesn't totally fix MIDI playback, but it helps git-svn-id: svn://localhost/ardour2/branches/3.0@5665 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-08-28more MIDI editing tweaks ; flip mouse mode buttons around for MIDI so that ↵Paul Davis
"object" mode is the most likely mode for both region \& region editing ; frame handle events (from lincoln's region trimming patch) are now handled more explicitly git-svn-id: svn://localhost/ardour2/branches/3.0@5600 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-08-27lots of MIDI editing stuff. to be explained on the website when its donePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5596 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-14MIDI robustness.David Robillard
- Separate SMF::open and SMF::create, more powerful interface for both. - Correctly handle note ons with velocity 0 as note offs in sequence. - Use SMF (i.e. libsmf) for MIDI import git-svn-id: svn://localhost/ardour2/branches/3.0@4558 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-10* Code readability: Template parameter <T> -> <Time>Hans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4521 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-03* more pleasant template parameter names in (MIDI)EventHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4487 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-02Make (MIDI) event time stamp type a template parameter.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4473 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-21Sync with http://svn.drobilla.net/lad/trunk/evoral r1891.David Robillard
(Only change: use #include "" instead of #include <> for local include paths). git-svn-id: svn://localhost/ardour2/branches/3.0@4335 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-22Move event specific ringbuffer stuff to evoral.David Robillard
Sane event type interface between evoral and libardour (no more shared magic numbers). Cleanup Evoral::Sequence iterator, fix bugs, probably introduce new ones. Move MIDI specific event functions to Evoral::MIDIEvent (is-a Evoral::Event). git-svn-id: svn://localhost/ardour2/branches/3.0@3785 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-19Factor out sequencing related things into an independant new library: "evoral".David Robillard
Anything related to the storage of events/values over a range of time lives in evoral. This includes MidiModel (Evoral::Sequence) and automation data (AutomationList (Evoral::ControlList), Automatable (Evoral::ControlSet), etc). libs/evoral synced with http://svn.drobilla.net/lad/trunk/evoral r1511. git-svn-id: svn://localhost/ardour2/branches/3.0@3754 d708f5d6-7413-0410-9779-e7cbd77b26cf