summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/midi_model.h
AgeCommit message (Collapse)Author
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-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-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-25Make MIDI region `automation' respect the automation mode so that it isCarl Hetherington
only played back if the automation mode is set to "Play". Munge AutoState for AutomationRegionViews so that they reflect their AutomationTimeAxisView's setting. Fixes #3135. git-svn-id: svn://localhost/ardour2/branches/3.0@7304 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-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-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
2010-02-18the Properties & 64bit region commitPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6695 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-19use new syntax for connecting to backend signals that enforces explicit ↵Paul Davis
connection scope, plus a few other related matters git-svn-id: svn://localhost/ardour2/branches/3.0@6376 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 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-19Tidy.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5796 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-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
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-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-15Trim include dependency tree (particularly on evoral/Sequence.hpp).David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@4589 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-09-21Display recorded controller data (fix show all/existing automation).David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3779 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
2008-06-02rollback to 3428, before the mysterious removal of libs/* at 3431/3432Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02remove empty sigc++2 directoryDoug McLain
git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-21* bugfix: Inputs and Outputs swapped in the Track/Bus InspectorHans Baier
* bugfix: control_to_midi_event has no effect * typo (track/bus inspector) git-svn-id: svn://localhost/ardour2/branches/3.0@3379 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-15Eliminate excessive allocation (for every event) during MidiModel iteration.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3351 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-13* formattingHans Baier
* fixed corruption bugs due to allocation hell of MidiModel::const_iterator::_event: Changed it into boost::shared_ptr * fixed MidiModel::const_iterator bugs: -First note on lost, if an automation event comes first -corrupt MidiEvent compared to automation event if there are no notes in the region * (hopefully) fixed possible race condition * fixed range check in MidiDiskstream::set_state for channel mask * treating notes with duration 0 more gently in MidiRegionView (warning instead of assertion) git-svn-id: svn://localhost/ardour2/branches/3.0@3345 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-08* fixed some valgrind issues (uninitialized instance vars)Hans Baier
* Added preliminary support for program changes flags from automation lists git-svn-id: svn://localhost/ardour2/branches/3.0@3327 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-03Comment out excessive terminal output.David Robillard
Write all events (not just notes) to SMF file from MidiModel (just use iterator instead of hand-hacked MidiModel::write_to). Various MIDI bug fixes. git-svn-id: svn://localhost/ardour2/branches/3.0@3312 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-03Fix midi_model.cc formatting.David Robillard
Clear controller data (not just note data) in MidiModel::clear. git-svn-id: svn://localhost/ardour2/branches/3.0@3311 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-03* MidiModel::const_iterator::operator++: added AUTOMATION typeHans Baier
* automatable.cc/parameter.cc: Added friendly names for the new Midi parameter types * fixed a failed assertion problem (note on channel != note off channel), but have no idea how :) * changed lots of whitespace :| git-svn-id: svn://localhost/ardour2/branches/3.0@3309 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-02* removed old implementation for Program Changes from MidiModelHans Baier
* Added Automation based implementation for Program Changes, Pitch Bender and Channel Aftertouch git-svn-id: svn://localhost/ardour2/branches/3.0@3304 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-26* recording/playing/saving/loading program changes basically seems to work nowHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3288 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-24* preliminary impl for PGM Change support in MidiModelHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3283 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-23* refactored MidiControlIterator to improve readability of codeHans Baier
* commented out crashing section (control iterator stuff in MidiModel::const_iterator::operator++) * added midi_panic() on no_roll in midi tracks so that all notes stop when pressing stop * mark midi model edited on all changes so that recorded tracks get saved git-svn-id: svn://localhost/ardour2/branches/3.0@3281 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-15* fixed bug: crash because of invalidated iterator while removing midi notes ↵Hans Baier
from model git-svn-id: svn://localhost/ardour2/branches/3.0@3253 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-11* persistent undo for MIDI edits works nowHans Baier
* fixed bug: dragging of notes beyond left region bounds made it disappear (unsigned int wrap around) git-svn-id: svn://localhost/ardour2/branches/3.0@3249 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-10* refactored (un)marshalling of DeltaCommand into cleaner code using sigcHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3245 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-09* implemented persistent undo for MidiModel::DeltaCommand. Deserializing ↵Hans Baier
works, but weirdly has no effect when undo/redo is applied in the editor git-svn-id: svn://localhost/ardour2/branches/3.0@3240 d708f5d6-7413-0410-9779-e7cbd77b26cf