summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_model.cc
AgeCommit message (Collapse)Author
2008-10-05Normalize XML property name style, preserving old session loading (on load _ ↵David Robillard
will be converted to -). Still to go: Non-consistent PBD tag names, colours. git-svn-id: svn://localhost/ardour2/branches/3.0@3872 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-27robustify MidiModel::unmarshal_note()Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3813 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-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-24Changed Byte to uint8_t in some files (left out from drobilla's previous commit)Sakari Bergen
git-svn-id: svn://localhost/ardour2/branches/3.0@3411 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-23* added midnam test file for xpathHans Baier
* added to_string() to MIDI::Event * added XMLNode::attribute_value for attribute nodes * debugging output in MidiModel (incorrect rendering of Pitchbender events: Notes lost * added xpath tests for midnam files git-svn-id: svn://localhost/ardour2/branches/3.0@3406 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-23* fixed: wrong conversion from double for pitch bender in ↵Hans Baier
MidiModel::control_to_midi_event git-svn-id: svn://localhost/ardour2/branches/3.0@3404 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-23*fix the bugfix: Input and Output Ports exchanged in Track/Bus inspectorHans Baier
*increased buffer sizes to get rid of overruns (PitchBender still doesnt work though....) git-svn-id: svn://localhost/ardour2/branches/3.0@3403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-22Fix corrupt MIDI file writing when meta events are present (fixes missing ↵David Robillard
first note issue on some imported files). Reduce number of buffer allocations on MIDI read/write. git-svn-id: svn://localhost/ardour2/branches/3.0@3395 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-22Fix MIDI selection/tool issues (issue #0002415 and other bugs).David Robillard
Fix selection preservation across MIDI model editing commands (for both note moving and resizing). Fix selection breakage introduced by old selection preservation stuff (fix zombie selection). git-svn-id: svn://localhost/ardour2/branches/3.0@3381 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-21Separate audio and MIDI disk buffer size (and track read ahead) parameters.David Robillard
Clean up and remove more unused stuff from MidiDiskstream. Remove false assumptions that MIDI ring buffer space (bytes) corresponds to disk I/O chunk length (frames). git-svn-id: svn://localhost/ardour2/branches/3.0@3375 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16* fix out of range MIDI event detectionHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3366 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16Fix out of range MIDI event error detection (duuuhhhhh).David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3364 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16Fix invalid error message during MIDI recording (or files with stuck notes).David Robillard
Handle stuck notes more gracefully in the view (probably should show up as a diamond though?). git-svn-id: svn://localhost/ardour2/branches/3.0@3359 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16Tidy up MIDI debugging output.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3358 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-16Fix crash on out of range MIDI events (though this shouldn't be possible at ↵David Robillard
all....). git-svn-id: svn://localhost/ardour2/branches/3.0@3357 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-15Re-comment-out MIDI iteration debug prints (oops).David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3353 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-15Fix silly bugs introduced in previous commit.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3352 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-13Fix event allocation issues with MidiModel iteration.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3342 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-12Remove junk from MidiModel::write_toDavid Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3341 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-12* Quick Fix: assertion converted into warning in MidiModel::write_toHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3337 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-12* fixed various event size bugsHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3336 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-12Fix various MIDI corruption bugs.David Robillard
Re-enable MIDI CC controller bars and other immediate output (hans commented out, tsk tsk). Write channel mode as textual enumeration instead of magic number. Better atomic (almost) channel mode switching on MIDI ring buffer (was a possible, if unlikely, source of corruption). Handle some cases of broken MIDI, and oversized events, more gracefully. git-svn-id: svn://localhost/ardour2/branches/3.0@3335 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-11* disabled some debugging outputHans Baier
* fixed (my) bugs in MidiRingBuffer: aborted reading on corrupted events and event does not match channel mask git-svn-id: svn://localhost/ardour2/branches/3.0@3333 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-11* Added a couple of guards to prevent MIDI::Events with NULL buffers to ↵Hans Baier
enter into ring buffers git-svn-id: svn://localhost/ardour2/branches/3.0@3332 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-09* formatting/style guideHans Baier
* bugfix: midi_util.h only considered channel events up to E0, but had to be EF * bugfix: parameter.h operator == should also compare channel (drobilla, correct me if I am wrong) * added some assert() guards git-svn-id: svn://localhost/ardour2/branches/3.0@3330 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-09* adjusted formatting a bit to style guideHans Baier
* fixed: velocity value left on canvas * fixed: end-of-track problem still showed up sometimes * enabled heaps of debugging output in order to debug MidiModel corruption git-svn-id: svn://localhost/ardour2/branches/3.0@3329 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-06* fixed crash bug in MidiModel::const_iterator::operator=: copied iterator ↵Hans Baier
from other which becomes invalid because the container the iterator points into is destroyed * fixed conditional jump from uninitialised value in CanvasNote git-svn-id: svn://localhost/ardour2/branches/3.0@3326 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-06* fixed crash bug in MidiModel::const_iterator::operator++Hans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3325 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-06* enabled some debugging output :|Hans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3321 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-06* fixed end of track at beginning-problem when writing MIDI files (also the ↵Hans Baier
EOT event was written multiple times) git-svn-id: svn://localhost/ardour2/branches/3.0@3317 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-03Typo.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3310 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-02Fix range problems for pitch wheel controller.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@3308 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-05-02Fix several crashes on MIDI recording.David Robillard
Fix MIDI CC iterator infinite looping. Only allocate Text widget for MIDI events if necessary. git-svn-id: svn://localhost/ardour2/branches/3.0@3307 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-29* renamed canvas-midi-event.* into canvas-note-event.*Hans Baier
* make MidiModel keep track of its CanvasProgramChange instances git-svn-id: svn://localhost/ardour2/branches/3.0@3297 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-29* Renamed CanvasMidiEvent into CanvasNoteEvent Hans Baier
* changed MidiModel::write_to to include note off handling *and* time sorting git-svn-id: svn://localhost/ardour2/branches/3.0@3294 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-04-29* first prototype of program changes UI show up correctly (see ↵Hans Baier
http://www.flickr.com/photos/24012642@N02/2451596190/) git-svn-id: svn://localhost/ardour2/branches/3.0@3293 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