summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_playlist.cc
AgeCommit message (Collapse)Author
2018-02-11SoloSelection: libardour part.Ben Loftis
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode and video in order to keep the legible
2017-02-15Don't copy-construct MusicFrame, pass const reference.Robin Gareus
2017-02-04rework snapnick_m
snap now fills in a struct (MusicFrame) which contins a snapped frame along with a music divisor. this gives useful information wrt magnetic snap which may or may not have rounded to an exact musical position. region position may now be set musically (using quarter notes for now). this patch fixes several problems in the current code: - dragging a list of music-locked regions now maintains correct musical offsets within the list. - splitting regions using magnetic snap works correctly (#7192) - cut drag should now work correctly with magnetic snap. - musical length of split midi regions is no longer frame based.
2016-12-03Fix Sequence/Event const-correctness issuesDavid Robillard
2016-11-08Support multiple readers for MIDI source/modelDavid Robillard
Fixes the multiple reader issue #6541 properly without resorting to a linear search kludge. All the read state has been pulled out into a MidiCursor which the caller is required to pass. The playlist keeps cursors for all the regions it is reading, any number of cursors are allowed at a time. MidiCursor should probably be made a smarter and more fool-proof object (and/or possibly merged with some of the other tracker/fixer stuff) but for now I wanted to keep it simple.
2016-09-13change all MIDI read-from-source to map all events into the loop-range for ↵Paul Davis
seamless looping (if using)
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-05-04OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one)Paul Davis
2015-08-24Exclude empty CC-params from "Show Existing Automation"Robin Gareus
2015-03-29Fix mute of MIDI tracks with channel forcing.David Robillard
This moves MIDI channel filtering into a reusable class and moves filtering to the source, rather than modifying the buffer afterwards. This is necessary so that the playlist trackers reflect the emitted notes (and thus are able to stop them in situations like mute). As a perk, this is also faster because events are just dropped on read, rather than pushed into a buffer then later removed (which is very slow). Really hammering on mute or solo still seems to produce stuck notes occasionally (perhaps related to multiple-on warnings). I am not yet sure why, but occasional beats always.
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-03-05Clean up MidiPlaylist::read, kill copy-paste code.David Robillard
Towards putting more advanced logic here, where two copies of everything will get even more hairy. The two cases of reading from one or many regions are not very different in the read phase, the only difference is the target. So, point a reference to the appropriate target, use the same read code in either case, then sort/etc afterwards only if necessary.
2015-01-17Fix stuck notes in short MIDI regions.David Robillard
2014-12-20Maintain correct tracker state on MIDI overwrite.David Robillard
This is a little hard-edged in that edits while rolling will prematurely chop off any playing notes, but at least the state of things actually reflects reality. More sophisticated solution hopefully to come...
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-02Automation of LV2 plugin properties.David Robillard
Work towards ParameterDescriptor being used more universally to describe control characteristics.
2012-05-24Remove over 500 unnecessary includes (including 54 of session.h).David Robillard
It's slightly possible that this causes trivial build failures on different configurations, but otherwise shouldn't cause any problems (i.e. no actual changes other than include/naming/namespace stuff). I deliberately avoided removing libardour-config.h since this can mysteriously break things, though a few of those do seem to be unnecessary. This commit only targets includes of ardour/*.h. There is also a very large number of unnecessary includes of stuff in gtk2_ardour; tackling that should also give a big improvement in build time when things are modified. git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
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-05-16switch to a RWLock for Playlist, to allow simultaneous reads (which can ↵Paul Davis
happen occasionally, eg. peak and butler threads) git-svn-id: svn://localhost/ardour2/branches/3.0@12301 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-01remove recursive mutex from Playlist, replace with private regular mutex, ↵Paul Davis
force everyone to use Playlist::RegionLock to allow checking on lock handling if necessary; fix recursive use of lock in AudioPlaylist::read() git-svn-id: svn://localhost/ardour2/branches/3.0@12131 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-26Use Glib::Threads::RecMutex rather than Glib::RecMutex whereCarl Hetherington
available; the latter is deprecated and there is some evidence to suggest that it is broken on some glibmm versions (around 2.31.0 ish) See, for example https://github.com/lightspark/lightspark/issues/168 git-svn-id: svn://localhost/ardour2/branches/3.0@12094 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-16Fairly major change to the way in which crossfades are handled;Carl Hetherington
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
2011-12-30Set up layering_index immediately on an explicit layer, so that undoCarl Hetherington
works properly. Stop the layer being a stateful property, as it is always derived from layering_index, unambigiously, by relayer(). git-svn-id: svn://localhost/ardour2/branches/3.0@11120 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-26a grab bag of changes correcting and improving the way MIDI note on/off ↵Paul Davis
tracking is done. may/should fix a number of problem with spurious note-offs under a variety of circumstances git-svn-id: svn://localhost/ardour2/branches/3.0@11074 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-22main fix: when transport stops, clear per-region per-playlist note trackers ↵Paul Davis
even if there is no capture data to process; side effects: remove unused MidiBuffer::merge() and add DEBUG::MidiTrackers as well as more and better MIDI debug tracing facilities git-svn-id: svn://localhost/ardour2/branches/3.0@11057 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-24Remove unused read/write data count code.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@10300 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-19Trim include tree.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@10244 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-22second half of "bomb out if playlist construction from XML fails"Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9759 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-29totally untested initial code for MidiPlaylistSource, to provide for ↵Paul Davis
compound MIDI regions. putting it into SVN because my system might crash overnight :) git-svn-id: svn://localhost/ardour2/branches/3.0@9626 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-21Prevent note trackers for overlapping MIDI regions inserting events that ↵Carl Hetherington
occur before the requested time range, thereby stopping playback. Should fix #3973. git-svn-id: svn://localhost/ardour2/branches/3.0@9399 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-04minor tweaks to debug output and comments and header orderPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9285 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-15Fix more broken whitespace.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@9152 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03Remove all use of nframes_t.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus patch #2 for today: remove nframes64_t and sframes_t from sourcePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus commit: (1) add __STD_(LIMIT|FORMAT)_MACROS to command line flags ↵Paul Davis
for cc and c++ builds, remove them from source (2) add new Property::midi_data used by MidiRegion to signal that its (MIDI) contents have changed (3) massive switch from nframes_t to framepos_t/framecnt_t including removal of ARDOUR::max_frames (replaced by ARDOUR::max_frame{pos,cnt} (lots more to do but this set was driven by changes to the Diskstream API to use framepos_t git-svn-id: svn://localhost/ardour2/branches/3.0@7791 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-23midway snapshot of work done on managing Region & Source lifetimes ↵Paul Davis
correctly. may fix missing MIDI file bug ; save empty playlists because they may be referred to by the history file ; undo commands auto-delete when objects they refer to die (currently not commands built from XML deserialization); Sources now know how many regions are using them for something, meaning that we know if we can delete the files holding any data for the source git-svn-id: svn://localhost/ardour2/branches/3.0@7291 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-21fix some warnings that come from a non-debug build, some of which are ↵Paul Davis
actually errors in handling return values from boost::signal emissions git-svn-id: svn://localhost/ardour2/branches/3.0@7285 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-09basically, fix all kinds of odds and ends with MIDI playback, including ↵Paul Davis
missed notes and applying gain git-svn-id: svn://localhost/ardour2/branches/3.0@7247 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-02the mega-properties/SequenceProperty patch. split is broken at present ↵Paul Davis
(right hand starts has start-in-source of zero) git-svn-id: svn://localhost/ardour2/branches/3.0@6718 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-23Fix various code quality issues found by cppcheck (e.g. uninitialized ↵David Robillard
members, larger than necessary variable scope, memory leaks, etc). git-svn-id: svn://localhost/ardour2/branches/3.0@6710 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-19change PropertyChange from a bitfield into a real object, with all the many ↵Paul Davis
widespread changes that causes git-svn-id: svn://localhost/ardour2/branches/3.0@6701 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-18the Properties & 64bit region commitPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6695 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-10Move ARDOUR::Change into PBD so that Stateful can be aware ofCarl Hetherington
what Change a State reflects. Hence allow Stateful to do some of the work of set/get_state in Region. git-svn-id: svn://localhost/ardour2/branches/3.0@6671 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-01-25a boatload of minor and middle-sized changes to try to speed up undo. ↵Paul Davis
imperfect, unfinished, but probably right to commit now git-svn-id: svn://localhost/ardour2/branches/3.0@6561 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-22cleanup up cleanup at session destruction; clarify the meaning of 3 signals ↵Paul Davis
(DropReferences & Destroyed in libardour ; CatchDeletion in the GTK UI); clarify ownership of objects (session no longer pays attention to DropReferences for objects that it is considered to own, such as routes, sources, etc); fix up MIDI parsing and a couple of other places by correcting syntax for return of values from a boost::signals2::signal (possible danger elsewhere to be checked) git-svn-id: svn://localhost/ardour2/branches/3.0@6389 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17switch to using boost::signals2 instead of sigc++, at least for libardour. ↵Paul Davis
not finished yet, but compiles, loads sessions, records and can close a session without a crash git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-12remove using namespace sigc everywhere to ensure clarity over which ↵Paul Davis
bind/mem_fun is being used; make Config::map_parameters take a boost::function rather than a sigc::slot ; continue debugging crash caused by regionviews not tracking their Region's lifetime git-svn-id: svn://localhost/ardour2/branches/3.0@6357 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-26Remove cyclic Source->Playlist references (and with it all dependence on ↵David Robillard
Playlist from Source and children and a bunch of finicky reference managing code). git-svn-id: svn://localhost/ardour2/branches/3.0@5925 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-25do not sort MIDI regions by layer since they are all transparentPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5913 d708f5d6-7413-0410-9779-e7cbd77b26cf