summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_buffer.cc
AgeCommit message (Collapse)Author
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
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-09-13make MidiBuffer::read_from() use "dst_offset" correctly to alter the time of ↵Paul Davis
events read from the MidiBuffer
2016-09-13change offset arguments to various <T>Buffer::read/merge methods from ↵Paul Davis
framecnt_t to frameoffset_t
2016-07-11lua MidiBuffer bindingsRobin Gareus
2015-11-29fix seamless midi-looping - fixes #5438Robin Gareus
well, now... - Midi-Ports have a midi-buffer. - Midi-Tracks have a midi-buffer. - Midi-tracks have a diskstream. - Midi-diskstream has a midi-ring-buffer. - Midi-tracks have a delivery - The delivery can get a reference to the actual backend-ports - The delivery calls the Midi-Port's flush() buffer to send out queued events at the end of a cycle all clear ? :) - when splitting the process-cycle: only the Ports are informed. all other objects see a "normal" short process cycle starting at "0". The offset needs to be applied early on, so that internally routed buffers push the event at the correct time when combining the buffer with immediate and async events. Luckily Port::port_offset() is a static member, available to all, objects, which allows to bridge the conceptual gap between the diskstream and the delivery. There's a snag: When there's a note-on directly at the beginning of the loop it coincides with the panic message sent when looping. The panic comes before note events, so it *should* be good. Also the final note-offs (state tracker end of loop/region) are sent 1 sample too early (smells like an off-by-one), and are hence dropped. (no matter we send a panic right after it). It should really be at the same time, just before the panic.
2015-10-09tweaks to MidiBuffer::push_back() variantsPaul Davis
1. there's no reason to make the same logic checks in both the Event and 3-arg variants when the Event version simply calls the 3-arg variant 2. the Event version returned true under all conditions, even if the 3-arg part had failed to push the Event data into the buffer. It now returns true or false, as intended. 3. remove debug output if a MidiBuffer is full during ::push_back(). The cases where this matters emit output of their own, or simply remain silent and queue data later
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-06-29[Summary] Added correct memory alignment for Windows in ../pbd/malign.hGreg Zharun
[Reviewed by] YPozdnyakov
2015-06-12We were 2 more debug "bits" away from overflow, so recast PBD::DEBUG ↵Paul Davis
mechanism away from a 64bit integer and toward std::bitset. Clean up a few minor related PBD::DEBUG issues along the way
2014-12-17MIDI bounce.David Robillard
2014-10-23small round of compiler warning fixesRobin Gareus
2014-06-11prepare midi buffer API for midi-delaylinesRobin Gareus
2013-11-29fix up a bunch of confusion regarding the size/capacity/allocation of audio ↵Paul Davis
& midi buffers
2013-08-08rationalize (a bit) engine start/stop/restart so that it is possible to ↵Paul Davis
start up, disconnect from JACK and then reconnect
2013-07-24part-way through getting the audioengine changes to compilePaul Davis
2013-03-23Fix some compilation warningsJulien de Kozak
2012-04-11Add thought-to-be-missing break (#4819).Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11925 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-12-21remove extraneous debugging output from MidiBuffer::merge_in_place()Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11053 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-21reorganize MidiBuffer::merge_in_place() to cover the cases i wasn't thinking ↵Paul Davis
about and be more logical to anyone else git-svn-id: svn://localhost/ardour2/branches/3.0@11052 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-21likely fix for crash in MidiBuffer::merge_in_place() due to unwarranted ↵Paul Davis
assumption in the code git-svn-id: svn://localhost/ardour2/branches/3.0@11051 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-21merge-in-place debugging (to be removed later)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@11050 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-13more fun and games with meter and the tempo map: rename ↵Paul Davis
Meter::beats_per_bar() to Meter::divisions_per_bar() so that its clear(er) on what it is actually returning; use Meter::divisions_per_bar() in more (all?) places that need it; fix up dragging meter marks by removing the relevant meter section from the map while we drag; operator<< for some tempo-related objects git-svn-id: svn://localhost/ardour2/branches/3.0@10995 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-01provide semantic ordering of simultaneous MIDI events; add operator== to ↵Paul Davis
MidiBuffer iterator; add empty() to MidiBuffer for no particular reason git-svn-id: svn://localhost/ardour2/branches/3.0@10846 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-29temporarily revert change that might be causing an endless loop while MIDI ↵Paul Davis
monitoring/recording git-svn-id: svn://localhost/ardour2/branches/3.0@10836 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-22fix mis-ordering of MIDI events when merging MidiBuffers in-placePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@10779 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-21#ifdef out some expensive code from midibuffer merging (debug only, and we ↵Paul Davis
pretty much know it works) git-svn-id: svn://localhost/ardour2/branches/3.0@10733 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
2011-03-15Fix more broken whitespace.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@9152 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-01-10Make a couple of bits of debug conditional to avoid mallocs when they are ↵Carl Hetherington
turned off. git-svn-id: svn://localhost/ardour2/branches/3.0@8492 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-07-27change Control::{set,get}_float to Control::{set,get}_double and make almost ↵Paul Davis
all Control-related stuff use double rather than random mixtures of float, double and some integer value ; make hans' program change stuff work quite a bit better (not finished yet) including keyboard edting of pgm change values git-svn-id: svn://localhost/ardour2/branches/3.0@7514 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
2009-10-22Fix MidiBuffer::merge_in_place and add aggressive correctness checking.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5854 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-21Fix MIDI thru, though why this is any different from audio (monitoring) I ↵David Robillard
don't know. git-svn-id: svn://localhost/ardour2/branches/3.0@5837 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-20Implement out-of-place MidiBuffer::merge.David Robillard
Completely untested. git-svn-id: svn://localhost/ardour2/branches/3.0@5817 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-25implement MidiBuffer::merge_in_place() and use to support MIDI passthrough ↵Paul Davis
(control over this feature to be added. historical note: implemented and debugged during keith packard's excellent presentation on X at 25 during LPC2009 git-svn-id: svn://localhost/ardour2/branches/3.0@5686 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-07-21Fix some unused parameter warnings.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-06-16first pass (ok, third really) at internal send+return - audio routing inside ↵Paul Davis
ardour without JACK. lots still to do, but at least the obvious works git-svn-id: svn://localhost/ardour2/branches/3.0@5202 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-06-09Remove aliased _size member.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5141 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-04Preliminary MIDI plugin support.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5036 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-01Fix MIDI playback.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5024 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-04-23remove offset from process callback tree. some breakage may have occured. ↵Paul Davis
yes, really. git-svn-id: svn://localhost/ardour2/branches/3.0@4999 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