summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_model.cc
AgeCommit message (Collapse)Author
2011-10-23Fix read of MIDI undo information to use the correct time type. Fixes #4387.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@10292 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-19Trim the include tree.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@10227 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-27Add missed parent class call to Sequence::control_list_marked_dirty. Fixes ↵Carl Hetherington
#4335. git-svn-id: svn://localhost/ardour2/branches/3.0@10140 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-19Emit ContentsChanged on the model when one of its control lists changes. ↵Carl Hetherington
Should fix #3880. git-svn-id: svn://localhost/ardour2/branches/3.0@10095 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-22ignore unpaired noteoff's when writing part of a MidiModel to a new source. ↵Paul Davis
in reality, there should be no unpaired noteoffs, but this is still an important fix git-svn-id: svn://localhost/ardour2/branches/3.0@9757 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-16Fix undo when notes are changed and then removed by the overlap checker (#3995).Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@9531 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-23Re-fix compile failure with --no-nls (#3111).Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@9415 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-04-06Differentiate between pitch-shift (for audio) and transpose (for MIDI). ↵Carl Hetherington
Fixes #3940. git-svn-id: svn://localhost/ardour2/branches/3.0@9299 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
2011-03-02remove entire "stub" file concept; open new audio and MIDI files on demand ↵Paul Davis
(at first write); could be a few gotchas with some corner case scenarios, but apparently works OK git-svn-id: svn://localhost/ardour2/branches/3.0@9038 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-28Unify program change and bank handling so that they are manipulated together.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8346 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-20Fix more broken whitespace.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@8314 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-09Handle overlaps better when executing DiffCommands.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8233 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-09Undo for sys-ex movements in time.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8232 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-09Use a weak_ptr rather than a bald pointer for _midi_source in MidiModel.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8228 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-11-10remove duplicate std limit + format macro defsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@8003 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-08-16forward port 2.X changes up to and including rev 6714Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7635 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-09Fix save/load of MIDI automation state. Fixes #3354.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7578 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
2010-07-14A few fixes to interpolation of MIDI controller data. Don't interpolateCarl Hetherington
when writing these data back to a source, otherwise surprising new interpolated points appear in MIDI automation. Similarly don't interpolate when reading the model during MIDI stretch. Fix handling of interpolation state; controllers that have been set by the user to use a different interpolation style are noted in the <Source> tag of the session file and this state is sprayed around to MidiModel and the GUI as necessary. git-svn-id: svn://localhost/ardour2/branches/3.0@7409 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-01add MidiModel::sync_to_source() to push model state into its existing ↵Paul Davis
source; mark SMFSource as non-removable after its called SMF::end_write(); some indentation fixes git-svn-id: svn://localhost/ardour2/branches/3.0@7350 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-26lots of details relating to MIDI file management; try to ignore ALSA ↵Paul Davis
sequencer MIDI ports named "Midi-Through" git-svn-id: svn://localhost/ardour2/branches/3.0@7305 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-24change note colors on the fly, to permit user-definition of colors more ↵Paul Davis
easily; remove some debug output git-svn-id: svn://localhost/ardour2/branches/3.0@7301 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-21GUI control of insert merge policy for overlapping MIDI notes; quite a bit ↵Paul Davis
of whitespace reformatting for some reason git-svn-id: svn://localhost/ardour2/branches/3.0@7284 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-20Invalidate old sources before forgetting about them. I think this prevents ↵Carl Hetherington
the possibility of an old source keeping a lock on the MidiModel via its iterator. May fix #3249. git-svn-id: svn://localhost/ardour2/branches/3.0@7280 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-16avoid needless errors when redoing an operation involving adding notes that ↵Paul Davis
were not added because of overlap exclusion preferences git-svn-id: svn://localhost/ardour2/branches/3.0@7264 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-14make note overlap resolution store side effects in a DiffCommand, and add ↵Paul Davis
its changes to the DiffCommand being executed, so as to retain "internal" note property changes across undo git-svn-id: svn://localhost/ardour2/branches/3.0@7256 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-12introduce the notion that note additions and property changes can cause the ↵Paul Davis
removal of other notes because of overlaps; merge Diff and Delta commands in MidiModel; fix marshalling of notes to avoid float->int conversion of length+time properties; initial implementation (not tested much so far) of different policies for how to handle note overlaps git-svn-id: svn://localhost/ardour2/branches/3.0@7254 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-01rationale pathways that add notes to Sequence<T> so that there is only final ↵Paul Davis
insertion step; when changing note properties that affect "indexing" within a Sequence<T> (i.e. via set<T,comparator> indexing/ordering/hashing), remove the note and add it back so that indexing stays consistent; fix marshalling of MidiModel::DiffCommand (boost::bind(&Object::method, reference_to_object) will COPY the reference, so use a pointer); fix MidiModel::find_note() to compare note properties not pointer addresses git-svn-id: svn://localhost/ardour2/branches/3.0@7203 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-20various minor MIDI fixes: prevent duplicate note entry with mouse, show note ↵Paul Davis
info more often with verbose cursor, fix some crashes from click+move on notes ... lots more where this comes from git-svn-id: svn://localhost/ardour2/branches/3.0@7128 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-05-19MIDI region forking, plus Playlist::regions_to_read() fix forward ported ↵Paul Davis
from 2.X. region forking requires a few cleanups git-svn-id: svn://localhost/ardour2/branches/3.0@7118 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
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-10-22Fix crash on save of MIDI data.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5875 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-22Fix deadlocks on MIDI record.David Robillard
More locking than is strictly necessary, but the assertion in MidiModel::write_lock is a nice check, at least for now... git-svn-id: svn://localhost/ardour2/branches/3.0@5868 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-22Replace horribly error-prone Sequence/MidiModel/MidiSource locking API with ↵David Robillard
scoped locks that automatically Do The Right Thing. Make Sequence::read_lock const correct in the process (a read lock can be taken out on a const Sequence, but not a write lock). git-svn-id: svn://localhost/ardour2/branches/3.0@5857 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-21Fix unused parameter warnings since GCC apparently doesn't feel like ↵David Robillard
listening to -Wno-unused-parameter git-svn-id: svn://localhost/ardour2/branches/3.0@5835 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-20handle searching for a note in an empty note listPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5822 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-19Use logarithmic search for MidiModel::find_note (used by DiffCommand).David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5800 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15rework Stateful::set_state() patch to avoid default version argumentPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15Part 1 of loading 2.X sessions; some things work, some things don't, hacks ↵Carl Hetherington
a-plenty. LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE, MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION. So don't do that unless you make a backup of the session file first. git-svn-id: svn://localhost/ardour2/branches/3.0@5786 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-14fix up marshall/unmarshall of note data for MidiModel::DiffCommandPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5662 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-10do not crash when loading old history files with MIDI edits; add all notes ↵Paul Davis
in region to canvas, but pay attention to visibility git-svn-id: svn://localhost/ardour2/branches/3.0@5652 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-10more MIDI editing cleanups, mostly fixing subtleties. Will break loading the ↵Paul Davis
history file for older sessions with MIDI editing present - we warned you :) git-svn-id: svn://localhost/ardour2/branches/3.0@5651 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-07add anonymous union to DiffCommand to allow uint8t_t and time-based ↵Paul Davis
arguments; use DiffCommand for note trimming git-svn-id: svn://localhost/ardour2/branches/3.0@5638 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-09-06the start (only the start) of MIDI diff commandsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@5637 d708f5d6-7413-0410-9779-e7cbd77b26cf